{
  // ========== 通用编辑器（适合长文档 / Quarto；与 Cursor 备份对齐）==========
  "editor.wordWrap": "on",
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.renderWhitespace": "selection",
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": "active",
  "files.trimTrailingWhitespace": true,
  "files.insertFinalNewline": true,
  "files.trimFinalNewlines": true,
  "files.eol": "\n",
  "files.associations": {
    "*.R": "r",
    "*.r": "r",
    "*.Rmd": "quarto",
    "*.rmd": "quarto",
    "renv.lock": "json",
    "*.tex": "latex",
    "*.sty": "latex",
    "*.cls": "latex",
    "*.ltx": "latex",
    "*.ctx": "latex"
  },

  // ========== 外观：默认浅色 ==========
  "window.autoDetectColorScheme": false,
  "workbench.colorTheme": "Default Light Modern",

  // ========== Positron：R 解释器（内置 Console / LSP，无需 vscode-R）==========
  // 若 R 未装在默认目录，请改成你的 R.exe 实际路径（须为绝对路径）
  "positron.r.interpreters.default": "C:/Program Files/R/R-4.4.3/bin/x64/R.exe",

  // Packages 面板：与 renv / pak 集成，便于查看已安装与已 attach 的包
  "positron.packages.enable": true,

  // Quarto 行内输出（预览功能；与 RStudio/Jupyter 式 .qmd 体验接近，可按需改为 true）
  "positron.quarto.inlineOutput.enabled": false,

  // Shiny：Play 按钮启动时的预览目标（externalBrowser | internal | none）
  // "positron.runApp.previewMode": "internal",

  // ========== 语言块（Positron 内置 Air 格式化；默认不在保存时 format）==========
  "outline.collapseItems": "alwaysExpand",
  "breadcrumbs.enabled": true,
  "[r]": {
    "editor.tabSize": 2,
    "editor.formatOnSave": false,
    "editor.stickyScroll.enabled": true,
    "breadcrumbs.enabled": true
  },

  // ========== Quarto（Positron 内置 Quarto 扩展）==========
  "quarto.render.renderOnSave": false,
  "quarto.cells.background.color": "useTheme",
  "[quarto]": {
    "editor.wordWrap": "on",
    "editor.stickyScroll.enabled": true,
    "breadcrumbs.enabled": true,
    "editor.quickSuggestions": {
      "comments": "off",
      "strings": "off",
      "other": "on"
    }
  },

  // ========== R Markdown（rmd）==========
  "[rmd]": {
    "editor.wordWrap": "on",
    "editor.stickyScroll.enabled": true,
    "breadcrumbs.enabled": true,
    "editor.quickSuggestions": {
      "comments": "off",
      "strings": "off",
      "other": "on"
    }
  },

  // ========== Markdown ==========
  "[markdown]": {
    "editor.wordWrap": "on",
    "editor.stickyScroll.enabled": true,
    "breadcrumbs.enabled": true
  },

  // ========== LaTeX（需另行安装 LaTeX Workshop 扩展）==========
  "[latex]": {
    "editor.wordWrap": "on",
    "editor.stickyScroll.enabled": true,
    "breadcrumbs.enabled": true,
    "editor.quickSuggestions": {
      "comments": "off",
      "strings": "off",
      "other": "on"
    }
  },
  "latex-workshop.view.outline.fast": true,
  "latex-workshop.view.outline.sections": [
    "part",
    "chapter",
    "section",
    "subsection",
    "subsubsection",
    "paragraph",
    "subparagraph"
  ],

  // ========== 终端（Windows 常用 PowerShell）==========
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.enablePersistentSessions": true,

  // ========== 其他 ==========
  "security.workspace.trust.untrustedFiles": "prompt",

  // ========== 扩展画廊（可选）==========
  // 默认 P3M；若 posit.assistant 等更新列表异常，可临时改为 "openvsx" 后 Reload Window
  // "positron.extensions.gallerySource": "p3m",

  // ========== 扩展白名单（可选；详见 docs/positron-extensions-and-assistant.qmd）==========
  // 建议显式禁止与 Positron 冲突的扩展；勿将 posit.assistant 设为 false
  // "extensions.allowed": {
  //   "REditorSupport.r": false,
  //   "ms-python.python": false,
  //   "posit.assistant": true,
  //   "*": true
  // }

  // intentionally omitted（勿写入 harness 可分享备份）：
  //  - positron.assistant.* / databot.* → 见 settings-assistant.example.json + 本机 Authentication
  //  - r.rpath.* / r.rterm.* / r.lsp.*（Cursor 专用 vscode-R）
}
