cursor使用配置

官网地址:

复制代码
https://cursor.com/cn/home?from=agents

配置环境

打开配置文件快捷键:cmd+shift+p

输入: settings.json

选择open user settings

插入以下配置

复制代码
{
  // java环境配置
  "maven.executable.path": "/Users/xxx/Downloads/maven/apache-maven-3.6.3/bin/mvn",
  "maven.terminal.useJavaHome": true,
  "java.configuration.maven.userSettings": "/Users/xxx/Downloads/maven/apache-maven-3.6.3/conf/settings.xml",
  "java.jdt.ls.java.home": "/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home",
  "java.configuration.runtimes": [
    {
      "name": "JavaSE-11",
      "path": "/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home",
      "default": true
    },
    {
      "name": "JavaSE-1.8",
      "path": "/Library/Java/JavaVirtualMachines/jdk1.8.0_351.jdk/Contents/Home",
      "default": false
    }
  ],
  "maven.executable.preferMavenWrapper": true,
  "files.autoGuessEncoding": true,
  "files.encoding": "utf8",
  // Git和资源管理器装饰配置 - 确保级联生效
  "explorer.decorations.colors": true,
  "explorer.decorations.badges": true,
  "git.autofetch": true,
  "git.decorations.enabled": true,
  "git.decorations.colors": true,
  "git.decorations.badges": true,
  "scm.diffDecorations": "all",
  "scm.diffDecorationsGutterVisibility": "always",
  "scm.diffDecorationsMinimal": false,
  // 字体配置
  "editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 14,
  "editor.lineHeight": 22,
  "editor.fontLigatures": true,
  // 终端字体设置
  "terminal.integrated.fontFamily": "JetBrains Mono",
  "terminal.integrated.fontSize": 13,
  // 缩进配置
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.renderWhitespace": "boundary",
  "editor.guides.indentation": true,
  "editor.guides.bracketPairs": true,
  "editor.detectIndentation": true,
  "[javascript]": {
    "editor.tabSize": 2
  },
  "[java]": {
    "editor.tabSize": 4
  },
  "[python]": {
    "editor.tabSize": 4
  },

  // 工作区颜色配置
  "workbench.colorTheme": "Default Dark+",
  "workbench.colorCustomizations": {
    "editor.background": "#0b1220",
    "editor.foreground": "#d1d5db",
    "editorCursor.foreground": "#ffcc00",
    "editorLineNumber.foreground": "#6b7280",
    "editorIndentGuide.activeBackground1": "#4b5563",
    // git 颜色配置
    "gitDecoration.stageModifiedResourceForeground": "#22c55e",
    // 修改状态统一绿色
    "editorGutter.modifiedBackground": "#2ea043",
    "editorOverviewRuler.modifiedForeground": "#2ea043",
    // Git状态装饰颜色
    "gitDecoration.modifiedResourceForeground": "#2ea043",
    "gitDecoration.addedResourceForeground": "#2ea043",
    "gitDecoration.untrackedResourceForeground": "#2ea043",
    "gitDecoration.deletedResourceForeground": "#f85149",
    "gitDecoration.ignoredResourceForeground": "#8c8c8c",
    "gitDecoration.conflictingResourceForeground": "#ffa500",
    "gitDecoration.submoduleResourceForeground": "#4ec9b0",
  },
  // 语法高亮配置
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "keyword.control.java",
        "settings": {
          "foreground": "#C586C0"
        }
      },
      {
        "scope": "storage.type.java",
        "settings": {
          "foreground": "#569CD6"
        }
      },
      {
        "scope": "entity.name.class.java",
        "settings": {
          "foreground": "#4EC9B0"
        }
      },
      {
        "scope": "variable.other.enummember.java",
        "settings": {
          "foreground": "#4FC1FF"
        }
      },
      {
        "scope": "string.quoted.double.java",
        "settings": {
          "foreground": "#d55929"
        }
      },
      {
        "scope": "comment.line.double-slash.java",
        "settings": {
          "foreground": "#6A9955"
        }
      },
      {
        "scope": "comment.block.java",
        "settings": {
          "foreground": "#6A9955"
        }
      }
    ]
  },

}
相关推荐
Tang102416 小时前
Cursor AI 编程工具指南
ai编程·cursor
闲不住的李先森2 天前
使用Context7:告别AI“幻觉”,让编程助手永远生成最新、可用的代码
前端·ai编程·cursor
飞哥数智坊4 天前
Plan Mode 实战:为现有 Vue3 项目接入 CloudBase 持久化能力
ai编程·cursor
飞哥数智坊5 天前
Cursor 不设限:竟然直接支持 Claude Code 配置
ai编程·claude·cursor
闲不住的李先森5 天前
深入解析 Cursor 规则:为团队打造统一的 AI 编程规范
前端·ai编程·cursor
学习的周周啊6 天前
一人AI自动化开发体系(Cursor 驱动):从需求到上线的全流程闭环与实战清单
运维·人工智能·自动化·ai编程·全栈·devops·cursor
飞哥数智坊6 天前
“狗都不用”的 Cursor Auto 模式,竟靠 Plan Mode 真香回归?
人工智能·ai编程·cursor
右子7 天前
AI Agent认知偏差:从入门科普到行业误区
cursor
Pluto5387 天前
第一个成功在APP store 上架的APP
前端·后端·cursor
飞哥数智坊8 天前
先理需求再写代码:新版 Cursor 用 Plan Mode 落地费曼学习法
人工智能·ai编程·cursor