我的 VS Code 设置
在本文中,我将与你分享我的 VS Code 设置。它包括主题、使用的图标以及扩展程序(这非常重要)。
🎨主题
我使用Andromeda作为我的 VS Code 的主要主题
🪟图标
对于图标,我有时会在Material Icon Theme和Material Theme Icons之间切换。
材料图标主题
材料主题图标
扩展
现在最好的部分是,我提到的很多扩展都是我最喜欢的或我每天最常用的扩展。
自动重命名标签
自动重命名配对的 HTML/XML 标签,与 Visual Studio IDE 相同。
下载: 自动重命名标签
括号对着色切换器
VS Code 扩展程序,为您提供一个简单的命令来快速切换全局“括号对着色”
下载: 括号对着色切换器
C/C++
C/C++ 扩展为 Visual Studio Code 添加了对 C/C++ 的语言支持,包括编辑(IntelliSense)和调试功能。
下载: C/C++
代码运行器
运行多种语言的代码片段或代码文件
下载: Code Runner
代码拼写检查器
适用于代码和文档的基本拼写检查器。
此拼写检查器的目标是帮助发现常见的拼写错误,同时将误报数量保持在较低水平。
下载: 代码拼写检查器
DotENV
VSCode.env
语法高亮。
下载: DotENV
误差透镜
ErrorLens 通过使诊断更加突出来增强语言诊断功能,突出显示语言生成诊断的整行,并以内联方式打印消息。
下载: 错误镜头
ES7+ React/Redux/React-Native 代码片段
ES7+ 中的 JavaScript 和 React/Redux 代码片段,带有VS Code的 Babel 插件功能
下载: ES7+ React/Redux/React-Native 代码片段
ESLint
该扩展程序使用已打开的工作区文件夹中安装的 ESLint 库。如果该文件夹未提供,扩展程序会查找全局安装版本。如果您尚未在本地或全局安装 ESLint,请npm install eslint
在工作区文件夹中运行以进行本地安装或npm install -g eslint
全局安装。
下载: ESLint
Git 图表
查看你的代码库的 Git 图表,并轻松从图表中执行 Git 操作。可配置为你想要的外观!
下载: Git Graph
GitLens
GitLens增强了VS Code 中的 Git 功能,并解锁了每个存储库中尚未开发的知识。它可以帮助您通过 Git 追溯注释和 CodeLens 一目了然地查看代码作者,无缝导航和探索Git 存储库,并通过丰富的可视化功能和强大的比较命令获得宝贵的见解等等。
下载: GitLens
HTML样板
此扩展提供了所有 Web 应用程序使用的标准 HTML 样板代码。
下载: HTML 样板
进口成本
此扩展将在编辑器中内联显示导入包的大小。该扩展利用 webpack 来检测导入包的大小。
下载: 进口成本
实时服务器
它将启用实时更改而无需保存文件。
下载: 实时服务器
Markdown 一体化
Markdown 所需的一切(键盘快捷键、目录、自动预览等)。
注意:VS Code 具有开箱即用的基本 Markdown 支持(例如Markdown 预览版),请参阅官方文档了解更多信息。
下载: Markdown 一体机
Markdown 预览增强
它显示了您的 markdown 内容的增强预览。
下载: Markdown 预览增强版
粘贴 JSON 作为代码
复制 JSON,粘贴为 Go、TypeScript、C#、C++ 等。
下载 - 粘贴 JSON 作为代码
Prettier
使用 Prettier 的代码格式化程序
下载 - Prettier
Python
IntelliSense(Pylance)、Linting、调试(多线程、远程)、Jupyter Notebook、代码格式化、重构、单元测试等。
下载 - Python
设置同步
使用 GitHub Gist 在多台机器之间同步设置、代码片段、主题、文件图标、启动、键绑定、工作区和扩展。
下载 - 设置同步
Tailwind CSS IntelliSense
适用于 VS Code 的智能 Tailwind CSS 工具
下载 - Tailwind CSS IntelliSense
TODO 突出显示
突出显示TODO
以及FIXME
代码中的其他注释。
有时,在将代码发布到生产环境之前,你会忘记检查在编码过程中添加的待办事项。所以,我一直想要一个扩展程序,可以高亮显示这些待办事项,并提醒我还有注释或未完成的事情。
希望这个扩展也能对您有所帮助。
下载 - TODO 亮点
Turbo 控制台日志
自动化编写有意义的日志消息的过程。
下载 - Turbo Console Log
塔布宁 AI
Tabnine 是一款 AI 代码助手,助您成为更优秀的开发者。Tabnine 能够实时补全所有主流编程语言和 IDE 的代码,从而提升您的开发速度。
下载 - Tabnine AI
⚙️设置
以下JSON
代码显示了我的 vs 代码设置:
// user/settings.json
{
"files.autoSave": "afterDelay",
"editor.mouseWheelZoom": true,
"code-runner.clearPreviousOutput": true,
"code-runner.ignoreSelection": true,
"code-runner.runInTerminal": true,
"code-runner.saveAllFilesBeforeRun": true,
"code-runner.saveFileBeforeRun": true,
"editor.wordWrap": "on",
"C_Cpp.updateChannel": "Insiders",
"editor.suggestSelection": "first",
"python.jediEnabled": false,
"editor.fontSize": 17,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"editor.minimap.size": "fit",
"editor.fontFamily": "Consolas, DejaVu Sans Mono, monospace",
"editor.fontLigatures": false,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"python.formatting.provider": "yapf",
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.autofetch": true,
"git.enableSmartCommit": true,
"html-css-class-completion.enableEmmetSupport": true,
"editor.formatOnPaste": true,
"liveServer.settings.donotShowInfoMsg": true,
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"diffEditor.ignoreTrimWhitespace": false,
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[c]": {
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"editor.fontWeight": "300",
"editor.fastScrollSensitivity": 6,
"explorer.confirmDragAndDrop": false,
"vsicons.dontShowNewVersionMessage": true,
"workbench.iconTheme": "material-icon-theme",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.renderWhitespace": "none",
"workbench.startupEditor": "newUntitledFile",
"liveServer.settings.multiRootWorkspaceName": "",
"liveServer.settings.port": 5000,
"liveServer.settings.donotVerifyTags": true,
"editor.formatOnSave": true,
"html.format.indentInnerHtml": true,
"editor.formatOnType": true,
"printcode.tabSize": 4,
"terminal.integrated.confirmOnExit": "hasChildProcesses",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.rightClickBehavior": "default",
"tailwindCSS.emmetCompletions": true,
"sync.gist": "527c3e29660c53c3f17c32260188d66d",
"gitlens.hovers.currentLine.over": "line",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": []
},
"Windows PowerShell": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
},
"Ubuntu (WSL)": {
"path": "C:\\WINDOWS\\System32\\wsl.exe",
"args": [
"-d",
"Ubuntu"
]
}
},
"javascript.updateImportsOnFileMove.enabled": "always",
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"editor.tabSize": 2,
"cSpell.customDictionaries": {
"custom-dictionary-user": {
"name": "custom-dictionary-user",
"path": "~/.cspell/custom-dictionary-user.txt",
"addWords": true,
"scope": "user"
}
},
"window.restoreFullscreen": true,
"tabnine.experimentalAutoImports": true,
"files.defaultLanguage": "${activeEditorLanguage}",
"bracket-pair-colorizer-2.depreciation-notice": false,
"workbench.editor.wrapTabs": true,
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"terminal.integrated.fontFamily": "courier new",
"terminal.integrated.defaultProfile.windows": "pwsh.exe -nologo",
"terminal.integrated.shellIntegration.enabled": true,
"terminal.integrated.shellIntegration.showWelcome": false,
"editor.accessibilitySupport": "off",
"editor.bracketPairColorization.enabled": true,
"todohighlight.isEnable": true,
"terminal.integrated.shellIntegration.history": 1000,
"turboConsoleLog.insertEnclosingClass": false,
"turboConsoleLog.insertEnclosingFunction": false,
"files.autoSaveDelay": 500,
"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.host": "localhost",
"liveServer.settings.fullReload": true,
"workbench.editor.enablePreview": false,
"workbench.colorTheme": "Andromeda Bordered"
}
总结
就这些了。希望你觉得这些有用。如果觉得有用,别忘了点赞❤️并收藏🏷️以便以后使用。如果你有任何问题或反馈,请随时在下面的评论区留言。下期再见。
与我联系
文章来源:https://dev.to/j471n/my-vs-code-setup-971