Those Settings and Extensions in VSCode (for Go)

Yiğit İrez
5 min readJul 7, 2022

--

Yes, those settings and extensions that are used often (at least I do) but always forgotten during development. Well, you don’t have to remember what you forgot anymore, at least for Go development.

Here is the list of stuff I use. The main language extensions are not listed since they are automatically suggested and easily installed. Do tell whatever else you may be using as well.

Settings

Minimap removal

If you `love` this as much as I do, “editor.minimap.enabled”: false is the way to go.

or via settings UI,

Ordering function names by Name

VSCode orders functions using their position in the document by default. To change this to name, you can use symbolSortOrder and select name or whatever else you prefer.

Disabling preview mode

VSCode has something called preview mode which I hate dearly. If you one click some file from the explorer, it will open it in preview mode. The name is shown in Italic and if you select something else, it will open it in the same tab. You have to double-click if you want it to stay for good apparently. I’ve forgotten how many times I forgot to double-click only to lose where I was while checking something spanning multiple files.

To get rid of this feature,

“workbench.editor.enablePreview”: false

or

Extensions

Back & Forth

A lovely extension allowing you to move between visited code pieces quickly.

Git Blame

Allows you to see who commited a line and when. You can also click the blame which will take you to that commit directly in GitHub.

Excel Viewer

Formats .csv files to display decently. We need to open the file, select open preview button. That’s all.

Git History

Gives you most of the capabilities of fancier paid IDEs allowing you to do some visual git magic like resets, rollbacks, commit specific branching, cherry-picking and more.

launch via Git: View History

Enjoy the detailed logs

You can check a file history specifically as well

vscode-pigments

Shows the actual color of used color codes wherever they are mentioned. We need to do a slight change for Go for it to work.

small settings update
nice

Indent One space

This one is specifically useful when working with indentation serious things without auto-formatting like terraform, yaml and/or hcl files. You select all the lines you want to indent by a space, then click space. That’s it. To reverse indent, shift+space will do.

indent-rainbow

I like knowing exactly what indentation I’m on. This little extension provides this quite nicely.

indentations all the way

It does get a bit too colorful sometimes with Dark themes so I toned it down a little and love it this way. Click F1, open settings json and slap the below setting in to try it out.

"indentRainbow.colors": [
"rgba(255,255,64,0.02)",
"rgba(127,255,127,0.02)",
"rgba(255,127,255,0.02)",
"rgba(79,236,236,0.02)"
],

Remote -SSH

This extension is useful for quick SSH access to machines. You can open and run commands directly from VSCode. I use MobaXTerm for anything other than this but still it has its uses if you want to check something out quickly without leaving VSCode.

SQLTools

I use Dbeaver a lot and I dislike the clunkiness of it when I want to run a single command or check a small bit of data.

You first have to grab the relevant db driver for sql-tools

After you set your connection, ta-da! You can even run queries as well. Dbeaver definitely has more capabilities and is more intuitive to use but at least for local work or even test dbs, this should be good enough.

Docker

I’m placing this here as last since most probably have this running but just in case not, do so if you are handling containers. It’s ridiculously easy to manage containers from here.

--

--