diff --git a/init.lua b/init.lua index a660a4e..bb96668 100644 --- a/init.lua +++ b/init.lua @@ -13,4 +13,25 @@ end require'lspconfig'.gopls.setup{} -vim.keymap.set("n", "gd", vim.lsp.buf.definition, { silent = true }) +-- None of this should be needed from 0.11.0 (except maybe gd). +do + vim.keymap.set('n', 'gd', function() + vim.lsp.buf.definition() + end, { desc = 'vim.lsp.buf.definition()' }) + + vim.keymap.set('n', 'grn', function() + vim.lsp.buf.rename() + end, { desc = 'vim.lsp.buf.rename()' }) + + vim.keymap.set({ 'n', 'x' }, 'gra', function() + vim.lsp.buf.code_action() + end, { desc = 'vim.lsp.buf.code_action()' }) + + vim.keymap.set('n', 'grr', function() + vim.lsp.buf.references() + end, { desc = 'vim.lsp.buf.references()' }) + + vim.keymap.set('i', '', function() + vim.lsp.buf.signature_help() + end, { desc = 'vim.lsp.buf.signature_help()' }) +end