feat(nvim): add some more vscode keymaps to the neovim extra

This commit is contained in:
Sergio Laín 2024-01-16 14:03:45 +01:00
parent 16b7217028
commit 0068d02dd3
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
3 changed files with 12 additions and 1 deletions

View file

@ -275,4 +275,9 @@
"when": "editorTextFocus && neovim.init && neovim.mode != insert || neovim.recording",
"args": "<C-B>"
},
{
"key": "h",
"command": "toggleexcludedfiles.toggle",
"when": "filesExplorerFocus"
}
]

View file

@ -73,7 +73,7 @@
"neotest-mocha": { "branch": "main", "commit": "68f0e9768a94c3ebd4d5e67b2765e6a5df017d99" },
"neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" },
"neotest-rust": { "branch": "main", "commit": "3c06f239ad260f02c8678141e08b57d20fbe2c55" },
"neotest-vitest": { "branch": "main", "commit": "15972c4791b3d47df82311047835803a072c1da6" },
"neotest-vitest": { "branch": "main", "commit": "87e91bfd9419a8c74bf0d105e2ae31b9692daf0b" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-ansible": { "branch": "main", "commit": "d115cb9bb3680c990e2684f58cf333663fff03b8" },

View file

@ -69,6 +69,8 @@ vim.api.nvim_create_autocmd("User", {
-- windows
map("n", "<leader>|", vscode_action("workbench.action.splitEditorRight"))
map("n", "<leader>-", vscode_action("workbench.action.splitEditorDown"))
-- explorer
map("n", "h", vscode_action("toggleexcludedfiles.toggle"))
-- LSP actions
map("n", "<leader>ca", vscode_action("editor.action.codeAction"))
map("n", "gy", vscode_action("editor.action.goToTypeDefinition"))
@ -78,6 +80,10 @@ vim.api.nvim_create_autocmd("User", {
map("n", "<leader>cr", vscode_action("editor.action.rename"))
map("n", "<leader>co", vscode_action("editor.action.organizeImport"))
map("n", "<leader>cf", vscode_action("editor.action.formatDocument"))
-- refactor
map("n", "<leader>cR", vscode_action("editor.action.refactor"))
-- markdown preview
map("n", "<leader>cp", vscode_action("markdown.showPreviewToSide"))
end,
})