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)