Skip to content

Instantly share code, notes, and snippets.

@badouralix
Last active March 6, 2024 14:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badouralix/f003f3dcec20f1660e8b132e1b76596b to your computer and use it in GitHub Desktop.
Save badouralix/f003f3dcec20f1660e8b132e1b76596b to your computer and use it in GitHub Desktop.
Personal vscode settings
arcanis.vscode-zipfs
arthurwang.vsc-prolog
bazelbuild.vscode-bazel
bierner.github-markdown-preview
bierner.markdown-checkbox
bierner.markdown-emoji
bierner.markdown-footnotes
bierner.markdown-mermaid
bierner.markdown-preview-github-styles
bierner.markdown-yaml-preamble
bufbuild.vscode-buf
chrislajoie.vscode-modelines
codezombiech.gitignore
cuelang.org.cue
datadog.datadog-vscode
davidanson.vscode-markdownlint
dbaeumer.vscode-eslint
denoland.vscode-deno
eamodio.gitlens
editorconfig.editorconfig
esbenp.prettier-vscode
exiasr.hadolint
github.copilot
github.copilot-chat
golang.go
gruntfuggly.todo-tree
hashicorp.terraform
james-yu.latex-workshop
kevinkyang.auto-comment-blocks
loyieking.smalise
mike-lischke.vscode-antlr4
ms-azuretools.vscode-docker
ms-kubernetes-tools.vscode-kubernetes-tools
ms-python.black-formatter
ms-python.debugpy
ms-python.isort
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-slideshow
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode.cpptools
ms-vscode.hexeditor
ms-vscode.remote-explorer
njpwerner.autodocstring
pkief.material-icon-theme
redhat.vscode-yaml
rust-lang.rust-analyzer
samuelcolvin.jinjahtml
shopify.ruby-lsp
streetsidesoftware.code-spell-checker
streetsidesoftware.code-spell-checker-french
tamasfe.even-better-toml
thesofakillers.vscode-pbtxt
tim-koehler.helm-intellisense
timonwong.shellcheck
tommorris.mako
usernamehw.errorlens
vadimcn.vscode-lldb
vallentin.vscode-bnf
visualstudioexptteam.intellicode-api-usage-examples
visualstudioexptteam.vscodeintellicode
vscodevim.vim
yzhang.markdown-all-in-one
zhuangtongfa.material-theme
zxh404.vscode-proto3
// Place your key bindings in this file to override the defaults
[
{
"key": "alt+c",
"command": "-markdown.extension.checkTaskList",
"when": "editorTextFocus && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"key": "cmd+f",
"command": "-list.find",
"when": "listFocus && listSupportsFind"
},
{
"key": "cmd+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "cmd+t",
"command": "workbench.action.showCommands"
},
]
{
"debug.toolBarLocation": "docked",
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.cursorStyle": "line",
"editor.fontFamily": "JetBrains Mono",
"editor.formatOnSave": true,
"editor.inlayHints.enabled": "onUnlessPressed",
"editor.insertSpaces": true,
"editor.lineNumbers": "on",
"editor.minimap.enabled": true,
"editor.mouseWheelZoom": false,
"editor.renderControlCharacters": false,
"editor.renderWhitespace": "boundary",
"editor.rulers": [
80,
// 96, // Useful to limit comments on go struct fields to 100 chars
120,
],
"editor.stickyScroll.enabled": true,
"editor.tabSize": 4,
"editor.wordSeparators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-",
"editor.wordWrap": "off",
"explorer.confirmDragAndDrop": false,
"explorer.sortOrderLexicographicOptions": "unicode",
"extensions.ignoreRecommendations": true,
"extensions.supportUntrustedWorkspaces": {
"LoyieKing.smalise": {
"supported": true,
"version": "0.0.12",
},
},
"files.associations": {
"*.cql": "sql",
"*.gtpl": "gotmpl",
"*.hcl": "terraform",
"*.pb.txt": "pbtxt",
"CODEOWNERS": "properties",
"LICENSE": "plaintext",
},
"files.autoSave": "onWindowChange",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"files.watcherExclude": {
"**/bazel-*/**": true,
},
"notebook.cellToolbarLocation": {
"default": "right",
"jupyter-notebook": "left",
},
"notebook.formatOnCellExecution": true,
"notebook.stickyScroll.enabled": true,
"telemetry.telemetryLevel": "off",
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt",
],
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.fontFamily": "Hack Nerd Font",
"terminal.integrated.fontSize": 13,
"terminal.integrated.lineHeight": 1.05,
"window.newWindowDimensions": "inherit",
"window.openFilesInNewWindow": "on",
"window.restoreFullscreen": true,
"workbench.colorCustomizations": {
// https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/termite/Builtin%20Tango%20Dark
"terminal.ansiBlack": "#000000",
"terminal.ansiBlue": "#3465a4",
"terminal.ansiBrightBlack": "#555753",
"terminal.ansiBrightBlue": "#729fcf",
"terminal.ansiBrightCyan": "#34e2e2",
"terminal.ansiBrightGreen": "#8ae234",
"terminal.ansiBrightMagenta": "#ad7fa8",
"terminal.ansiBrightRed": "#ef2929",
"terminal.ansiBrightWhite": "#eeeeec",
"terminal.ansiBrightYellow": "#fce94f",
"terminal.ansiCyan": "#06989a",
"terminal.ansiGreen": "#4e9a06",
"terminal.ansiMagenta": "#75507b",
"terminal.ansiRed": "#cc0000",
"terminal.ansiWhite": "#d3d7cf",
"terminal.ansiYellow": "#c4a000",
"terminal.background": "#000000",
"terminal.foreground": "#ffffff",
// "terminalCursor.background":"#ffffff",
// "terminalCursor.foreground":"#ffffff",
},
"workbench.colorTheme": "One Dark Pro", // https://github.com/Binaryify/OneDark-Pro
"workbench.editorAssociations": {
"*.dd-md": "vscode.markdown.preview.editor",
"*.ipynb": "jupyter-notebook",
"*.pdf": "latex-workshop-pdf-hook",
},
"workbench.editor.decorations.badges": false,
"workbench.editor.decorations.colors": false,
"workbench.iconTheme": "material-icon-theme",
"workbench.tree.enableStickyScroll": true,
//
// File extension specific settings
//
"[c]": {
"editor.tabSize": 8,
},
"[dockerfile]": {
"editor.semanticHighlighting.enabled": false,
},
"[go]": {
"editor.tabSize": 4,
},
"[helm]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features",
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[markdown]": {
"editor.acceptSuggestionOnEnter": "smart",
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.formatOnPaste": true,
"editor.wordWrap": "off",
},
"[proto3]": {
"editor.defaultFormatter": "bufbuild.vscode-buf",
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.insertSpaces": true,
"editor.tabSize": 4,
},
"[ruby]": {
"editor.tabSize": 2,
},
"[terraform]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
},
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[yml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
//
// Extension settings
//
"auto-comment-blocks.hashStyleBlocks": [
"helm",
"starlark",
],
"auto-comment-blocks.singleLineBlockOnEnter": true,
"bazel.executable": "bzl",
"bazel.pathsToIgnore": [
// "k8s/.*",
],
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: WebKit, UseTab: ForIndentation, IndentWidth: 4, TabWidth: 4, ColumnLimit: 0, SpacesBeforeTrailingComments: 2, PointerAlignment: Right }", // https://clang.llvm.org/docs/ClangFormatStyleOptions.html
"C_Cpp.inlayHints.autoDeclarationTypes.enabled": true,
"clang-format": {
"style": "{ BasedOnStyle: Google, IndentWidth: 4 }", // Used by vscode-proto3
},
"cSpell.dictionaries": [
"cpp",
"docker",
"k8s",
],
"cSpell.enableFiletypes": [
"*",
],
"cSpell.language": "en-US,fr-FR",
"cSpell.languageSettings": [
{
"languageId": "*",
"caseSensitive": false,
}
],
"cSpell.userWords": [
"apiserver",
"aufs",
"ayaz",
"badouralix",
"badouraly",
"bazel",
"bazelisk",
"boto",
"cgroups",
"cloudops",
"cnab",
"datacenters",
"ddapp",
"dockerhub",
"excalidraw",
"govcloud",
"iperf",
"kubectx",
"kubekeeper",
"nodegroup",
"nodegroups",
"prototool",
"rabbitmq",
"rclone",
"rego",
"roadmap",
"runbooks",
"take-aways",
"targetgroup",
"thanos",
"timeseries",
"yolo",
],
"docker.languageserver.formatter.ignoreMultilineInstructions": true,
"errorLens.enabledDiagnosticLevels": [
"error",
],
"errorLens.removeLinebreaks": false,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"git.terminalAuthentication": false,
"github.copilot.enable": {
"*": false,
"bazel": true,
"go": true,
"helm": true,
"markdown": false,
"markdown_latex_combined": false,
"plaintext": false,
"python": true,
"rust": true,
"scminput": false,
"starlark": true,
"yaml": true,
},
"github.gitAuthentication": false,
"gitlens.blame.avatars": false,
"gitlens.blame.format": "${author|10} ${message|20?} ${agoOrDate|14-}",
"gitlens.blame.highlight.locations": [
"gutter",
],
"gitlens.codeLens.scopes": [
"document",
"containers",
],
"gitlens.heatmap.toggleMode": "window",
"gitlens.hovers.avatars": false,
"gitlens.hovers.currentLine.over": "line",
"gitlens.plusFeatures.enabled": false,
"gitlens.views.fileHistory.avatars": false,
"gitlens.views.lineHistory.avatars": false,
"gitlens.views.repositories.avatars": false,
// https://github.com/golang/vscode-go/blob/8c3683f/docs/settings.md
"go.buildOnSave": "package",
"go.buildTags": "dynamic",
"go.inlayHints.compositeLiteralFields": true,
"go.inlayHints.constantValues": true,
"go.inlayHints.functionTypeParameters": true,
"go.inlayHints.parameterNames": true,
"go.inlayHints.rangeVariableTypes": true,
"go.languageServerExperimentalFeatures": {
// Disable diagnostics, because they'll run on the entire repo.
// With them disabled, go vet will run on just the package.
// https://github.com/golang/vscode-go/issues/50
"diagnostics": false,
},
"go.formatTool": "gofumpt",
"go.testFlags": [
"--count=100",
"--cover",
],
"go.toolsEnvVars": {
"CGO_CFLAGS_ALLOW": "-ltcmalloc",
"CGO_CPPFLAGS": "-DLIBSTREAMING_TEST -I/opt/homebrew/opt/foundationdb-headers@6.2.30/include -I/opt/homebrew/opt/gperftools/include -I/opt/homebrew/opt/kafka-client/include -I/opt/homebrew/opt/libstreaming/include -I/opt/homebrew/opt/rocksdb@6.20.3/include",
"CGO_CXXFLAGS_ALLOW": "-lpthread|-ltcmalloc",
// "GO111MODULE": "on",
},
"go.vetFlags": [
// Must be installed manually with `go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow`
"--vettool=/Users/ayaz.badouraly/.go/bin/shadow",
],
"go.vetOnSave": "package",
"gopls": {
"build.directoryFilters": [
"-bazel-${workspaceFolderBasename}",
"-bazel-bin",
"-bazel-out",
"-bazel-testlogs",
],
"build.expandWorkspaceToModule": false,
"formatting.gofumpt": true,
// https://github.com/golang/vscode-go/wiki/settings#uicodelenses
"ui.codelenses": {
"gc_details": true,
},
"ui.diagnostic.analyses": {},
"ui.diagnostic.staticcheck": true,
// "verboseOutput": true,
},
"helm-intellisense.customValueFileNames": [
"ci/test-values.yaml",
"../common.yaml",
"values.yaml",
],
"helm-intellisense.lintFileOnSave": true, // Need to inject common.yaml first
"isort.args": [
"--line-length=120",
"--profile=black",
],
"javascript.inlayHints.enumMemberValues.enabled": true,
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"javascript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.parameterTypes.enabled": true,
"jupyter.interactiveWindow.textEditor.magicCommandsAsComments": true,
"markdown.extension.toc.levels": "2..6",
"material-icon-theme.files.associations": {
"WORKSPACE": "bazel",
},
"material-icon-theme.languages.associations": {
"helm": "helm",
},
"oneDarkPro.editorTheme": "VS Code",
"oneDarkPro.italic": false,
"oneDarkPro.markdownStyle": false,
"prolog.executablePath": "/opt/homebrew/bin/swipl",
"python.analysis.completeFunctionParens": true,
"python.analysis.typeCheckingMode": "basic",
"python.defaultInterpreterPath": "~/.pyenv/shims/python3",
"python.formatting.provider": "none",
"python.linting.flake8Args": [
// https://dev.to/ldsands/the-best-linter-for-black-in-vs-code-54a0
// https://www.flake8rules.com/
"--ignore=E203", // Whitespace before ':'
"--ignore=E266", // Too many leading '#' for block comment
"--ignore=E501", // Line too long (82 > 79 characters)
"--ignore=E731", // Do not assign a lambda expression, use a def
"--ignore=W503", // Line break occurred before a binary operator
"--max-complexity=18",
"--max-line-length=None",
"--select=B,C,E,F,W,T4,B9",
],
"python.linting.flake8Enabled": true,
"python.linting.mypyArgs": [
"--follow-imports=silent",
"--show-column-numbers",
"--no-pretty",
],
"python.linting.mypyEnabled": true,
"python.linting.pylintEnabled": false,
"python.venvFolders": [ // https://github.com/microsoft/vscode-python/issues/10004
".local/share/virtualenvs",
"Library/Caches/pypoetry/virtualenvs",
],
"redhat.telemetry.enabled": false,
"rust-analyzer.check.command": "clippy",
"shellcheck.ignorePatterns": {
"**/*.zsh": false,
"**/zshrc": false,
"**/*.zsh-theme": false,
"**/*.zunit": true,
},
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"XXX",
"[ ]"
],
"todo-tree.highlights.enabled": false,
"typescript.inlayHints.enumMemberValues.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterTypes.enabled": true,
"vim.disableExtension": false,
"vim.handleKeys": {
"<D-c>": false,
},
"vs-kubernetes": {
"disable-linters": [
"resource-limits",
],
// https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools/blob/6f519cd/src/yaml-support/schema-holder.ts#L65-L84
"vs-kubernetes.crd-code-completion": "disabled",
},
// "vim.useCtrlKeys": false,
"vsdocker.imageUser": "badouralix-local",
"yaml.customTags": [ // https://github.com/redhat-developer/vscode-yaml/issues/669#issuecomment-1136338006
"!And sequence",
"!Base64 scalar",
"!Cidr scalar",
"!Condition scalar",
"!Equals sequence",
"!FindInMap sequence",
"!GetAtt scalar",
"!GetAtt sequence",
"!GetAZs scalar",
"!If sequence",
"!ImportValue scalar",
"!Join sequence",
"!Not sequence",
"!Or sequence",
"!Ref scalar",
"!Select sequence",
"!Split sequence",
"!Sub scalar",
"!Transform mapping",
],
// redhat.vscode-yaml does not support yamllint config...
// https://github.com/redhat-developer/vscode-yaml/issues/433#issuecomment-846433158
"yaml.format.enable": false,
"yaml.schemas": {
"https://json.schemastore.org/yamllint": "deploy.yaml",
},
}
{
// See https://github.com/microsoft/vscode-python/pull/15006
"if": {
"prefix": "if",
"body": [
"if ${1:expression}:",
"\t${2:pass}"
],
"description": "Code snippet for an if statement"
},
"if/else": {
"prefix": "if/else",
"body": [
"if ${1:condition}:",
"\t${2:pass}",
"else:",
"\t${3:pass}"
],
"description": "Code snippet for an if statement with else"
},
"elif": {
"prefix": "elif",
"body": [
"elif ${1:expression}:",
"\t${2:pass}"
],
"description": "Code snippet for an elif"
},
"else": {
"prefix": "else",
"body": [
"else:",
"\t${1:pass}"
],
"description": "Code snippet for an else"
},
"while": {
"prefix": "while",
"body": [
"while ${1:expression}:",
"\t${2:pass}"
],
"description": "Code snippet for a while loop"
},
"while/else": {
"prefix": "while/else",
"body": [
"while ${1:expression}:",
"\t${2:pass}",
"else:",
"\t${3:pass}"
],
"description": "Code snippet for a while loop with else"
},
"for": {
"prefix": "for",
"body": [
"for ${1:target_list} in ${2:expression_list}:",
"\t${3:pass}"
],
"description": "Code snippet for a for loop"
},
"for/else": {
"prefix": "for/else",
"body": [
"for ${1:target_list} in ${2:expression_list}:",
"\t${3:pass}",
"else:",
"\t${4:pass}"
],
"description": "Code snippet for a for loop with else"
},
"try/except": {
"prefix": "try/except",
"body": [
"try:",
"\t${1:pass}",
"except ${2:expression} as ${3:identifier}:",
"\t${4:pass}"
],
"description": "Code snippet for a try/except statement"
},
"try/finally": {
"prefix": "try/finally",
"body": [
"try:",
"\t${1:pass}",
"finally:",
"\t${2:pass}"
],
"description": "Code snippet for a try/finally statement"
},
"try/except/else": {
"prefix": "try/except/else",
"body": [
"try:",
"\t${1:pass}",
"except ${2:expression} as ${3:identifier}:",
"\t${4:pass}",
"else:",
"\t${5:pass}"
],
"description": "Code snippet for a try/except/else statement"
},
"try/except/finally": {
"prefix": "try/except/finally",
"body": [
"try:",
"\t${1:pass}",
"except ${2:expression} as ${3:identifier}:",
"\t${4:pass}",
"finally:",
"\t${5:pass}"
],
"description": "Code snippet for a try/except/finally statement"
},
"try/except/else/finally": {
"prefix": "try/except/else/finally",
"body": [
"try:",
"\t${1:pass}",
"except ${2:expression} as ${3:identifier}:",
"\t${4:pass}",
"else:",
"\t${5:pass}",
"finally:",
"\t${6:pass}"
],
"description": "Code snippet for a try/except/else/finally statement"
},
"with": {
"prefix": "with",
"body": [
"with ${1:expression} as ${2:target}:",
"\t${3:pass}"
],
"description": "Code snippet for a with statement"
},
"def": {
"prefix": "def",
"body": [
"def ${1:funcname}(${2:parameter_list}):",
"\t\"\"\"",
"\t${3:docstring}",
"\t\"\"\"",
"\t${4:pass}"
],
"description": "Code snippet for a function definition"
},
"def(class method)": {
"prefix": "def(class method)",
"body": [
"def ${1:funcname}(self, ${2:parameter_list}):",
"\t\"\"\"",
"\t${3:docstring}",
"\t\"\"\"",
"\t${4:pass}"
],
"description": "Code snippet for a class method"
},
"def(static class method)": {
"prefix": "def(static class method)",
"body": [
"@staticmethod",
"def ${1:funcname}(${2:parameter_list}):",
"\t\"\"\"",
"\t${3:docstring}",
"\t\"\"\"",
"\t${4:pass}"
],
"description": "Code snippet for a static class method"
},
"def(abstract class method)": {
"prefix": "def(abstract class method)",
"body": [
"def ${1:funcname}(self, ${2:parameter_list}):",
"\t\"\"\"",
"\t${3:docstring}",
"\t\"\"\"",
"\traise NotImplementedError"
],
"description": "Code snippet for an abstract class method"
},
"class": {
"prefix": "class",
"body": [
"class ${1:classname}(${2:object}):",
"\t\"\"\"",
"\t${3:docstring}",
"\t\"\"\"",
"\t${4:pass}"
],
"description": "Code snippet for a class definition"
},
"lambda": {
"prefix": "lambda",
"body": [
"lambda ${1:parameter_list}: ${2:expression}"
],
"description": "Code snippet for a lambda statement"
},
"if(main)": {
"prefix": "__main__",
"body": [
"if __name__ == \"__main__\":",
" ${1:pass}"
],
"description": "Code snippet for a `if __name__ == \"__main__\": ...` block"
},
"async/def": {
"prefix": "async/def",
"body": [
"async def ${1:funcname}(${2:parameter_list}):",
"\t${3:pass}"
],
"description": "Code snippet for an async statement"
},
"async/for": {
"prefix": "async/for",
"body": [
"async for ${1:target} in ${2:iter}:",
"\t${3:block}"
],
"description": "Code snippet for an async for statement"
},
"async/for/else": {
"prefix": "async/for/else",
"body": [
"async for ${1:target} in ${2:iter}:",
"\t${3:block}",
"else:",
"\t${4:block}"
],
"description": "Code snippet for an async for statement with else"
},
"async/with": {
"prefix": "async/with",
"body": [
"async with ${1:expr} as ${2:var}:",
"\t${3:block}"
],
"description": "Code snippet for an async with statement"
},
"ipdb": {
"prefix": "ipdb",
"body": "import ipdb; ipdb.set_trace()",
"description": "Code snippet for ipdb debug"
},
"pdb": {
"prefix": "pdb",
"body": "import pdb; pdb.set_trace()",
"description": "Code snippet for pdb debug"
},
"pudb": {
"prefix": "pudb",
"body": "import pudb; pudb.set_trace()",
"description": "Code snippet for pudb debug"
},
"add/new/cell": {
"prefix": "add/new/cell",
"body": "# %%",
"description": "Code snippet to add a new cell"
},
"mark/markdown": {
"prefix": "mark/markdown",
"body": "# %% [markdown]",
"description": "Code snippet to add a new markdown cell"
}
}

Personal vscode settings

code --list-extensions | sort | pbcopy
cat $HOME/Library/Application\ Support/Code/User/keybindings.json | pbcopy
cat $HOME/Library/Application\ Support/Code/User/settings.json | pbcopy
diff <(cat $HOME/Library/Application\ Support/Code/User/settings.json) <(curl https://gist.githubusercontent.com/badouralix/f003f3dcec20f1660e8b132e1b76596b/raw/settings.json -s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment