vscode 插件
通用
-
Bracket Pair Colorizer 2 <括号加颜色>
-
Code Spell Checker <拼写检查>
-
Material Icon Theme <文件图标>
-
Vim <vim 编辑器>
-
GitLens — Git supercharged <Git 辅助工具>
-
Markdown Preview Enhanced <markdown 预览>
-
markdownlint <markdown 语法提示>
Go
- Go <go 全家桶>
JavaScript
- Path Intellisense <路径和名称自动补全>
C/C++
- C/C++ <智能提示\调试\代码浏览…>
vscode 配置
{
// #问题解决
// 1. vscode 官网搜索, https://code.visualstudio.com/docs#vscode
// 2. vscode GitHub 库搜索, https://github.com/microsoft/vscode
// 3. 热键问题 ctrl-k ctrl-s 搜索'问题热键'是否重复或则冲突
// #不建议设置
// "terminal.integrated.cwd": "E:\\github.com", # 每次都打开这个目录,而不是工作目录
// #要研究
// "editor.minimap.enabled": true,
// "terminal.integrated.sendKeybindingsToShell": true,
// #暂时设置
//1.部分解决问题: output窗口不显示ASNI颜色编码
"editor.renderControlCharacters": true, //output 窗口显示 '✔',go 测试输出
// #终端
//1.集成在vscode的shell <ctrl + `>
"terminal.integrated.shell.windows":
"C:\\Windows\\System32\\bash.exe",
// "C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.1.0.0_x64__8wekyb3d8bbwe\\pwsh.exe",
// "C:\\Windows\\System32\\cmd.exe",
//2.本地(独立窗口)的shell <ctrl + shift + c>
"terminal.external.windowsExec":
"C:\\Windows\\System32\\bash.exe",
//3.连接不跳转
"terminal.integrated.enableFileLinks": false,
// #基本
"files.autoSave": "afterDelay",//自动保存, 可选 val: onFocusChange
"files.autoSaveDelay": 1000, //关联到 key: files.autoSave
"explorer.confirmDragAndDrop": false,//目录拖拽
"breadcrumbs.enabled": true, //导航路径
"code-runner.runInTerminal": true, //一键运行
"editor.fontFamily": "Consolas, 'Courier New', monospace", //字体
// #vim
//使用系统的剪切板
"vim.useSystemClipboard": true,
//不使用ctrl键
"vim.useCtrlKeys":false,
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": false,
//功能 | 屏蔽 vim 的,使能 window 的
//取消 | c-z
//重做 | c-y
//保存 | c-s
"<C-z>": false,
"<C-y>": false,
"<C-s>": false
},
"vim.insertModeKeyBindings": [
{
// 插入模式下,jj回到正常模式
"before": ["j", "j"],
"after": ["<Esc>"],
},
{
"before": ["v", "v","v"],
"after": ["<C-v>"]
},
{
"before": ["b", "v"],
"after": ["<T-v>"]
}
],
// #go
// https://github.com/golang/tools/blob/master/gopls/doc/vscode.md
"go.useLanguageServer": true, // 使用 lps
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
"editor.snippetSuggestions": "none", //可选:禁用代码段,因为它们与自动补全冲突
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"gopls": {
"usePlaceholders": true,// 完成函数时添加参数占位符
"staticcheck": false, // true - 使用附加分析,占用内存
},
"go.formatTool": "goimports",
"go.enableCodeLens": {
"references": false,
"runtest": true // 使能 test/debug
},
"go.testFlags": [
"-v",
"-gcflags=-l",
"-count=1"
],