configurable limit in searchDef
goolord opened this issue · comments
currently, searchDef
is implemented like
Lines 121 to 126 in bb7367f
the
LIMIT
on line 126 is problematic for HLS's workspace symbol handler, since it frequently omits symbols from a workspace_symbols query in a way that's opaque to the userhttps://github.com/haskell/haskell-language-server/blob/3be343acf76f05fb9b8adb73625439a5d40b362c/ghcide/src/Development/IDE/Core/Actions.hs#L123-L127
I think it's fine to either
- remove the
LIMIT
line - add a
Maybe Int
parameter or similar to make this limit configurable
Sounds reasonable. But does this actually manifest in practice? Don't clients make another query when you refine your search by adding more characters?
neovim doesn't, at least. there are UIs that wrap nvim's workspace symbol handler that do/could do that, though.
most UIs I've used that provide functionality like that to nvim just query once and filter the results with some fuzzy filter, but maybe that's not a use case worth supporting 🤔
I think it's worth it, if only because other language servers might not return symbols LIKE
the query and it's worth maintaining that that workflow works across any language