Skip to content

VS Code 配置指南

TL;DR

External tools:

  • tex-fmt
Terminal window
brew install tex-fmt

Fonts:

  • Maple Mono Normal NF CN
  • Liga SFMono Nerd Font
Terminal window
brew install --cask font-maple-mono-normal-nf-cn
# 由于版权问题, Nerd Fonts 官方没有提供 SF Mono 的 Nerd Font 版本, 只能通过个人仓库安装
brew tap shaunsingh/SFMono-Nerd-Font-Ligaturized
brew install --cask font-sf-mono-nerd-font-ligaturized

Settings:

{
// Appearance
"workbench.iconTheme": "catppuccin-macchiato",
"workbench.preferredDarkColorTheme": "Catppuccin Macchiato",
"workbench.preferredLightColorTheme": "Catppuccin Latte",
"window.autoDetectColorScheme": true,
"workbench.list.smoothScrolling": true,
"workbench.tree.indent": 12,
"editor.fontFamily": "'Maple Mono Normal NF CN'",
"editor.fontSize": 13,
"editor.lineHeight": 1.2,
"editor.fontLigatures": true,
"editor.rulers": [100],
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "on",
"editor.smoothScrolling": true,
"editor.wordWrap": "on",
"editor.wrappingStrategy": "advanced",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": false,
"terminal.integrated.fontFamily": "'Liga SFMono Nerd Font'",
"terminal.integrated.fontSize": 13,
"terminal.integrated.smoothScrolling": true,
"explorer.sortOrder": "type",
"editor.guides.bracketPairs": "active",
// Built-in Features
"files.autoSave": "afterDelay",
"editor.formatOnSave": true,
"terminal.integrated.enableMultiLinePasteWarning": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"files.simpleDialog.enable": true,
"diffEditor.ignoreTrimWhitespace": true,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
// Git
"git.autofetch": true,
"git.confirmSync": false,
// Python
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
}
},
// Jupyter
"jupyter.debugJustMyCode": false,
"jupyter.askForKernelRestart": false,
"notebook.output.wordWrap": true,
"notebook.formatOnSave.enabled": true,
"jupyter.themeMatplotlibPlots": true,
"notebook.codeActionsOnSave": {
"notebook.source.organizeImports": "explicit",
"notebook.source.fixAll": "explicit"
},
// LaTeX
"latex-workshop.message.warning.show": false,
"latex-workshop.formatting.latex": "tex-fmt",
"latex-workshop.message.badbox.show": "overfull",
// Remote - SSH
"remote.SSH.localServerDownload": "always",
"remote.downloadExtensionsLocally": true,
// Error Lens
"errorLens.followCursor": "closestProblem",
"errorLens.delay": 2000,
"errorLens.enabledInMergeConflict": false,
"errorLens.fontStyleItalic": true,
"errorLens.messageBackgroundMode": "message",
"errorLens.messageTemplate": "$message - $source",
"errorLens.padding": "0 0.5ch",
"errorLens.messageMaxChars": 100,
"errorLens.gutterIconsEnabled": true,
"errorLens.gutterIconSet": "defaultOutline",
"errorLens.gutterIconSize": "125%",
// GitLens
"gitlens.currentLine.enabled": false,
"gitlens.codeLens.enabled": false,
"gitlens.launchpad.indicator.enabled": false,
// Cursor
"cursor.diffs.useCharacterLevelDiffs": true,
// Prettier
"[javascript][typescript][json][jsonc][css][html][yaml][markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
}
}

Extensions:

Terminal window
xargs -L 1 cursor --install-extension <<EOF
13xforever.language-x86-64-assembly
adpyke.codesnap
anysphere.remote-ssh
astro-build.astro-vscode
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
charliermarsh.ruff
donjayamanne.githistory
eamodio.gitlens
esbenp.prettier-vscode
hediet.debug-visualizer
james-yu.latex-workshop
mechatroner.rainbow-csv
mhutchie.git-graph
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-powertoys
ms-toolsai.vscode-jupyter-slideshow
ms-vscode.hexeditor
nefrob.vscode-just-syntax
oderwat.indent-rainbow
tamasfe.even-better-toml
timonwong.shellcheck
unifiedjs.vscode-mdx
usernamehw.errorlens
wakatime.vscode-wakatime
wayou.vscode-todo-highlight
EOF