mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-18 02:26:26 +00:00
Set fuzzy lsp bindings based on installed packages
This commit is contained in:
parent
21c33a47f8
commit
1ac22e81b2
@ -52,13 +52,14 @@ local function default_attach(client, bufnr)
|
|||||||
]])
|
]])
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Some override telescope bindings
|
-- Some override some fuzzy finder bindings to use lsp sources
|
||||||
-- TODO: Detect telescope or nvim-lspfuzzy and set keymap accordingly
|
if packer_plugins["nvim-lspfuzzy"] then
|
||||||
buf_set_keymap("n", "<leader>t", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
buf_set_keymap("n", "<leader>t", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
||||||
-- buf_set_keymap("n", "<leader>ft", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>", opts)
|
-- buf_set_keymap("n", "<leader>ft", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>", opts)
|
||||||
|
elseif packer_plugins["telescope.nvim"] then
|
||||||
-- buf_set_keymap("n", "<leader>t", "<cmd>Telescope lsp_document_symbols<CR>", opts)
|
buf_set_keymap("n", "<leader>t", "<cmd>Telescope lsp_document_symbols<CR>", opts)
|
||||||
-- buf_set_keymap("n", "<leader>ft", "<cmd>Telescope lsp_dynamic_workspace_symbols<CR>", opts)
|
buf_set_keymap("n", "<leader>ft", "<cmd>Telescope lsp_dynamic_workspace_symbols<CR>", opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function config_lsp()
|
local function config_lsp()
|
||||||
|
Loading…
Reference in New Issue
Block a user