mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(vscode): add vscode-specific keymaps and sync undo/redo with vscode
- synced undo/redo lists with vscode using `vscodenotify` - enabled navigation of vscode tabs similar to lazyvim buffers
This commit is contained in:
parent
4b86cf9900
commit
a5514009ea
1 changed files with 9 additions and 0 deletions
|
|
@ -33,9 +33,18 @@ end
|
|||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymapsDefaults",
|
||||
callback = function()
|
||||
-- VSCode-specific keymaps for search and navigation
|
||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||
|
||||
-- Keep undo/redo lists in sync with VsCode
|
||||
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
|
||||
-- Navigate VSCode tabs like lazyvim buffers
|
||||
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>")
|
||||
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue