`lsp_dynamic_workspace_symbols` should prioritize matches for files in current working directory
Is your feature request related to a problem? Please describe.
I am using the sumneko_lua LSP with the lua-dev plugin to get completion/documentation/etc. for the neovim API, among other things. I noticed while using the lsp_dynamic_workspace_symbols picker that when searching for a symbol (for example "horizontal") the matches for my current file are placed way below the matches for other random symbols that I'm looking for. Here's an example:
If there any way to adjust this to have it prefer matches for files in the current working directory? I don't mind the other matches, I just want the sorting to more heavily weight my own files instead of symbols in the broader workspace.
This is already possible via the telescope.defaults.file_ignore_patterns. For example
If you are getting a lot of jdt:// entries like this:
you can use this configuration
require("telescope").setup({
defaults = {
file_ignore_patterns = {
"^jdt://",
},
...
...
})
with that file_ignore_patterns , the :Telescope lsp_dynamic_workspace_symbols will not show any entry starting with jdt://:
Thanks @ecerulm! That's totally fair, however, I don't necessarily want to get rid of the other options, I just want the sorting algorithm to be skewed more towards showing symbols that match in the currently working directory before all others.
Although I'll be honest, I stopped using Telescope for this a while ago, so I have no idea what the sorting algorithm is like now.