return { { "neovim/nvim-lspconfig", opts = function(_, opts) -- LazyVim maps gD unconditionally; tsgo has no textDocument/declaration. -- Gate it so servers without it keep Vim's built-in gD. table.insert(opts.servers["*"].keys, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration", has = "declaration", }) -- Call hierarchy: the tool for understanding a call chain without editing. -- ci = who calls this (incoming); co = what this calls (outgoing). -- Uses Telescope's picker when present. Gated on callHierarchy support. Added 2026-10-23. table.insert(opts.servers["*"].keys, { "ci", function() local ok, tb = pcall(require, "telescope.builtin") if ok then tb.lsp_incoming_calls() else vim.lsp.buf.incoming_calls() end end, desc = "Incoming Calls (callers)", has = "callHierarchy", }) table.insert(opts.servers["*"].keys, { "co", function() local ok, tb = pcall(require, "telescope.builtin") if ok then tb.lsp_outgoing_calls() else vim.lsp.buf.outgoing_calls() end end, desc = "Outgoing Calls (callees)", has = "callHierarchy", }) end, }, }