diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 1dc7a25..87c8d2b 100755 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -28,7 +28,7 @@ return { keymap.set("n", "gR", "Telescope lsp_references", opts) opts.desc = "Go to declaration" - keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + keymap.set("n", "gD", ":lua vim.lsp.buf.declaration", opts) opts.desc = "Show LSP definitions" keymap.set("n", "gd", "Telescope lsp_definitions", opts) @@ -52,7 +52,7 @@ return { keymap.set("n", "ga", "Telescope diagnostics bufnr=0", opts) opts.desc = "Show line diagnostics" - keymap.set("n", "gA", vim.diagnostic.open_float, opts) + keymap.set("n", "gA", ":lua vim.diagnostic.open_float()", opts) opts.desc = "Go to previous diagnostic" keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) @@ -133,6 +133,8 @@ return { }) local java_on_attach = function(client, bufnr) + on_attach(client, bufnr) + opts.buffer = bufnr -- Keybinds for testing, refactoring, java specific opts.desc = "Java profiling"