Show definition, implementation and type definition in lspsaga finder popups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fed16e0b9
commit
3139d933ec
2 files changed
+5
-2
No files matched your search
@@ -71,8 +71,10 @@ local on_attach = function(_, bufnr)
|
|||||||
local opts = { noremap = true, silent = true, buffer = bufnr }
|
local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
|
|
||||||
keymap.set("n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
keymap.set("n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
||||||
keymap.set("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
-- floating popups instead of the quickfix split for multiple results
|
||||||
keymap.set("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
keymap.set("n", "gd", "<cmd>Lspsaga finder def<CR>", opts)
|
||||||
|
keymap.set("n", "gi", "<cmd>Lspsaga finder imp<CR>", opts)
|
||||||
|
keymap.set("n", "gy", "<cmd>Lspsaga finder tyd<CR>", opts)
|
||||||
keymap.set("n", "<leader>l", format_buffer, { desc = "Format code function" })
|
keymap.set("n", "<leader>l", format_buffer, { desc = "Format code function" })
|
||||||
keymap.set(
|
keymap.set(
|
||||||
"n",
|
"n",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ return {
|
|||||||
-- use enter to open file from the finder
|
-- use enter to open file from the finder
|
||||||
finder = {
|
finder = {
|
||||||
keys = { toggle_or_open = "<CR>" },
|
keys = { toggle_or_open = "<CR>" },
|
||||||
|
methods = { tyd = "textDocument/typeDefinition" },
|
||||||
},
|
},
|
||||||
-- use enter to open file with definition preview
|
-- use enter to open file with definition preview
|
||||||
definition = {
|
definition = {
|
||||||
|
|||||||
Reference in new issue
Block a user