VS Code Config
This is how I setup my VS Code. I mostly use it for reading/writing markdown and Go.
- Quick Start Guide
- General Settings
- Creating Snippets
Note: This guide is heavily inspired by https://parsiya.io/configs/vscode/ and was originally made in early 2019. I have adopted it and changed it to my needs. Feel free to use as much as you like. Here you can download my vs-code-settings.json is always updated, regardless.
Quick Start Guide
- Install Go:
sudo pacman -S go
- Download and install VSCodium (optionally install Git when Codium asks).
- Copy paste the
settings.jsonfrom the Github repository to user config (shortcut
ctrl + ,).
Goextension and reload.
- Open any file with
goextension. When prompted, select
Install All. Wait until all tools are installed.
- Optionally install the
Markdown All in Oneextension and reload.
- Now intellisense should work for Go and Markdown.
Some useful extensions.
To enable golangci-lint set the following in config:
The next step might not be needed as VSCodium should ask you to do it when you open a go file.
go get -v github.com/golangci/golangci-lint/cmd/golangci-lint to install
golangci-lint by hand.
Next, open up any Go file and the extension will prompt you to install tools. Select all and tools will be installed.
Go extension comes with some snippets. These snippets are at:
Markdown All in One
Helps with editing markdown.
Table of Content
Add the initial table of content: Press
ctrl+shift+p and type
ctoc in the
To ignore a heading and all its subheadings, add
<!-- omit in toc --> at the
end of the heading. This is useful for eliminating the top-level Github heading.
Just be sure that the rest of your headings are not subheadings for the top one
(e.g. if top heading is
h1, next heading should also be
h1). In this
document I have ignored the top heading
VS Code Config.
Linter for markdown.
You can disable specific rules in config:
Adds Git Integration from eamodo. There is another one from entepe85, but who knows what that contains.
I have disabled some clutter:
LanguageTool for Visual Studio Code
This extension enables some grammar and spelling rules.
You must also install specific language supports. E.g. English:
Code Spell Checker
Enables spell check. You can add new words to it (they will be stored in user settings file):
VS Notes is a simple tool that takes care of the creation and management of plain text notes and harnesses the power of VS Code via the Command Palette.
ctrl + , to open the config file. It supports intellisense/suggestions.
Helps with performance inside VMs where I do not need git integration.
These settings only affect markdown files. VS Code has a recent bug where some
universal settings (e.g.
quickSuggestions) are not automatically applied to
some languages such as Markdown. These are added here.
Word Separator Note
Unlike Sublime, VS Code counts
- as word separator. In VS Code this is called
word pattern. This means you will not get suggestions for
editor.wordSeparators config setting does not have any effect on word
Similar to other editors, you can create snippets in VS Code. Snippets are
stored in JSON files. To create a snippet for a specific language use
File (menu) > Preferences > User Snippets. Then select the language. In this case, I
will create some Markdown snippets, so I will select
The JSON object is easy to read. The important parts are
prefix (which is the
body. Note that you do not need to enter new lines with
Simply create a new cell in the body array and it will be printed in a new line.
The following snippet will create a codefence.
- It’s the first place where your cursor is after the snippet is activated.
- The default text is
After pressing tab, cursor will go to
$2 and so on. After running out of
placeholders, final tab will land at
$0 which is useful for leaving the
snippet without having to manually placing the cursor.
As another example, I have created two snippets for my Hugo shortcodes: