diff options
author | Chris <[email protected]> | 2021-03-22 22:09:11 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-22 22:09:11 -0400 |
commit | 544b67d80a8ec783dd30e396ea9f7a7d08415c0a (patch) | |
tree | ba5828f2ea4f75b13df4749d6da1b286859e26df | |
parent | 3c07627b4d3111f0a10b4883c3b16b241ff7c1b8 (diff) |
better vscode support
-rw-r--r-- | README.md | 33 | ||||
-rw-r--r-- | init.lua | 108 | ||||
-rw-r--r-- | spell/en.utf-8.add | 33 | ||||
-rw-r--r-- | spell/en.utf-8.add.spl | bin | 341 -> 0 bytes | |||
-rw-r--r-- | utils/vscode_config/keybindings.json | 171 | ||||
-rw-r--r-- | utils/vscode_config/settings.json | 1128 | ||||
-rw-r--r-- | vimscript/nv-vscode/init.vim | 14 |
7 files changed, 1379 insertions, 108 deletions
@@ -1,6 +1,5 @@  -  If you are looking for my old configs checkout the two snapshot branches @@ -23,16 +22,18 @@ sudo rm -r neovim After installing the [Neovim extension](https://github.com/asvetliakov/vscode-neovim) in VSCode -I recommend using this alongside the VSCode which-key extension +I recommend using this alongside the VSCode +[which-key](https://github.com/VSpaceCode/vscode-which-key) extension -Along with some of my config files you can find in utils/vscode\_config +You will also need `settings.json` and `keybindings.json` which can be +found in utils/vscode\_config Point the nvim path to your `nvim` binary -Point your `init.lua` path to: +Point your `init.vim` path to: ``` vim -$HOME/.config/nvim/lua/nv-vscode/init.lua +$HOME/.config/nvim/vimscript/nv-vscode/init.vim ``` ## Clipboard Support @@ -138,24 +139,26 @@ git config --global github.user <username> If you are looking for snippets checkout this github topic: [Snippet Topic](https://github.com/topics/vscode-snippets) +## De-bugging + +To set up your particular debugger, look here: +[link](https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation) + ## TODO **HIGH PRIORITY** -- learn nvim-dap in depth +- better install script, simple install just support `~/.config/nvim` + path + +**LOW PRIORITY** + - Implement what I can from this java config: [link](https://github.com/mfussenegger/nvim-jdtls/wiki/Sample-Configurations) - better ui for code actions - formatting - setup junit tests for java -- neovim light-bulb config -- better vscode support - - -**LOW PRIORITY** - - look into auto-install lsp - json config file (luajson) -- better install script, support both nvim and nvcode paths - get logo - look into emmet-ls - toggle virtual text diagnostics @@ -171,7 +174,5 @@ Topic](https://github.com/topics/vscode-snippets) **PLUGIN BUGS** - finding files from dashboard sometimes number not set -- spell not activated in readme Markdown -- better auto-import -- can't find global binary for markdown-lint +- better auto-import (jsx) - keep and eye on indent guides plugin for thin lines @@ -1,61 +1,55 @@ --- vim.cmd('set rtp+=~/.config/nvcode') -if vim.g.vscode then - vim.cmd('source ~/.config/nvim/vimscript/nv-vscode/init.vim') - require('settings') - require('nv-quickscope') -else - -- General mappings - require('plugins') - require('nv-utils') - require('settings') - require('keymappings') - require('colorscheme') - require('nv-galaxyline') +-- General mappings +require('plugins') +require('nv-utils') +require('settings') +require('keymappings') +require('colorscheme') +require('nv-galaxyline') - -- Plugins - require('nv-compe') - require('nv-colorizer') - require('nv-nvimtree') - require('nv-treesitter') - require('nv-barbar') - require('nv-emmet') - require('nv-quickscope') - require('nv-gitsigns') - require('nv-nvim-autopairs') - require('nv-illuminate') - require('nv-neogit') - require('nv-comment') - require('nv-rnvimr') - require('nv-telescope') - require('nv-floaterm') - require('nv-vim-rooter') - require('nv-matchup') - require('nv-lspkind') - require('nv-hop') - require('nv-gitblame') - require('nv-nvim-peekup') - require('nv-dashboard') - require('nv-dial') +-- Plugins +require('nv-compe') +require('nv-colorizer') +require('nv-nvimtree') +require('nv-treesitter') +require('nv-barbar') +require('nv-emmet') +require('nv-quickscope') +require('nv-gitsigns') +require('nv-nvim-autopairs') +require('nv-illuminate') +require('nv-neogit') +require('nv-comment') +require('nv-rnvimr') +require('nv-telescope') +require('nv-floaterm') +require('nv-vim-rooter') +require('nv-matchup') +require('nv-lspkind') +require('nv-hop') +require('nv-gitblame') +require('nv-nvim-peekup') +require('nv-dashboard') +require('nv-dial') +require('nv-nvim-dap') +require('nv-lightbulb') - -- Which Key (Hope to replace with Lua plugin someday) - vim.cmd('source ~/.config/nvim/vimscript/nv-whichkey/init.vim') - vim.cmd('source ~/.config/nvim/vimscript/functions.vim') - - -- LSP - require('lsp') - require('lsp.lua-ls') - require('lsp.bash-ls') - require('lsp.js-ts-ls') - require('lsp.python-ls') - require('lsp.json-ls') - require('lsp.yaml-ls') - require('lsp.vim-ls') - require('lsp.graphql-ls') - require('lsp.css-ls') - require('lsp.docker-ls') - require('lsp.html-ls') - require('lsp.efm-general-ls') - require('lsp.virtual_text') -end +-- Which Key (Hope to replace with Lua plugin someday) +vim.cmd('source ~/.config/nvim/vimscript/nv-whichkey/init.vim') +vim.cmd('source ~/.config/nvim/vimscript/functions.vim') +-- LSP +require('lsp') +require('lsp.lua-ls') +require('lsp.bash-ls') +require('lsp.js-ts-ls') +require('lsp.python-ls') +require('lsp.json-ls') +require('lsp.yaml-ls') +require('lsp.vim-ls') +require('lsp.graphql-ls') +require('lsp.css-ls') +require('lsp.docker-ls') +require('lsp.html-ls') +require('lsp.efm-general-ls') +require('lsp.virtual_text') diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add deleted file mode 100644 index 8ab6b0eb..00000000 --- a/spell/en.utf-8.add +++ /dev/null @@ -1,33 +0,0 @@ -Lua -Yaml -Json -Javascript -CSS -github -TODO -nvim -dap -java -config -junit -ui -neovim -vscode -lsp -json -luajson -nvcode -emmet -neogit -kshenoy -PLUGIN -readme -plugin -VSCode -utils -Ubuntu -efm -NVCode -repo -CoC -configs diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl Binary files differdeleted file mode 100644 index 7cbee471..00000000 --- a/spell/en.utf-8.add.spl +++ /dev/null diff --git a/utils/vscode_config/keybindings.json b/utils/vscode_config/keybindings.json new file mode 100644 index 00000000..49e0f45c --- /dev/null +++ b/utils/vscode_config/keybindings.json @@ -0,0 +1,171 @@ +[ + { + "key": "shift+ctrl+e", + "command": "actions.findWithSelection" + }, + { + "key": "ctrl+e", + "command": "-actions.findWithSelection" + }, + { + "key": "ctrl+e", + "command": "workbench.view.explorer" + }, + { + "key": "shift+ctrl+e", + "command": "-workbench.view.explorer" + }, + { + "key": "r", + "command": "renameFile", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "enter", + "command": "-renameFile", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "j", + "command": "list.focusDown", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "k", + "command": "list.focusUp", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "ctrl+j", + "command": "selectNextSuggestion", + "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" + }, + { + "key": "ctrl+k", + "command": "selectPrevSuggestion", + "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" + }, + { + "key": "ctrl+j", + "command": "workbench.action.quickOpenNavigateNext", + "when": "inQuickOpen" + }, + { + "key": "tab", + "command": "selectNextSuggestion", + "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" + }, + { + "key": "tab", + "command": "workbench.action.quickOpenNavigateNext", + "when": "inQuickOpen" + }, + { + "key": "shift+tab", + "command": "selectPrevSuggestion", + "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" + }, + { + "key": "shift+tab", + "command": "workbench.action.quickOpenNavigatePrevious", + "when": "inQuickOpen" + }, + { + "key": "ctrl+k", + "command": "workbench.action.quickOpenNavigatePrevious", + "when": "inQuickOpen" + }, + { + "key": "enter", + "command": "list.select", + "when": "explorerViewletVisible && filesExplorerFocus" + }, + { + "key": "l", + "command": "list.select", + "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" + }, + { + "key": "o", + "command": "list.toggleExpand", + "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" + }, + { + "key": "h", + "command": "list.collapse", + "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus" + }, + { + "key": "a", + "command": "explorer.newFile", + "when": "filesExplorerFocus && !inputFocus" + }, + { + "key": "shift+a", + "command": "explorer.newFolder", + "when": "filesExplorerFocus && !inputFocus" + }, + { + "key": "shift+;", + "command": "insertPrevSuggestion", + "when": "hasOtherSuggestions && textInputFocus && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'" + }, + { + "key": "ctrl+l", + "when": "sideBarFocus", + "command": "workbench.action.focusActiveEditorGroup" + }, + { + "key": "ctrl+k", + "command": "workbench.action.focusActiveEditorGroup", + "when": "terminalFocus" + }, + { + "key": "ctrl+shift+t", + "command": "workbench.action.terminal.focus", + "when": "!terminalFocus" + }, + { + "key": "ctrl+j", + "command": "-editor.action.insertLineAfter", + "when": "editorTextFocus && neovim.ctrlKeysInsert && !neovim.recording && neovim.mode == 'insert'" + }, + { + "key": "alt+j", + "command": "workbench.action.terminal.focus", + "when": "!terminalFocus" + }, + { + "key": "ctrl+shift+t", + "command": "workbench.action.togglePanel" + }, + { + "key": "ctrl+j", + "command": "-workbench.action.togglePanel" + }, + { + "key": "shift+k", + "command": "editor.action.showHover", + "when": "editorTextFocus && neovim.mode != 'insert'" + }, + { + "key": "ctrl+k ctrl+i", + "command": "-editor.action.showHover", + "when": "editorTextFocus" + }, + { + "key": "shift+tab", + "command": "-acceptAlternativeSelectedSuggestion", + "when": "suggestWidgetVisible && textInputFocus && textInputFocus" + }, + { + "key": "ctrl+f", + "command": "-vscode-neovim.ctrl-f", + "when": "editorTextFocus && neovim.ctrlKeysNormal && neovim.init && neovim.mode != 'insert'" + }, + { + "key": "space", + "command": "whichkey.show", + "when": "neovim.mode != 'insert'" + } +] diff --git a/utils/vscode_config/settings.json b/utils/vscode_config/settings.json new file mode 100644 index 00000000..6cda41d3 --- /dev/null +++ b/utils/vscode_config/settings.json @@ -0,0 +1,1128 @@ +{ + "vscode-neovim.neovimExecutablePaths.darwin": "/usr/local/bin/nvim", + "vscode-neovim.neovimExecutablePaths.linux": "/usr/local/bin/nvim", + "vscode-neovim.neovimInitVimPaths.darwin": "$HOME/.config/nvim/vimscript/nv-vscode/init.vim", + "vscode-neovim.neovimInitVimPaths.linux": "$HOME/.config/nvim/vimscript/nv-vscode/init.vim", + "whichkey.sortOrder": "alphabetically", + "whichkey.delay": 0, + "whichkey.bindings": [ + { + "key": ";", + "name": "commands", + "type": "command", + "command": "workbench.action.showCommands" + }, + { + "key": "/", + "name": "comment", + "type": "command", + "command": "vscode-neovim.send", + "args": "<C-/>" + }, + { + "key": "?", + "name": "View All References", + "type": "command", + "command": "references-view.find", + "when": "editorHasReferenceProvider" + }, + { + "key": "b", + "name": "Buffers/Editors...", + "type": "bindings", + "bindings": [ + { + "key": "b", + "name": "Show all buffers/editors", + "type": "command", + "command": "workbench.action.showAllEditors" + }, + { + "key": "d", + "name": "Close active editor", + "type": "command", + "command": "workbench.action.closeActiveEditor" + }, + { + "key": "h", + "name": "Move editor into left group", + "type": "command", + "command": "workbench.action.moveEditorToLeftGroup" + }, + { + "key": "j", + "name": "Move editor into below group", + "type": "command", + "command": "workbench.action.moveEditorToBelowGroup" + }, + { + "key": "k", + "name": "Move editor into above group", + "type": "command", + "command": "workbench.action.moveEditorToAboveGroup" + }, + { + "key": "l", + "name": "Move editor into right group", + "type": "command", + "command": "workbench.action.moveEditorToRightGroup" + }, + { + "key": "m", + "name": "Close other editors", + "type": "command", + "command": "workbench.action.closeOtherEditors" + }, + { + "key": "n", + "name": "Next editor", + "type": "command", + "command": "workbench.action.nextEditor" + }, + { + "key": "p", + "name": "Previous editor", + "type": "command", + "command": "workbench.action.previousEditor" + }, + { + "key": "N", + "name": "New untitled editor", + "type": "command", + "command": "workbench.action.files.newUntitledFile" + }, + { + "key": "u", + "name": "Reopen closed editor", + "type": "command", + "command": "workbench.action.reopenClosedEditor" + }, + { + "key": "y", + "name": "Copy buffer to clipboard", + "type": "commands", + "commands": [ + "editor.action.selectAll", + "editor.action.clipboardCopyAction", + "cancelSelection" + ] + } + ] + }, + { + "key": "d", + "name": "Debug...", + "type": "bindings", + "bindings": [ + { + "key": "d", + "name": "Start debug", + "type": "command", + "command": "workbench.action.debug.start" + }, + { + "key": "S", + "name": "Stop debug", + "type": "command", + "command": "workbench.action.debug.stop" + }, + { + "key": "c", + "name": "Continue debug", + "type": "command", + "command": "workbench.action.debug.continue" + }, + { + "key": "p", + "name": "Pause debug", + "type": "command", + "command": "workbench.action.debug.pause" + }, + { + "key": "r", + "name": "Run without debugging", + "type": "command", + "command": "workbench.action.debug.run" + }, + { + "key": "R", + "name": "Restart ebug", + "type": "command", + "command": "workbench.action.debug.restart" + }, + { + "key": "i", + "name": "Step into", + "type": "command", + "command": "workbench.action.debug.stepInto" + }, + { + "key": "s", + "name": "Step over", + "type": "command", + "command": "workbench.action.debug.stepOver" + }, + { + "key": "o", + "name": "Step out", + "type": "command", + "command": "workbench.action.debug.stepOut" + }, + { + "key": "b", + "name": "Toggle breakpoint", + "type": "command", + "command": "editor.debug.action.toggleBreakpoint" + }, + { + "key": "B", + "name": "Toggle inline breakpoint", + "type": "command", + "command": "editor.debug.action.toggleInlineBreakpoint" + }, + { + "key": "j", + "name": "Jump to cursor", + "type": "command", + "command": "debug.jumpToCursor" + }, + { + "key": "v", + "name": "REPL", + "type": "command", + "command": "workbench.debug.action.toggleRepl" + }, + { + "key": "w", + "name": "Focus on watch window", + "type": "command", + "command": "workbench.debug.action.focusWatchView" + }, + { + "key": "W", + "name": "Add to watch", + "type": "command", + "command": "editor.debug.action.selectionToWatch" + } + ] + }, + { + "key": "e", + "name": "Toggle Explorer", + "type": "command", + "command": "workbench.action.toggleSidebarVisibility" + }, + { + "key": "f", + "name": "Find & Replace...", + "type": "bindings", + "bindings": [ + { + "key": "f", + "name": "File", + "type": "command", + "command": "editor.action.startFindReplaceAction" + }, + { + "key": "s", + "name": "Symbol", + "type": "command", + "command": "editor.action.rename", + "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "p", + "name": "Project", + "type": "command", + "command": "workbench.action.replaceInFiles" + } + ] + }, + { + "key": "g", + "name": "Git...", + "type": "bindings", + "bindings": [ + { + "key": "/", + "name": "Search Commits", + "command": "gitlens.showCommitSearch", + "type": "command", + "when": "gitlens:enabled && config.gitlens.keymap == 'alternate'" + }, + { + "key": "a", + "name": "Stage", + "type": "command", + "command": "git.stage" + }, + { + "key": "b", + "name": "Checkout", + "type": "command", + "command": "git.checkout" + }, + { + "key": "B", + "name": "Browse", + "type": "command", + "command": "gitlens.openFileInRemote" + }, + { + "key": "c", + "name": "Commit", + "type": "command", + "command": "git.commit" + }, + { + "key": "C", + "name": "Cherry Pick", + "type": "command", + "command": "gitlens.views.cherryPick" + }, + { + "key": "d", + "name": "Delete Branch", + "type": "command", + "command": "git.deleteBranch" + }, + { + "key": "f", + "name": "Fetch", + "type": "command", + "command": "git.fetch" + }, + { + "key": "F", + "name": "Pull From", + "type": "command", + "command": "git.pullFrom" + }, + { + "key": "g", + "name": "Graph", + "type": "command", + "command": "git-graph.view" + }, + { + "key": "h", + "name": "Heatmap", + "type": "command", + "command": "gitlens.toggleFileHeatmap" + }, + { + "key": "H", + "name": "History", + "type": "command", + "command": "git.viewFileHistory" + }, + { + "key": "i", + "name": "Init", + "type": "command", + "command": "git.init" + }, + { + "key": "j", + "name": "Next Change", + "type": "command", + "command": "workbench.action.editor.nextChange" + }, + { + "key": "k", + "name": "Previous Change", + "type": "command", + "command": "workbench.action.editor.previousChange" + }, + { + "key": "l", + "name": "Toggle Line Blame", + "type": "command", + "command": "gitlens.toggleLineBlame", + "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'alternate'" + }, + { + "key": "L", + "name": "Toggle GitLens", + "type": "command", + "command": "gitlens.toggleCodeLens", + "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'alternate'" + }, + { + "key": "m", + "name": "Merge", + "type": "command", + "command": "git.merge" + }, + { + "key": "p", + "name": "Push", + "type": "command", + "command": "git.push" + }, + { + "key": "P", + "name": "Push", + "type": "command", + "command": "git.pull" + }, + { + "key": "s", + "name": "Stash", + "type": "command", + "command": "workbench.view.scm" + }, + { + "key": "S", + "name": "Status", + "type": "command", + "command": "gitlens.showQuickRepoStatus", + "when": "gitlens:enabled && config.gitlens.keymap == 'alternate'" + }, + { + "key": "t", + "name": "Create Tag", + "type": "command", + "command": "git.createTag" + }, + { + "key": "T", + "name": "Delete Tag", + "type": "command", + "command": "git.deleteTag" + }, + { + "key": "U", + "name": "Unstage", + "type": "command", + "command": "git.unstage" + } + ] + }, + { + "key": "h", + "name": "Split Horizontal", + "type": "command", + "command": "workbench.action.splitEditorDown" + }, + { + "key": "i", + "name": "Insert...", + "type": "bindings", + "bindings": [ + { + "key": "j", + "name": "Insert line below", + "type": "command", + "command": "editor.action.insertLineAfter" + }, + { + "key": "k", + "name": "Insert line above", + "type": "command", + "command": "editor.action.insertLineBefore" + }, + { + "key": "s", + "name": "Insert snippet", + "type": "command", + "command": "editor.action.insertSnippet" + } + ] + }, + { + "key": "l", + "name": "LSP...", + "type": "bindings", + "bindings": [ + { + "key": ";", + "name": "Refactor", + "type": "command", + "command": "editor.action.refactor", + "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "a", + "name": "Auto Fix", + "type": "command", + "command": "editor.action.autoFix", + "when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)quickfix\\b/" + }, + { + "key": "d", + "name": "Definition", + "type": "command", + "command": "editor.action.revealDefinition", + "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" + }, + { + "key": "D", + "name": "Declaration", + "type": "command", + "command": "editor.action.revealDeclaration" + }, + { + "key": "e", + "name": "Errors", + "type": "command", + "command": "workbench.actions.view.problems" + }, + { + "key": "f", + "name": "Format", + "type": "command", + "command": "editor.action.formatDocument", + "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" + }, + { + "key": "i", + "name": "Implementation", + "type": "command", + "command": "editor.action.goToImplementation", + "when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor" + }, + { + "key": "l", + "name": "Code Lens", + "type": "command", + "command": "codelens.showLensesInCurrentLine" + }, + { + "key": "n", + "name": "Next Problem", + "type": "command", + "command": "editor.action.marker.next", + "when": "editorFocus" + }, + { + "key": "N", + "name": "Next Problem (Proj)", + "type": "command", + "command": "editor.action.marker.nextInFiles", + "when": "editorFocus" + }, + { + "key": "o", + "name": "Outline", + "type": "command", + "command": "outline.focus" + }, + { + "key": "p", + "name": "Prev Problem", + "type": "command", + "command": "editor.action.marker.prevInFiles", + "when": "editorFocus" + }, + { + "key": "P", + "name": "Prev Problem (Proj)", + "type": "command", + "command": "editor.action.marker.prev", + "when": "editorFocus" + }, + { + "key": "q", + "name": "Quick Fix", + "type": "command", + "command": "editor.action.quickFix", + "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "r", + "name": "References", + "type": "command", + "command": "editor.action.goToReferences", + "when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" + }, + { + "key": "R", + "name": "Rename", + "type": "command", + "command": "editor.action.rename", + "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "v", + "name": "View All References", + "type": "command", + "command": "references-view.find", + "when": "editorHasReferenceProvider" + }, + { + "key": "s", + "name": "Go To Symbol", + "type": "command", + "command": "workbench.action.gotoSymbol" + }, + { + "key": "S", + "name": "Show All Symbols", + "type": "command", + "command": "workbench.action.showAllSymbols" + } + ] + }, + { + "key": "m", + "name": "Mark...", + "type": "bindings", + "bindings": [ + { + "key": "c", + "name": "Clear Bookmarks", + "type": "command", + "command": "bookmarks.clear" + }, + { + "key": "j", + "name": "Next Bookmark", + "type": "command", + "command": "bookmarks.jumpToNext", + "when": "editorTextFocus" + }, + { + "key": "k", + "name": "Previous Bookmark", + "type": "command", + "command": "bookmarks.jumpToPrevious", + "when": "editorTextFocus" + }, + { + "key": "l", + "name": "List Bookmarks", + "type": "command", + "command": "bookmarks.listFromAllFiles", + "when": "editorTextFocus" + }, + { + "key": "r", + "name": "Refresh Bookmarks", + "type": "command", + "command": "bookmarks.refresh" + }, + { + "key": "t", + "name": "Toggle Bookmark", + "type": "command", + "command": "bookmarks.toggle", + "when": "editorTextFocus" + }, + { + "key": "s", + "name": "Show Bookmarks", + "type": "command", + "command": "workbench.view.extension.bookmarks" + } + ] + }, + { + "key": "M", + "name": "Minimap", + "type": "command", + "command": "editor.action.toggleMinimap" + }, + { + "key": "n", + "name": "No Highlight", + "type": "command", + "command": "vscode-neovim.send", + "args": ":noh<CR>" + }, + { + "key": "o", + "name": "Open...", + "type": "bindings", + "bindings": [ + { + "key": "d", + "name": "Directory", + "type": "command", + "command": "workbench.action.files.openFolder" + }, + { + "key": "r", + "name": "Recent", + "type": "command", + "command": "workbench.action.openRecent" + }, + { + "key": "f", + "name": "File", + "type": "command", + "command": "workbench.action.files.openFile" + } + ] + }, + { + "key": "p", + "name": "Peek...", + "type": "bindings", + "bindings": [ + { + "key": "d", + "name": "Definition", + "type": "command", + "command": "editor.action.peekDefinition", + "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" + }, + { + "key": "D", + "name": "Declaration", + "type": "command", + "command": "editor.action.peekDeclaration" + }, + { + "key": "i", + "name": "Implementation", + "type": "command", + "command": "editor.action.peekImplementation", + "when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" + }, + { + "key": "p", + "name": "Toggle Focus", + "type": "command", + "command": "togglePeekWidgetFocus", + "when": "inReferenceSearchEditor || referenceSearchVisible" + }, + { + "key": "r", + "name": "References", + "type": "command", + "command": "editor.action.referenceSearch.trigger" + }, + { + "key": "t", + "name": "Type Definition", + "type": "command", + "command": "editor.action.peekTypeDefinition" + } + ] + }, + { + "key": "s", + "name": "Search...", + "type": "bindings", + "bindings": [ + { + "key": "f", + "name": "Files", + "type": "command", + "command": "workbench.action.quickOpen" + }, + { + "key": "t", + "name": "Text", + "type": "command", + "command": "workbench.action.findInFiles" + } + ] + }, + { + "key": "S", + "name": "Show...", + "type": "bindings", + "bindings": [ + { + "key": "e", + "name": "Show explorer", + "type": "command", + "command": "workbench.view.explorer" + }, + { + "key": "s", + "name": "Show search", + "type": "command", + "command": "workbench.view.search" + }, + { + "key": "g", + "name": "Show source control", + "type": "command", + "command": "workbench.view.scm" + }, + { + "key": "t", + "name": "Show test", + "type": "command", + "command": "workbench.view.extension.test" + }, + { + "key": "r", + "name": "Show remote explorer", + "type": "command", + "command": "workbench.view.remote" + }, + { + "key": "x", + "name": "Show extensions", + "type": "command", + "command": "workbench.view.extensions" + }, + { + "key": "p", + "name": "Show problem", + "type": "command", + "command": "workbench.actions.view.problems" + }, + { + "key": "o", + "name": "Show output", + "type": "command", + "command": "workbench.action.output.toggleOutput" + }, + { + "key": "d", + "name": "Show debug console", + "type": "command", + "command": "workbench.debug.action.toggleRepl" + } + ] + }, + { + "key": "t", + "name": "Terminal...", + "type": "bindings", + "bindings": [ + { + "key": "t", + "name": "Toggle Terminal", + "type": "command", + "command": "workbench.action.togglePanel" + }, + { + "key": "T", + "name": "Focus Terminal", + "type": "command", + "command": "workbench.action.terminal.toggleTerminal", + "when": "!terminalFocus" + } + ] + }, + { + "key": "u", + "name": "UI toggles...", + "type": "bindings", + "bindings": [ + { + "key": "a", + "name": "Toggle tool/activity bar visibility", + "type": "command", + "command": "workbench.action.toggleActivityBarVisibility" + }, + { + "key": "b", + "name": "Toggle side bar visibility", + "type": "command", + "command": "workbench.action.toggleSidebarVisibility" + }, + { + "key": "j", + "name": "Toggle panel visibility", + "type": "command", + "command": "workbench.action.togglePanel" + }, + { + "key": "F", + "name": "Toggle full screen", + "type": "command", + "command": "workbench.action.toggleFullScreen" + }, + { + "key": "s", + "name": "Select theme", + "type": "command", + "command": "workbench.action.selectTheme" + }, + { + "key": "m", + "name": "Toggle maximized panel", + "type": "command", + "command": "workbench.action.toggleMaximizedPanel" + }, + { + "key": "T", + "name": "Toggle tab visibility", + "type": "command", + "command": "workbench.action.toggleTabsVisibility" + } + ] + }, + { + "key": "v", + "name": "Split Vertical", + "type": "command", + "command": "workbench.action.splitEditor" + }, + { + "key": "w", + "name": "Window...", + "type": "bindings", + "bindings": [ + { + "key": "W", + "name": "Focus previous editor group", + "type": "command", + "command": "workbench.action.focusPreviousGroup" + }, + { + "key": "h", + "name": "Move editor group left", + "type": "command", + "command": "workbench.action.moveActiveEditorGroupLeft" + }, + { + "key": "j", + "name": "Move editor group down", + "type": "command", + "command": "workbench.action.moveActiveEditorGroupDown" + }, + { + "key": "k", + "name": "Move editor group up", + "type": "command", + "command": "workbench.action.moveActiveEditorGroupUp" + }, + { + "key": "l", + "name": "Move editor group right", + "type": "command", + "command": "workbench.action.moveActiveEditorGroupRight" + }, + { + "key": "t", + "name": "Toggle editor group sizes", + "type": "command", + "command": "workbench.action.toggleEditorWidths" + }, + { + "key": "m", + "name": "Maximize editor group", + "type": "command", + "command": "workbench.action.minimizeOtherEditors" + }, + { + "key": "M", + "name": "Maximize editor group and hide side bar", + "type": "command", + "command": "workbench.action.maximizeEditor" + }, + { + "key": "=", + "name": "Reset editor group sizes", + "type": "command", + "command": "workbench.action.evenEditorWidths" + }, + { + "key": "z", + "name": "Combine all editors", + "type": "command", + "command": "workbench.action.joinAllGroups" + }, + { + "key": "d", + "name": "Close editor group", + "type": "command", + "command": "workbench.action.closeEditorsInGroup" + }, + { + "key": "x", + "name": "Close all editor groups", + "type": "command", + "command": "workbench.action.closeAllGroups" + } + ] + }, + { + "key": "x", + "name": "Extensions", + "type": "command", + "command": "workbench.view.extensions" + }, + { + "key": "y", + "name": "Sync...", + "type": "bindings", + "bindings": [ + { + "key": "d", + "name": "Download Settings", + "type": "command", + "command": "extension.downloadSettings" + }, + { + "key": "u", + "name": "Upload Settings", + "type": "command", + "command": "extension.updateSettings" + } + ] + }, + { + "key": "z", + "name": "Toggle zen mode", + "type": "command", + "command": "workbench.action.toggleZenMode" + } + ], + "workbench.editor.showTabs": true, + "sync.gist": "939951904a077b97f8001bc35f6b5948", + "gitlens.hovers.currentLine.over": "line", + "editor.suggestSelection": "first", + "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", + "python.pythonPath": "/home/chris/.miniconda/envs/ds/bin/python", + "java.semanticHighlighting.enabled": true, + "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:\"/home/chris/.vscode-oss/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\"", + "workbench.list.automaticKeyboardNavigation": false, + "oneDarkPro.editorTheme": "onedarkPro", + "python.languageServer": "Pylance", + "editor.scrollbar.horizontal": "hidden", + "editor.scrollbar.vertical": "hidden", + "kite.showWelcomeNotificationOnStartup": false, + "python.terminal.activateEnvironment": false, + "editor.cursorBlinking": "solid", + "editor.fontFamily": "JetBrainsMono Nerd Font, Hack, Menlo, Monaco, 'Courier New', monospace", + "files.exclude": { + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true + }, + "terminal.external.osxExec": "iTerm.app", + "editor.minimap.enabled": false, + "workbench.activityBar.visible": true, + "leetcode.workspaceFolder": "/Users/chris/Repos/leetcode", + "leetcode.defaultLanguage": "javascript", + "leetcode.hint.configWebviewMarkdown": false, + "leetcode.hint.commentDescription": false, + "window.zoomLevel": 2, + "window.menuBarVisibility": "toggle", + "python.dataScience.alwaysTrustNotebooks": true, + "python.condaPath": "$HOME/.miniconda/bin/conda", + "python.formatting.provider": "black", + "python.insidersChannel": "off", + "terminal.integrated.shell.linux": "/bin/zsh", + "terminal.external.linuxExec": "/usr/bin/alacritty", + "code-runner.executorMap": { + "python": "$pythonPath $fileName", + "java": "cd $dir && javac $fileName && java $fileNameWithoutExt", + "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt" + }, + "editor.tokenColorCustomizations": { + "[One Dark Pro]": { + "textMateRules": [ + { + "scope": [ + "support.class.component.open.jsx", + "support.class.component.close.jsx", + "entity.name.function.js" + ], + "settings": { + "foreground": "#61afef" + } + }, + + { + "scope": [ + "variable.other.constant.object.js", + + "punctuation.section.embedded.begin.jsx", + "punctuation.section.embedded.end.jsx" + ], + "settings": { + "foreground": "#abb2bf" + } + }, + { + "scope": ["punctuation.definition.tag.jsx"], + "settings": { + "foreground": "#5c6370" + } + }, + { + "scope": [ + "variable.other.readwrite.js", + "variable.other.property.js", + "variable.parameter", + "variable.other.object.js" + ], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "scope": ["entity.other.attribute-name.jsx"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "scope": [ + "keyword.operator.assignment.js", + "keyword.operator.assignment.jsx", + "string.unquoted.js", + "keyword.operator.typeof.js", + "meta.embedded.expression.js", + "constant.other.object.key.js", + "keyword.operator.logical.js" + ], + "settings": { + "foreground": "#c678dd" + } + }, + { + "scope": ["variable.other.constant.object.js"], + "settings": { + "foreground": "#e06c75" + } + } + ] + } + }, + + "workbench.colorCustomizations": { + "[Default Dark+]": { + "statusBar.background": "#2E2E2E", + "statusBar.foreground": "#8C8C8C", + "statusBarItem.remoteBackground": "#2E2E2E", + "statusBarItem.remoteForeground": "#8C8C8C", + "activityBar.background": "#2E2E2E", + "tab.inactiveBackground": "#2E2E2E" + }, + "[One Dark Pro]": { + "editor.background": "#1e2127", + "terminal.foreground": "#abb2bf", + "terminal.ansiBlack": "#1e2127", + "terminal.ansiBlue": "#61afef", + "terminal.ansiCyan": "#56b6c2", + "terminal.ansiGreen": "#98C379", + "terminal.ansiMagenta": "#c678dd", + "terminal.ansiRed": "#e06c75", + "terminal.ansiWhite": "#abb2bf", + "terminal.ansiYellow": "#d19a66", + "terminal.ansiBrightBlack": "#5c6370", + "terminal.ansiBrightBlue": "#61afef", + "terminal.ansiBrightCyan": "#56b6c2", + "terminal.ansiBrightGreen": "#98c379", + "terminal.ansiBrightMagenta": "#c678dd", + "terminal.ansiBrightRed": "#e06c75", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#d19a66" + } + }, + "gitlens.advanced.telemetry.enabled": false, + "gitlens.currentLine.enabled": false, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "emmet.showSuggestionsAsSnippets": true, + "material-icon-theme.showWelcomeMessage": false, + "gitlens.codeLens.enabled": false, + "workbench.iconTheme": "material-icon-theme", + "git.autofetch": true, + "workbench.startupEditor": "newUntitledFile", + "python.showStartPage": false, + "editor.snippetSuggestions": "bottom" +} diff --git a/vimscript/nv-vscode/init.vim b/vimscript/nv-vscode/init.vim index 746d189d..a10afc97 100644 --- a/vimscript/nv-vscode/init.vim +++ b/vimscript/nv-vscode/init.vim @@ -1,5 +1,15 @@ " TODO there is a more contemporary version of this file " TODO Also some of it is redundant +packadd quickscope + +luafile ~/.config/nvim/lua/settings.lua + +let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] + +highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline +highlight QuickScopeSecondary guifg='#eF5F70' gui=underline ctermfg=81 cterm=underline +let g:qs_max_chars=150 + "VSCode function! s:split(...) abort let direction = a:1 @@ -105,5 +115,5 @@ omap gc <Plug>VSCodeCommentary nmap gcc <Plug>VSCodeCommentaryLine " Simulate same TAB behavior in VSCode - nmap <Tab> :Tabnext<CR> - nmap <S-Tab> :Tabprev<CR> +nmap <Tab> :Tabnext<CR> +nmap <S-Tab> :Tabprev<CR> |