Skip to content

Instantly share code, notes, and snippets.

@seantrane
Last active November 2, 2024 02:20
Show Gist options
  • Save seantrane/4070247bdaa066bc683c4afa690d53dd to your computer and use it in GitHub Desktop.
Save seantrane/4070247bdaa066bc683c4afa690d53dd to your computer and use it in GitHub Desktop.
Visual Studio Code Preferences

My Visual Studio Code Preferences

The various settings I use in VS Code. Useful, not only for new setups, but also sharing with others.

These preferences are organized in the order you might configure VS Code from scratch.

  1. Keyboard Shortcuts (keybindings.json)
  2. Settings (settings.json)
  3. Extensions
  4. Workspace config (projects.code-workspace)

VS Code Extensions

This is my list of installed VS Code extensions (with commands to install them).

You can pull your own list at any time with the following command. I use the same command to update my gist.

code --list-extensions | xargs -L 1 echo code --install-extension

To install the full list, just highlight this entire code block below, copy, paste at your command line, hit enter.

code --install-extension akamud.vscode-javascript-snippet-pack
code --install-extension alan.mochasnippets
code --install-extension asciidoctor.asciidoctor-vscode
code --install-extension bajdzis.vscode-database
code --install-extension bierner.markdown-preview-github-styles
code --install-extension chouzz.vscode-better-align
code --install-extension christian-kohler.npm-intellisense
code --install-extension christian-kohler.path-intellisense
code --install-extension chrmarti.regex
code --install-extension codestream.codestream
code --install-extension codezombiech.gitignore
code --install-extension darkriszty.markdown-table-prettify
code --install-extension davidanson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension deepinthought.vscode-shell-snippets
code --install-extension dlech.chmod
code --install-extension donjayamanne.githistory
code --install-extension dotjoshjohnson.xml
code --install-extension editorconfig.editorconfig
code --install-extension eeyore.yapf
code --install-extension esbenp.prettier-vscode
code --install-extension formulahendry.auto-close-tag
code --install-extension formulahendry.auto-rename-tag
code --install-extension formulahendry.code-runner
code --install-extension ginfuru.ginfuru-vscode-jekyll-syntax
code --install-extension github.codespaces
code --install-extension golang.go
code --install-extension hashicorp.terraform
code --install-extension humao.rest-client
code --install-extension ibm.output-colorizer
code --install-extension jeppeandersen.raml
code --install-extension jeremyljackson.vs-docblock
code --install-extension jerryhong.autofilename
code --install-extension jetmartin.bats
code --install-extension joelalejandro.nrql-language
code --install-extension johnpapa.angular2
code --install-extension jota0222.multi-formatter
code --install-extension jrrdnx.expressionengine
code --install-extension kumar-harsh.graphql-for-vscode
code --install-extension lafe.contextualduplicate
code --install-extension lokalise.i18n-ally
code --install-extension mads-hartmann.bash-ide-vscode
code --install-extension maximerouiller.slugify-vscode
code --install-extension mechatroner.rainbow-csv
code --install-extension mikestead.dotenv
code --install-extension mindaro-dev.file-downloader
code --install-extension mindaro.mindaro
code --install-extension mjmcloug.vscode-elixir
code --install-extension mkhl.shfmt
code --install-extension mrmlnc.vscode-apache
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
code --install-extension ms-python.autopep8
code --install-extension ms-python.black-formatter
code --install-extension ms-python.debugpy
code --install-extension ms-python.isort
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-vscode-remote.remote-ssh-edit
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode-remote.vscode-remote-extensionpack
code --install-extension ms-vscode.atom-keybindings
code --install-extension ms-vscode.remote-explorer
code --install-extension ms-vscode.remote-server
code --install-extension msjsdiag.vscode-react-native
code --install-extension new-relic.nr1
code --install-extension nickgo.cuelang
code --install-extension octref.vetur
code --install-extension oouo-diogo-perdigao.docthis
code --install-extension orta.vscode-jest
code --install-extension pkief.material-icon-theme
code --install-extension redhat.java
code --install-extension redhat.vscode-yaml
code --install-extension richie5um2.vscode-sort-json
code --install-extension run-at-scale.terraform-doc-snippets
code --install-extension samverschueren.yo
code --install-extension seantrane.balanced-theme
code --install-extension sharat.vscode-brewfile
code --install-extension shd101wyy.markdown-preview-enhanced
code --install-extension sleistner.vscode-fileutils
code --install-extension sonarsource.sonarlint-vscode
code --install-extension stevejpurves.cucumber
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension syler.sass-indented
code --install-extension thekalinga.bootstrap4-vscode
code --install-extension timonwong.shellcheck
code --install-extension tomoki1207.selectline-statusbar
code --install-extension tomphilbin.lodash-snippets
code --install-extension tyriar.sort-lines
code --install-extension visualstudioexptteam.intellicode-api-usage-examples
code --install-extension visualstudioexptteam.vscodeintellicode
code --install-extension vscjava.vscode-gradle
code --install-extension vscjava.vscode-java-debug
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-java-pack
code --install-extension vscjava.vscode-java-test
code --install-extension vscjava.vscode-maven
code --install-extension vscode-icons-team.vscode-icons
code --install-extension wmaurer.change-case
code --install-extension xabikos.jasminesnippets
code --install-extension xabikos.javascriptsnippets

VS Code Keyboard Shortcuts

MacOS path: ~/Library/Application Support/Code/User/keybindings.json

// Place your key bindings in this file to overwrite the defaults
[
  {
    "key": "cmd+shift+d",
    "command": "lafe.duplicateCode"
  },
  {
    "key": "alt+cmd+a",
    "command": "wwm.aligncode"
  },
]

VS Code Settings

MacOS path: ~/Library/Application Support/Code/User/settings.json

// Place your settings in this file to overwrite the default settings
{
  "alignment.operatorPadding": "left",
  "atomKeymap.promptV3Features": true,
  "codestream.serverUrl": "https://codestream-api-v2-us1.service.newrelic.com",
  "cSpell.userWords": [
    "dependabot",
    "healthcheck",
    "roadmap",
    "shellcheck"
  ],
  "editor.cursorStyle": "line-thin",
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.fontFamily": "Menlo, Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', Courier, monospace",
  "editor.fontSize": 12,
  "editor.formatOnPaste": false,
  "editor.hover.delay": 800,
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.renderWhitespace": "boundary",
  "editor.scrollBeyondLastLine": false,
  "editor.suggestSelection": "first",
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "explorer.confirmDragAndDrop": false,
  "files.associations": {
    "./docs/*.md": "jekyll",
    "./docs/**/*.html": "jekyll",
    "./docs/README.md": "markdown",
    ".editorconfig": "editorconfig",
    ".env.example": "dotenv",
    "*.hcl": "terraform",
    "*.json.tftpl": "jsonc",
    "*.symlink": "shellscript",
    "**/*.github.io/*.md": "jekyll",
    "**/*.github.io/**/*.html": "jekyll",
    "**/*.github.io/CONTRIBUTING.md": "markdown",
    "**/*.github.io/README.md": "markdown",
    "Brewfile.symlink": "ruby",
    "CODEOWNERS": "ignore",
    "config": "editorconfig",
    "Dockerfile.*": "dockerfile"
  },
  "files.eol": "\n",
  "files.exclude": {
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true
  },
  "files.insertFinalNewline": true,
  "files.trimTrailingWhitespace": true,
  "git.ignoreLimitWarning": true,
  "git.path": [
    "/opt/homebrew/bin/git",
    "/usr/local/bin/git",
    "/usr/bin/git"
  ],
  "gitlens.hovers.currentLine.over": "line",
  "gitlens.currentLine.enabled": false,
  "gitlens.codeLens.enabled": false,
  "markdown.styles": [
    "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.7.0/github-markdown-light.min.css"
  ],
  "markdownTablePrettify.columnPadding": 0,
  "prettier.jsxSingleQuote": true,
  "prettier.printWidth": 100,
  "prettier.singleQuote": true,
  "python.languageServer": "Default",
  "redhat.telemetry.enabled": false,
  "search.exclude": {
    "**/.bundle": true,
    "**/.sass-cache": true,
    "**/bower_components": true,
    "**/node_modules": true,
    "./vendor": true
  },
  "selectline.alignment": "right",
  "selectline.displayFormat": "%d Lines Selected",
  "selectline.statusbarPriority": 1000,
  "shellcheck.customArgs": [
    "-x"
  ],
  "shellcheck.executablePath": "/opt/homebrew/bin/shellcheck",
  "sonarlint.rules": {
    "Web:TableWithoutCaptionCheck": {
      "level": "off"
    },
    "Web:BoldAndItalicTagsCheck": {
      "level": "off"
    }
  },
  "telemetry.telemetryLevel": "off",
  "terminal.external.osxExec": "iTerm.app",
  "terminal.integrated.defaultProfile.osx": "zsh",
  "terminal.integrated.lineHeight": 1.1,
  "terminal.integrated.profiles.osx": {
    "bash": {
      "id": "bash",
      "title": "Bourne Shell",
      "extensionIdentifier": "bash",
      "path": [
        "/opt/homebrew/bin/bash",
        "/usr/local/bin/bash",
        "/usr/bin/bash",
        "/bin/bash"
      ]
    },
    "zsh": {
      "id": "zsh",
      "title": "Zshell",
      "extensionIdentifier": "zsh",
      "path": [
        "/opt/homebrew/bin/zsh",
        "/usr/local/bin/zsh",
        "/usr/bin/zsh",
        "/bin/zsh"
      ]
    },
  },
  "terminal.integrated.scrollback": 10000,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "vsicons.dontShowNewVersionMessage": true,
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "window.restoreWindows": "all",
  "window.title": "${activeEditorMedium}${separator}${rootName}",
  "window.zoomLevel": 0,
  "workbench.colorCustomizations": {
    "panel.background": "#1c1c1c",
    "statusBar.background": "#1c1c1c",
    "terminal.ansiBlack": "#333333",
    "terminal.ansiBlue": "#44bbff",
    "terminal.ansiBrightBlack": "#777777",
    "terminal.ansiBrightBlue": "#66bbff",
    "terminal.ansiBrightCyan": "#00ffff",
    "terminal.ansiBrightGreen": "#88ff00",
    "terminal.ansiBrightMagenta": "#ff00ff",
    "terminal.ansiBrightRed": "#ff3300",
    "terminal.ansiBrightWhite": "#F9F9F9",
    "terminal.ansiBrightYellow": "#ffdd00",
    "terminal.ansiCyan": "#00eeee",
    "terminal.ansiGreen": "#88ee00",
    "terminal.ansiMagenta": "#ee00ee",
    "terminal.ansiRed": "#ee2200",
    "terminal.ansiWhite": "#F8F8F8",
    "terminal.ansiYellow": "#ffcc00",
    "terminal.background": "#191919",
    "terminal.foreground": "#dddddd",
    "terminalCursor.background": "#eeeeee",
    "terminalCursor.foreground": "#eeeeee",
    "titleBar.activeBackground": "#1c1c1c"
  },
  "workbench.colorTheme": "BalanceD",
  "workbench.editor.showTabs": "single",
  "workbench.editor.tabSizing": "shrink",
  "workbench.fontAliasing": "auto",
  "workbench.sideBar.location": "left",
  "workbench.startupEditor": "newUntitledFile",
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features",
    "editor.formatOnSave": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features",
    "editor.formatOnSave": true
  },
  "[markdown]": {
    "editor.defaultFormatter": "Jota0222.multi-formatter",
    "multiFormatter.formatterList": [
      "esbenp.prettier-vscode",
      "darkriszty.markdown-table-prettify"
    ],
    "editor.formatOnSave": true
  },
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.formatOnSave": true
  },
  "[shellscript]": {
    "editor.defaultFormatter": "mkhl.shfmt",
    "editor.formatOnSave": true
  },
  "[terraform]": {
    "editor.defaultFormatter": "hashicorp.terraform",
    "editor.formatOnSave": true,
    "editor.formatOnSaveMode": "file"
  },
  "[terraform-vars]": {
    "editor.defaultFormatter": "hashicorp.terraform",
    "editor.formatOnSave": true,
    "editor.formatOnSaveMode": "file"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[yaml]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  }
}

VS Code Workspace Settings

Path: ~/Projects/projects.code-workspace

{
  "folders": [
    {
      "path": "/full/dir/path"
    },
    {
      "path": "relative/dir/path"
    }
  ],
  "settings": {
    "files.associations": {
      "./docs/*.md": "jekyll",
      "./docs/**/*.html": "jekyll",
      "./docs/README.md": "markdown",
      "**/*.github.io/**/*.html": "jekyll",
      "**/*.github.io/*.md": "jekyll",
      "**/*.github.io/CONTRIBUTING.md": "markdown",
      "**/*.github.io/README.md": "markdown"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment