Visual Studio Code Setup

Example User Setting.json

Not a exhausted list, but useful:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
// The VSC font size.
"editor.fontSize": 15,
// 2 spaces when indent
"editor.tabSize": 2,
// Column ruler and color.
"editor.rulers": [80],
// Stay the same with iTerm2 ohmyzsh font.
"terminal.integrated.fontFamily": "MesloLGS NF",
// This can be customized as needed.
"python.defaultInterpreterPath": "/usr/bin/python3",
"files.autoSave": "afterDelay",
"workbench.iconTheme": "material-icon-theme",
"workbench.colorCustomizations": {
"editorRuler.foreground": "#5c7858"
},
// After installing go plugin
"go.useLanguageServer": true,
"go.toolsManagement.autoUpdate": true,
// To make VSC compile code correctly with file that has below build tags
// otherwise VSC cannot find them, for example, the struct in Mock file.
"go.buildTags": "integration test mock lasting",
// For Markdown Preview Github Styling plugin.
"markdown-preview-github-styles.colorTheme": "light",
// For Markdown Preview Mermaid Support plugin.
"markdown-mermaid.darkModeTheme": "neutral"
}

The pictures referred in blog are still in google drive, linked by ![](https://drive.google.com/uc?id=xxx)

Recommended Extensions

The following VSC plugins are highly recommended.

  • Material Icon Theme, better view for icons

  • Remote Development, it includes:

    • Remote - SSH
    • Remote - SSH: Editing Configuration Files
    • WSL
  • Docker

  • Python

  • Pylint, you need to customize the configuration https://code.visualstudio.com/docs/python/linting https://dev.to/eegli/quick-guide-to-python-formatting-in-vs-code-2040

  • Go: must have for go development

  • YAML

  • HashiCorp Terrform

  • Ansible

  • gRPC Clicker, grpcurl under the hood

  • vscode-proto3, proto syntax highlight

  • Thunder Client, the VSC postman

  • TODO Highlight

  • Better Comments

  • Indenticator, highlights indent depth

  • GitLens, code blame, heatmaps and authorship, etc.

  • Markdown Preview Github Styling, rendering markdown file as Github style

  • Markdown Preview Mermaid Support, draw sequence diagrams, see Example and Live Editor

NOTE: The Mermaid plugin here is for VSCode, not for Hexo deployment, to enable Mermaid in Hexo rendering, please check Hexo setup blog.

If you are working remotely by SSH, installed these plugins on remote as well on demands.

I have encountered a issue that the go extension does not work properly, for example the source code back tracing is not working, the troubleshooting please see here. Most likely you need to run go vendor to download the dependencies locally.

0%