diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index 0e4a88c..d2f6566 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -52,13 +52,14 @@ local function default_attach(client, bufnr) ]]) end - -- Some override telescope bindings - -- TODO: Detect telescope or nvim-lspfuzzy and set keymap accordingly - buf_set_keymap("n", "t", "lua vim.lsp.buf.document_symbol()", opts) - -- buf_set_keymap("n", "ft", "lua vim.lsp.buf.workspace_symbol()", opts) - - -- buf_set_keymap("n", "t", "Telescope lsp_document_symbols", opts) - -- buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) + -- Some override some fuzzy finder bindings to use lsp sources + if packer_plugins["nvim-lspfuzzy"] then + buf_set_keymap("n", "t", "lua vim.lsp.buf.document_symbol()", opts) + -- buf_set_keymap("n", "ft", "lua vim.lsp.buf.workspace_symbol()", opts) + elseif packer_plugins["telescope.nvim"] then + buf_set_keymap("n", "t", "Telescope lsp_document_symbols", opts) + buf_set_keymap("n", "ft", "Telescope lsp_dynamic_workspace_symbols", opts) + end end local function config_lsp()