VSCode settings and plugins

VSCode settings and plugins

It’s almost two years when I switched to VSCode from IntelliJ IDEA. The last license expired in September 2018. Sometimes I switched back to IDEA when there were problems with Python Language Server or pytests discovering, but it did not last long. The IDEA is good, it works well, but it’s too heavy for me, even if I do not restart it often. With VSCode I still have sometimes problems with “Go to Definition”, but most of the time it solves with a simple reload, which takes just several seconds.

Settings

Mostly I’m using the settings by default, here are some changes:

  • open new windows in maximized state "window.newWindowDimensions": "maximized"
  • set line limit for the black code formatter "python.formatting.blackArgs": ["--line-length=120"]
  • set font to JetBrains Mono "editor.fontFamily": "JetBrains Mono, Fira Code, Menlo, Monaco, 'Courier New', monospace"
  • enable ligatures "editor.fontLigatures": true

Plugins

Most of the time I use 4 plugins and some formatters:

  • Better Comments - Improve your code commenting by annotating with alert, informational, TODOs, and more!
  • Bookmarks - Mark lines and jump to them.
  • GitLens - Supercharge the Git capabilities built into Visual Studio Code.
  • Open in browser - This allows you to open the current file in your default browser or application.
  • Prettier, YAML, SQL formatters.

Usual Python workspace settings

{
    "python.pythonPath": "${workspaceFolder}/env/bin/python",
    "python.envFile": "${workspaceFolder}/.env",

    "python.linting.enabled": true,
    "python.linting.flake8Enabled": true,
    "python.linting.mypyEnabled": true,

    "python.testing.pytestEnabled": true,
    "python.testing.pytestArgs": [
        "-s",
        "tests"
    ],

    "python.formatting.provider": "black"
}
comments powered by Disqus