Skip to content

Commit 6a91c38

Browse files
committed
fix: make lsp symbol respect setting.
1 parent c6368e8 commit 6a91c38

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

lua/keymap/completion.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ function M.lsp(buf)
2626
:with_buffer(buf)
2727
:with_desc("lsp: Toggle outline"),
2828
["n|gto"] = map_callback(function()
29-
local prompt_position = require("telescope.config").values.layout_config.horizontal.prompt_position
30-
require("fzf-lua").lsp_document_symbols({
31-
fzf_opts = { ["--layout"] = prompt_position == "top" and "reverse" or "default" },
32-
})
29+
local search_backend = require("core.settings").search_backend
30+
if search_backend == "fzf" then
31+
local prompt_position = require("telescope.config").values.layout_config.horizontal.prompt_position
32+
require("fzf-lua").lsp_document_symbols({
33+
fzf_opts = { ["--layout"] = prompt_position == "top" and "reverse" or "default" },
34+
})
35+
else
36+
require("telescope.builtin").lsp_document_symbols()
37+
end
3338
end)
3439
:with_silent()
3540
:with_buffer(buf)

0 commit comments

Comments
 (0)