Cursor 本地配置

发布于 15 小时前  10 次阅读


插件

主题与外观

扩展 ID说明
endormi.2077-theme2077 主题
pkief.material-icon-themeMaterial 文件图标
vscode-icons-team.vscode-icons另一套文件图标
shalldie.background编辑器背景图
ms-ceintl.vscode-language-pack-zh-hans中文语言包

Java / Spring

扩展 ID说明
redhat.javaJava 语言支持
vscjava.vscode-java-packJava 扩展包
vscjava.vscode-java-debugJava 调试
vscjava.vscode-java-testJava 测试
vscjava.vscode-mavenMaven
vscjava.vscode-gradleGradle
vscjava.vscode-java-dependency依赖查看
vscjava.vscode-spring-boot-dashboardSpring Boot 面板
vscjava.vscode-spring-initializrSpring 初始化
vmware.vscode-spring-bootSpring Boot
vmware.vscode-boot-dev-packBoot Dev Pack
redhat.vscode-xmlXML 支持

Python

扩展 ID说明
ms-python.pythonPython
ms-python.vscode-pylancePylance
ms-python.debugpy调试
ms-python.autopep8格式化 autopep8
ms-python.pylintPylint
anysphere.cursorpyrightCursor Pyright
anysphere.pyrightPyright
eeyore.yapfYAPF 格式化
kevinrose.vsc-python-indentPython 缩进

Vue / 前端

扩展 ID说明
vue.volarVolar (Vue 3)
octref.veturVetur (Vue 2)
ecmel.vscode-html-cssHTML CSS 支持
zignd.html-css-class-completionHTML/CSS 类名补全
formulahendry.auto-close-tag自动闭合标签
formulahendry.auto-rename-tag自动重命名标签
vincaslt.highlight-matching-tag高亮匹配标签
thekalinga.bootstrap4-vscodeBootstrap 4
wcwhitehead.bootstrap-3-snippetsBootstrap 3 片段
mrcrowl.easy-lessLess
sysoev.language-stylusStylus 语法
thisismanta.stylus-supremacyStylus 格式化
stylelint.vscode-stylelintStylelint

JavaScript / TypeScript

扩展 ID说明
dbaeumer.vscode-eslintESLint
esbenp.prettier-vscodePrettier
ajhyndman.jslintJSLint
xabikos.javascriptsnippetsJS 片段
wix.vscode-import-cost显示 import 体积

Git

扩展 ID说明
eamodio.gitlensGitLens
mhutchie.git-graphGit Graph
donjayamanne.githistoryGit History

Markdown

扩展 ID说明
yzhang.markdown-all-in-oneMarkdown All in One
shd101wyy.markdown-preview-enhanced增强预览
davidanson.vscode-markdownlintMarkdown 语法检查

调试 / 浏览器

扩展 ID说明
msjsdiag.debugger-for-chromeChrome 调试
ritwickdey.liveserverLive Server
techer.open-in-browser在浏览器中打开
auchenberg.vscode-browser-preview内置浏览器预览

效率与工具

扩展 ID说明
christian-kohler.path-intellisense路径补全
gruntfuggly.todo-treeTODO 高亮
wayou.vscode-todo-highlightTodo 高亮
hediet.vscode-drawioDraw.io 绘图
kisstkondoros.vscode-gutter-preview行内图片预览
naumovs.color-highlight颜色高亮
oderwat.indent-rainbow缩进彩虹
coenraads.bracket-pair-colorizer-2括号配对着色
chakrounanas.turbo-console-log快速 console.log
streetsidesoftware.code-spell-checker拼写检查
aaron-bond.better-comments注释高亮
k--kato.intellij-idea-keybindingsIDEA 快捷键
alefragnani.project-manager项目管理
hookyqr.beautify代码美化
michelemelluso.code-beautifier另一款美化
vscode-snippet.snippet代码片段
tomoki1207.pdfPDF 预览
leetcode.vscode-leetcodeLeetCode
lokalise.i18n-ally国际化 i18n
mechatroner.rainbow-csvCSV 高亮
visualstudioexptteam.vscodeintellicodeIntelliCode
visualstudioexptteam.intellicode-api-usage-examplesAPI 示例
shan.code-settings-sync设置同步
ms-vscode.cmake-toolsCMake

settings.json

{
    // ----- 通用 -----
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 1000,
    "problems.decorations.enabled": false,
    "problems.showCurrentInStatus": false,
    "editor.unusedImports.severity": "ignore",
    "editor.showUnused": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "database-client.autoSync": true,
    "update.enableWindowsBackgroundUpdates": false,
    "update.mode": "none",
    "http.proxyAuthorization": null,
    "json.schemas": [],
    "cursor.general.disableHttp2": true,
    "cursor.general.disableHttp1SSE": true,

    // ----- Java -----
    "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx16G -Xms2G -Xlog:disable",
    "maven.view": "hierarchical",
    "java.debug.settings.onBuildFailureProceed": true,
    "java.autobuild.enabled": false,
    "java.debug.settings.forceBuildBeforeLaunch": false,
    "java.debug.settings.hotCodeReplace": "auto",
    "java.compile.onSave": true,
    "java.compile.nullAnalysis.mode": "disabled",
    "java.dependency.packagePresentation": "hierarchical",

    // ----- Python -----
    "python.defaultInterpreterPath": "python3",
    "python.analysis.typeCheckingMode": "basic",
    "python.analysis.autoImportCompletions": true,
    "python.formatting.provider": "none",
    "[python]": {
        "editor.defaultFormatter": "ms-python.python",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit"
        }
    },
    "python.testing.pytestEnabled": true,
    "python.testing.unittestEnabled": false,

    // ----- Vue3 -----
    "vue.inlayHints.missingProps": true,
    "vue.server.hybridMode": true,
    "[vue]": {
        "editor.defaultFormatter": "Vue.volar",
        "editor.formatOnSave": true
    },
    "volar.takeOverMode.enabled": false,

    // ----- JavaScript / TypeScript -----
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features",
        "editor.formatOnSave": true
    },
    "[javascriptreact]": {
        "editor.defaultFormatter": "vscode.typescript-language-features",
        "editor.formatOnSave": true
    },
    "[typescript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features",
        "editor.formatOnSave": true
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "vscode.typescript-language-features",
        "editor.formatOnSave": true
    },

    // ----- HTML -----
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features",
        "editor.formatOnSave": true
    },
    "html.format.wrapLineLength": 120,
    "emmet.includeLanguages": {
        "vue-html": "html",
        "javascript": "javascriptreact",
        "vue": "html"
    },

    // ----- Peek 视图颜色 -----
    "workbench.colorCustomizations": {
        "peekView.border": "#FF0000",
        "peekViewEditor.background": "#330099",
        "peekViewResult.background": "#3300CC",
        "peekViewTitle.background": "#FF0000"
    },
    "workbench.colorTheme": "2077",

   
    // 是否开启背景图显示
    "background.enabled": true,
    // true-显示默认的图片  false-显示用户自定义的图片
    "background.useDefault": false,
    // 最多设置三张图片,默认显示最上方的图片,当打开多个侧边栏时再依次显示后面的背景图片
    "background.customImages": [
        "/Users/cardloan/Documents/cursor_bg/3.jpg",
        "/Users/cardloan/Documents/cursor_bg/2.jpg",
        "/Users/cardloan/Documents/cursor_bg/1.png"
    ],
    // CSS显示样式设置
    "background.style": {
        "content": "''",
        "pointer-events": "none",
        "top": "0",
        "left": "0",
        "width": "100%",
        "height": "100%",
        "z-index": "99999",
        "background.repeat": "no-repeat",
        "background-size": "cover",
        // 设置透明度
        "opacity": 0.1
    },
    "editor.minimap.enabled": false,
    "sync.gist": "7c71a865a859f2c9a5724aa2472d2d41",

    // ----- ESLint -----
    "eslint.enable": true,
    "eslint.format.enable": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "vue",
        "html"
    ],

    // ----- Prettier(与各语言 defaultFormatter 配合)-----
    "prettier.enable": true,

    // ----- Stylelint -----
    "stylelint.enable": true,
    "stylelint.validate": ["css", "less", "scss", "sass", "vue", "postcss"],

    // ----- Markdown -----
    "markdown.preview.breakOnSingleNewline": true,
    "markdownlint.config": {},

    // ----- 拼写检查 code-spell-checker -----
    "cSpell.enabled": true,
    "cSpell.enableFiletypes": ["markdown", "plaintext"],

    // ----- GitLens(可选)-----
    "gitlens.codeLens.enabled": true,
    "gitlens.currentLine.enabled": true,

    // ----- LeetCode -----
    "leetcode.endpoint": "leetcode-cn",
    "leetcode.defaultLanguage": "python",

    // ----- i18n-ally -----
    "i18n-ally.localesPaths": ["locales", "src/locales", "src/assets/locales"],
    "i18n-ally.keystyle": "nested",

    // ----- Todo Tree / Todo Highlight -----
    "todo-tree.general.tags": ["TODO", "FIXME", "XXX", "HACK"],
    "todohighlight.isEnable": true
}

一名测试工作者,专注接口测试、自动化测试、性能测试、Python技术。