Last active
November 24, 2021 09:02
-
-
Save manzanit0/68b31de0627c16cd1a6d6cf5843ee6c9 to your computer and use it in GitHub Desktop.
My personal VS Code configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# theming | |
code --install-extension emmanuelbeziat.vscode-great-icons | |
code --install-extension github.github-vscode-theme | |
# terminal | |
code --install-extension formulahendry.terminal | |
code --install-extension msamueltscott.maximizeterminal | |
# general stuff | |
code --install-extension vscodevim.vim | |
code --install-extension humao.rest-client | |
code --install-extension techer.open-in-browser | |
code --install-extension ms-azuretools.vscode-docker | |
code --install-extension ms-vsliveshare.vsliveshare | |
code --install-extension manzanit0.heroku-vscode | |
code --install-extension deamodio.gitlens | |
code --install-extension buenon.scratchpads | |
code --install-extension mtxr.sqltools | |
code --install-extension mtxr.sqltools-driver-pg | |
code --install-extension ms-vscode.sublime-keybindings | |
code --install-extension tomoki1207.pdf | |
# elixir | |
code --install-extension jakebecker.elixir-ls | |
code --install-extension saratravi.elixir-formatter | |
# dotnet | |
code --install-extension ms-dotnettools.csharp | |
code --install-extension austincummings.razor-plus | |
code --install-extension dms-vscode.js-debug-nightly | |
# js | |
code --install-extension dbaeumer.vscode-eslint | |
# go | |
code --install-extension golang.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
// As a note, some vim bindings are in settings.json | |
{ | |
"key": "ctrl+,", | |
"command": "terminal.toggle" | |
}, | |
{ | |
"key": "ctrl+alt+t", | |
"command": "-terminal.toggle" | |
}, | |
{ | |
"key": "cmd+k cmd+e", | |
"command": "workbench.view.explorer" | |
}, | |
{ | |
"key": "cmd+k cmd+v", | |
"command": "workbench.view.scm" | |
}, | |
{ | |
"key": "cmd+k cmd+d", | |
"command": "workbench.view.debug" | |
}, | |
{ | |
"key": "cmd+k cmd+x", | |
"command": "workbench.extensions.action.showInstalledExtensions" | |
}, | |
{ | |
"key": "cmd+e cmd+e", | |
"command": "workbench.action.focusActiveEditorGroup" | |
}, | |
{ | |
// Make it work just like vim | |
"key": "g q", | |
"command": "workbench.action.focusActiveEditorGroup", | |
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" | |
}, | |
{ | |
"key": "cmd+k cmd+k", | |
"command": "workbench.action.toggleZenMode" | |
}, | |
{ | |
"key": "ctrl+n", | |
"command": "explorer.newFile", | |
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" | |
}, | |
{ | |
"key": "shift+ctrl+n", | |
"command": "explorer.newFolder", | |
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" | |
}, | |
{ | |
"key": "cmd+r", | |
"command": "workbench.files.action.refreshFilesExplorer", | |
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" | |
}, | |
{ | |
"key": "ctrl+\\", | |
"command": "editor.action.goToReferences", | |
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "shift+f12", | |
"command": "-editor.action.goToReferences", | |
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "ctrl+shift+\\", | |
"command": "references-view.find", | |
"when": "editorHasReferenceProvider" | |
}, | |
{ | |
"key": "shift+alt+f12", | |
"command": "-references-view.find", | |
"when": "editorHasReferenceProvider" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "editor.action.showHover", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "cmd+k cmd+i", | |
"command": "-editor.action.showHover", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "meta+k meta+f", | |
"command": "workbench.action.findInFiles" | |
}, | |
{ | |
"key": "ctrl+shift+f", | |
"command": "-workbench.action.findInFiles" | |
}, | |
{ | |
"key": "shift+meta+f", | |
"command": "editor.action.startFindReplaceAction" | |
}, | |
{ | |
"key": "ctrl+h", | |
"command": "-editor.action.startFindReplaceAction" | |
}, | |
{ | |
"key": "meta+f", | |
"command": "actions.find" | |
}, | |
{ | |
"key": "ctrl+f", | |
"command": "-actions.find" | |
}, | |
{ | |
"key": "meta+,", | |
"command": "workbench.action.openSettings2" | |
}, | |
{ | |
"key": "meta+w", | |
"command": "workbench.action.closeActiveEditor" | |
}, | |
{ | |
"key": "ctrl+w", | |
"command": "-workbench.action.closeActiveEditor" | |
}, | |
{ | |
"key": "shift+meta+w", | |
"command": "workbench.action.reopenClosedEditor" | |
}, | |
{ | |
"key": "ctrl+shift+t", | |
"command": "-workbench.action.reopenClosedEditor" | |
}, | |
{ | |
"key": "meta+b", | |
"command": "workbench.action.toggleSidebarVisibility" | |
}, | |
{ | |
"key": "ctrl+b", | |
"command": "-workbench.action.toggleSidebarVisibility" | |
}, | |
{ | |
"key": "ctrl+;", | |
"command": "-maximizeterminal.maxTerm", | |
"when": "!activePanel" | |
}, | |
{ | |
"key": "ctrl+'", | |
"command": "workbench.action.tasks.runTask", | |
"args": "Test Function at Cursor", | |
"when": "editorLangId==elixir" | |
}, | |
{ | |
"key": "ctrl+n", | |
"command": "-workbench.action.files.newUntitledFile" | |
}, | |
{ | |
"key": "ctrl+'", | |
"command": "go.test.cursor", | |
"when": "editorLangId==go" | |
}, | |
{ | |
"key": "ctrl+alt+'", | |
"command": "go.test.file", | |
"when": "editorLangId==go" | |
}, | |
{ | |
"key": "ctrl+shift+'", | |
"command": "go.debug.cursor", | |
"when": "editorLangId==go" | |
}, | |
{ | |
"key": "ctrl+shift+t", | |
"command": "go.toggle.test.file", | |
"when": "editorLangId==go" | |
}, | |
// { | |
// "key": "shift+;", | |
// "command": "vim.showQuickpickCmdLine", | |
// "when": "editorTextFocus && vim.mode != 'Insert'" | |
// }, | |
/* | |
* All these ctrl+p modifications are to make the <C-p> and <C-n> vim mappings | |
* work when suggestion widgets appear, that is, cycling through menus. | |
*/ | |
{ | |
"key": "ctrl+p", | |
"command": "-workbench.action.quickOpen" | |
}, | |
{ | |
"key": "ctrl+p", | |
"command": "-workbench.action.quickOpenPreviousEditor" | |
}, | |
{ | |
"key": "ctrl+f", | |
"command": "workbench.action.quickOpen", | |
"when": "!inFilesPicker && !inQuickOpen && !suggestWidgetVisible && !terminalFocus" | |
}, | |
{ | |
"key": "ctrl+n", | |
"command": "workbench.action.quickOpenSelectNext", | |
"when": "inQuickOpen && !suggestWidgetVisible && !terminalFocus" | |
}, | |
{ | |
"key": "ctrl+p", | |
"command": "workbench.action.quickOpenSelectPrevious", | |
"when": "inQuickOpen && !suggestWidgetVisible && !terminalFocus" | |
}, | |
{ | |
"key": "ctrl+alt+,", | |
"command": "workbench.action.toggleMaximizedPanel" | |
}, | |
/* | |
* Have <C-K> and <C-J> work for cycling through menus too, for better | |
* ergonomics. | |
*/ | |
{ | |
"key": "ctrl+k", | |
"command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "workbench.action.quickOpenSelectPrevious", | |
"when": "inQuickOpen && !suggestWidgetVisible && !terminalFocus" | |
}, | |
{ | |
"key": "ctrl+j", | |
"command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "ctrl+j", | |
"command": "workbench.action.quickOpenSelectNext", | |
"when": "inQuickOpen && !suggestWidgetVisible && !terminalFocus" | |
}, | |
/* | |
* Force explorer to behave in macos just like in linux: | |
* <enter> -> open w/ focus | |
* <f2> -> rename | |
*/ | |
{ | |
"key": "enter", | |
"command": "explorer.openAndPassFocus", | |
"when": "explorerViewletFocus && explorerViewletVisible && !explorerResourceIsFolder && !inputFocus" | |
}, | |
{ | |
"key": "cmd+down", | |
"command": "-explorer.openAndPassFocus", | |
"when": "explorerViewletFocus && explorerViewletVisible && !explorerResourceIsFolder && !inputFocus" | |
}, | |
{ | |
"key": "f2", | |
"command": "renameFile", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
}, | |
{ | |
"key": "enter", | |
"command": "-renameFile", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
}, | |
{ | |
"key": "cmd+p", | |
"command": "workbench.action.quickOpen" | |
}, | |
{ | |
"key": "cmd+p", | |
"command": "-workbench.action.quickOpen" | |
}, | |
{ | |
"key": "shift+cmd+p", | |
"command": "workbench.action.showCommands" | |
}, | |
{ | |
"key": "shift+cmd+p", | |
"command": "-workbench.action.showCommands" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Editor | |
"editor.emptySelectionClipboard": false, | |
"editor.formatOnPaste": true, | |
"editor.quickSuggestionsDelay": 0, | |
"editor.formatOnSave": true, | |
"editor.minimap.enabled": false, | |
"editor.lineNumbers": "on", | |
"editor.linkedEditing": true, | |
"editor.snippetSuggestions": "top", | |
// Fonts | |
// https://www.jetbrains.com/lp/mono/#how-to-install | |
"editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 13, | |
"editor.letterSpacing": 1.2, | |
// "editor.fontWeight": "200", | |
// "editor.lineHeight": 22, | |
// Workbench | |
"workbench.colorTheme": "GitHub Dark", | |
"workbench.iconTheme": "vscode-great-icons", | |
"workbench.startupEditor": "newUntitledFile", | |
"workbench.sideBar.location": "right", | |
// Explorer | |
"explorer.confirmDelete": false, | |
"explorer.openEditors.visible": 0, | |
"explorer.decorations.badges": false, | |
"explorer.confirmDragAndDrop": false, | |
// Other fiddly bits | |
"window.newWindowDimensions": "offset", | |
"files.trimTrailingWhitespace": true, | |
"files.trimFinalNewlines": true, | |
"breadcrumbs.enabled": false, | |
"git.autofetch": true, | |
"terminal.integrated.fontSize": 14, | |
"zenMode.fullScreen": false, | |
"diffEditor.renderSideBySide": false, | |
"diffEditor.ignoreTrimWhitespace": false, | |
"csharp.referencesCodeLens.enabled": false, | |
"extensions.ignoreRecommendations": false, | |
"output.smartScroll.enabled": false, | |
"settingsSync.keybindingsPerPlatform": false, | |
"search.exclude": { | |
"**/_build": true, | |
"**/.elixir-ls": true, | |
"**/bower_components": true, | |
"**/deps": true, | |
"**/node_modules": true | |
}, | |
"files.watcherExclude": { | |
"**/.bloop": true, | |
"**/.metals": true, | |
"**/.ammonite": true | |
}, | |
"files.exclude": { | |
"**/.classpath": true, | |
"**/.project": true, | |
"**/.settings": true, | |
"**/.factorypath": true | |
}, | |
"auto-correct.dictionary": [ | |
{ | |
"languages": ["*"], | |
"words": { | |
"hte": "the", | |
"mispell": "misspell", | |
"mispelled": "misspelled", | |
"{despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or}": "{despe,sepa}rat{}", | |
"fpp": "|>" | |
}, | |
"useLargeList": false | |
} | |
], | |
// Vim extension | |
"vim.leader": ";", | |
"vim.hlsearch": true, | |
"vim.foldfix": true, | |
"vim.useSystemClipboard": true, | |
"vim.highlightedyank.enable": true, | |
"vim.searchHighlightColor": "rgba(250, 240, 170, 0.5)", | |
"vim.normalModeKeyBindings": [ | |
// Core editor actions | |
{ | |
"before": ["-"], | |
"commands": ["workbench.view.explorer"] | |
}, | |
{ | |
"before": ["<leader>", "c"], | |
"commands": ["workbench.action.findInFiles"] | |
}, | |
{ | |
"before": ["<leader>", "s"], | |
"commands": ["workbench.action.quickOpen"] | |
}, | |
{ | |
"before": ["<leader>", "d"], | |
"commands": ["workbench.action.showCommands"] | |
}, | |
{ | |
"before": ["<leader>", "f"], | |
"commands": ["actions.find"] | |
}, | |
{ | |
"before": ["<leader>", "r"], | |
"commands": ["editor.action.startFindReplaceAction"] | |
}, | |
{ | |
"before": ["<leader>", "b"], | |
"commands": ["workbench.action.toggleSidebarVisibility"] | |
}, | |
{ | |
"before": ["<leader>", "q"], | |
"commands": ["workbench.action.closeActiveEditor"] | |
}, | |
{ | |
"before": ["<leader>", "w"], | |
"commands": ["workbench.action.files.save"] | |
}, | |
{ | |
"before": ["<leader>", "c", "f"], | |
"commands": ["copyRelativeFilePath"] | |
}, | |
{ | |
"before": ["<C-L>"], | |
"commands": [":nohlsearch"] | |
}, | |
// Code navigation | |
{ | |
"before": ["g", "y"], | |
"commands": ["editor.action.revealDefinition"] | |
}, | |
{ | |
"before": ["g", "u"], | |
"commands": ["editor.action.goToImplementation"] | |
}, | |
{ | |
"before": ["g", "o"], | |
"commands": ["editor.action.goToReferences"] | |
}, | |
{ | |
"before": ["g", "k"], | |
"commands": ["editor.action.showHover"] | |
}, | |
{ | |
"before": ["g", "b"], | |
"commands": ["extension.vim_ctrl+t"] | |
}, | |
// Code actions | |
{ | |
"before": ["f", "i"], | |
"commands": ["editor.action.quickFix"] | |
}, | |
{ | |
"before": ["f", "s"], | |
"commands": ["editor.action.insertSnippet"] | |
}, | |
{ | |
"before": ["f", "f"], | |
"commands": ["editor.action.formatDocument"] | |
}, | |
{ | |
"before": ["f", "r"], | |
"commands": ["editor.action.startFindReplaceAction"] | |
}, | |
// Git helpers | |
{ | |
"before": ["<leader>", "g", "g"], | |
"commands": ["workbench.view.scm"] | |
}, | |
{ | |
"before": ["<leader>", "g", "c"], | |
"commands": ["git.commit"] | |
}, | |
{ | |
"before": ["<leader>", "g", "s"], | |
"commands": ["git.stageAll"] | |
} | |
], | |
"vim.visualModeKeyBindings": [ | |
{ | |
"before": ["<leader>", "d"], | |
"commands": ["workbench.action.showCommands"] | |
}, | |
{ | |
"before": ["f", "r"], | |
"commands": ["editor.action.startFindReplaceAction"] | |
}, | |
{ | |
"before": ["<leader>", "f"], | |
"commands": ["actions.find"] | |
}, | |
{ | |
"before": ["<leader>", "r"], | |
"commands": ["editor.action.startFindReplaceAction"] | |
}, | |
{ | |
"before": ["<leader>", "c"], | |
"commands": ["workbench.action.findInFiles"] | |
}, | |
// Git Helpers | |
{ | |
"before": ["<leader>", "g", "s"], | |
"commands": ["git.stageSelectedRanges"] | |
}, | |
{ | |
"before": ["<leader>", "g", "s", "s"], | |
"commands": ["git.revertSelectedRanges"] | |
} | |
], | |
// Language-specific configuration | |
"typescript.updateImportsOnFileMove.enabled": "always", | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"sqltools.useNodeRuntime": true, | |
"sqltools.connections": [], | |
"go.lintOnSave": "file", | |
"go.lintTool": "golangci-lint", | |
"go.useLanguageServer": true, | |
"elixirLS.fetchDeps": false, | |
"elixirLS.suggestSpecs": false, | |
"[elixir]": { | |
"editor.defaultFormatter": "JakeBecker.elixir-ls" | |
}, | |
"[sql]": { | |
"editor.formatOnSave": false | |
}, | |
"gitlens.mode.active": "review", | |
"[dockerfile]": { | |
"editor.defaultFormatter": "ms-azuretools.vscode-docker" | |
}, | |
"[html]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[scss]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[css]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "vscode.json-language-features" | |
}, | |
"[jsonc]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[typescript]": { | |
"editor.defaultFormatter": "denoland.vscode-deno" | |
}, | |
"[javascript]": { | |
"editor.defaultFormatter": "vscode.typescript-language-features" | |
}, | |
"[html-eex]": { | |
"editor.defaultFormatter": "RoyalMist.vscode-eex-format" | |
}, | |
"emmet.includeLanguages": { | |
"ex": "html", | |
"html-eex": "html", | |
"javascriptreact": "html", | |
"javascript": "html" | |
}, | |
"jest.autoRun": "off", | |
"intelephense.environment.phpVersion": "7.4.0", | |
"intelephense.telemetry.enabled": false, | |
"workbench.statusBar.visible": false, | |
"security.workspace.trust.untrustedFiles": "open" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment