ojroques / nvim-lspfuzzy

A Neovim plugin to make the LSP client use FZF
BSD 2-Clause "Simplified" License
316 stars 11 forks source link

Q: How can I exclude node_modules or other directories when executing commands such as go to definitions #11

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi,

Thanks for the awesome plugin, I've been using it and I'm super happy!

I have a question: When executing the lsp function to go to definition in a typescript project, it always lists the definition from dir node_modules I've tried to ignore that and it works when I use Rg and fzf commands but it doesn't work when using the plugin. Which leads me to think that customizing the FZF_DEFAULT_COMMAND in either nvim or my .zshrc file don't have an effect on the fzf command used for the lsp functions.

Is there a way to exclude files or directories for the plugin's supported commands?

If you need any more input let me know :)

Cheers!

ojroques commented 3 years ago

Hello,

I'm glad you like the plugin. About your issue I'm not sure it's related to the plugin. Basically the plugin only takes what the LSP client is returning and forward that input to fzf (instead of using the quickfix window). So we don't use FZF_DEFAULT_COMMAND indeed since the fzf entries are already ready by the time the plugin is called.

So if you want to filter out some results you should try to do that at the source: either you check if your LSP server has a way to ignore some files, or check if Neovim LSP client has an option to do that (I can't check right now sorry).

Let me know if you're able to solve your problem.

ghost commented 3 years ago

Thanks for the quick reply. I will take a look at the options you mentioned and put something here if I find it useful. Feel free to close the issue :)

Raduc4 commented 2 years ago

Hello, have you found the answer to this? Thanks