feat(keybindings): gd now jumps to the first instead of showing list
This commit is contained in:
@@ -35,7 +35,11 @@ return {
|
|||||||
local lsp_opts = { buffer = bufnr, remap = false }
|
local lsp_opts = { buffer = bufnr, remap = false }
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", function()
|
vim.keymap.set("n", "gd", function()
|
||||||
vim.lsp.buf.definition()
|
vim.lsp.buf.definition({
|
||||||
|
on_list = function(list)
|
||||||
|
vim.lsp.util.jump_to_location(list.items[1].user_data, "utf-8", true)
|
||||||
|
end,
|
||||||
|
})
|
||||||
end, lsp_opts)
|
end, lsp_opts)
|
||||||
vim.keymap.set("n", "gi", function()
|
vim.keymap.set("n", "gi", function()
|
||||||
vim.lsp.buf.implementation()
|
vim.lsp.buf.implementation()
|
||||||
|
|||||||
Reference in New Issue
Block a user