From ad2661b3ad0e0b6ad097b51ea5334d4aeecea095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 5 Jan 2024 11:46:45 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20config(nvim):=20deleting?= =?UTF-8?q?=20some=20plugins=20and=20adding=20lsp=20keymaps=20for=20the=20?= =?UTF-8?q?vscode=20extra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nvim/lua/plugins/extras/util/vscode.lua | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/util/vscode.lua b/.config/nvim/lua/plugins/extras/util/vscode.lua index d99e7332..91f0bcb7 100644 --- a/.config/nvim/lua/plugins/extras/util/vscode.lua +++ b/.config/nvim/lua/plugins/extras/util/vscode.lua @@ -6,6 +6,8 @@ local Config = require("lazy.core.config") local Plugin = require("lazy.core.plugin") local vscode = require("vscode-neovim") +local map = vim.keymap.set + -- Add any additional plugins in vscode, you can set vscode=true on a plugin spec. local enabled = { "flash.nvim", @@ -19,9 +21,7 @@ local enabled = { "nvim-various-textobjs", "nvim-ts-context-commentstring", "vim-repeat", - "yanky.nvim", "highlight-undo.nvim", - "multicursors.nvim", "LazyVim", } @@ -46,19 +46,23 @@ vim.api.nvim_create_autocmd("User", { pattern = "LazyVimKeymaps", callback = function() -- find file - vim.keymap.set("n", "", "Find") + map("n", "", "Find") -- find in files - vim.keymap.set("n", "/", vscode_action("workbench.action.findInFiles")) + map("n", "/", vscode_action("workbench.action.findInFiles")) -- open symbol - vim.keymap.set("n", "ss", vscode_action("workbench.action.gotoSymbol")) + map("n", "ss", vscode_action("workbench.action.gotoSymbol")) -- view problems - vim.keymap.set("n", "xx", vscode_action("workbench.actions.view.problems")) + map("n", "xx", vscode_action("workbench.actions.view.problems")) -- open file explorer in left sidebar - vim.keymap.set("n", "e", vscode_action("workbench.view.explorer")) + map("n", "e", vscode_action("workbench.view.explorer")) -- Code Action - vim.keymap.set("n", "ca", vscode_action("editor.action.codeAction")) + map("n", "ca", vscode_action("editor.action.codeAction")) -- Open terminal - vim.keymap.set("n", "ft", vscode_action("workbench.action.terminal.focus")) + map("n", "ft", vscode_action("workbench.action.terminal.focus")) + -- LSP actions + map("n", "gy", vscode_action("editor.action.goToTypeDefinition")) + map("n", "gr", vscode_action("editor.action.goToReferences")) + map("n", "gi", vscode_action("editor.action.goToImplementation")) end, })