Use lsp for <leader>t tag search

This commit is contained in:
ViViDboarder 2025-01-21 14:25:53 -08:00
parent 369c5a4658
commit a87cb51ee3

View File

@ -128,6 +128,13 @@ function M.get_default_attach(override_capabilities)
local telescope_keymap = utils.curry_keymap("n", "<leader>f", { buffer = bufnr, group_desc = "Finder" }) local telescope_keymap = utils.curry_keymap("n", "<leader>f", { buffer = bufnr, group_desc = "Finder" })
if server_capabilities.documentSymbolProvider then if server_capabilities.documentSymbolProvider then
telescope_keymap("t", telescope_builtin.lsp_document_symbols, { desc = "Find buffer tags" }) telescope_keymap("t", telescope_builtin.lsp_document_symbols, { desc = "Find buffer tags" })
-- Also override the default tag finder
utils.keymap_set(
"n",
"<leader>t",
telescope_builtin.lsp_document_symbols,
{ desc = "Find buffer tags" }
)
end end
if server_capabilities.workspaceSymbolProvider then if server_capabilities.workspaceSymbolProvider then
telescope_keymap("T", telescope_builtin.lsp_dynamic_workspace_symbols, { desc = "Find tags" }) telescope_keymap("T", telescope_builtin.lsp_dynamic_workspace_symbols, { desc = "Find tags" })