diff --git a/lua/custom/lspconfig.lua b/lua/custom/lspconfig.lua index 58f0b08..4136133 100644 --- a/lua/custom/lspconfig.lua +++ b/lua/custom/lspconfig.lua @@ -69,13 +69,15 @@ local on_attach = function(_, bufnr) keymap.set("n", "ge", "Lspsaga show_line_diagnostics", opts) -- show diagnostics for line keymap.set("n", "", "Lspsaga code_action", opts) -- diagnostic - keymap.set("n", "d", "Telescope diagnostics", opts) -- jump to previous diagnostic in buffer + keymap.set("n", "d", "Telescope diagnostics", opts) -- jump to previous diagnostic in buffer -- keymap.set("n", "d", "Lspsaga show_buf_diagnostics") - keymap.set("n", "dn", "Lspsaga diagnostic_jump_next") -- jump to next diagnostic in buffer - keymap.set("n", "dp", "Lspsaga diagnostic_jump_prev") -- jump to previous diagnostic in buffer + keymap.set("n", "dn", "Lspsaga diagnostic_jump_next") -- jump to next diagnostic in buffer + keymap.set("n", "dp", "Lspsaga diagnostic_jump_prev") -- jump to previous diagnostic in buffer - keymap.set("n", "gj", "]m", opts) -- jump to next method - keymap.set("n", "gk", "[m", opts) -- jump to previous method + keymap.set("n", "gj", "lua require'nvim-treesitter.textobjects.move'.goto_next_start('@function.outer')", + opts) -- jump to next method + keymap.set("n", "gk", "lua require'nvim-treesitter.textobjects.move'.goto_previous_start('@function.outer')", + opts) -- jump to previous method end -- used to enable autocompletion (assign to every lsp server config)