From f148347f3c584ad0621b21ce27b6cdd648062340 Mon Sep 17 00:00:00 2001 From: _N0x Date: Thu, 31 Oct 2024 22:31:56 +0100 Subject: [PATCH] Added nvim keymaps for vim lsp (rename etc) --- nvim/.config/nvim/lua/keymap.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nvim/.config/nvim/lua/keymap.lua b/nvim/.config/nvim/lua/keymap.lua index 8f794e9..47c4165 100644 --- a/nvim/.config/nvim/lua/keymap.lua +++ b/nvim/.config/nvim/lua/keymap.lua @@ -88,9 +88,6 @@ keymap("t", "", "j", term_opts) keymap("t", "", "k", term_opts) keymap("t", "", "l", term_opts) --- Format document -- -keymap("n", "f", "Format", opts) - -- close buffer -- keymap("n", "q", "Bdelete! %d", opts) @@ -103,4 +100,12 @@ keymap("n", "", ":FloatermPrev", opts) keymap("n", "", ":FloatermNext", opts) keymap("n", "", ":FloatermToggle", opts) - +-- LSP +keymap("n", "f", "Format", opts) +keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) +keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) +keymap("n", "K", "lua vim.lsp.buf.hover()", opts) +keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) +keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) +keymap("n", "gr", "lua vim.lsp.buf.references()", opts) +keymap("n", "rn", "lua vim.lsp.buf.rename()", opts)