I see. Is there any way to make the algo configurable by the user? Actually, generally-speaking, is there a way to configure other stuff for LSP (by the user)?
ATM no, and I don't see what options we could have for that, I think improving it to looks like a good filtering with the given user input would be ok for most of the cases. > is there a way to configure other stuff for LSP (by the user) what do you mean with other stuff?
Personally, I've found that substring matches are most intuitive. I don't know the name of this algo (if it even has one), but basically, given something like:
• search term: abcde
• matches: 1a23bc4d5e6
(because abcde
's chars are consecutively within)
(Vscode and Emacs's ivy-fuzzy uses this afaik)
> what do you mean with other stuff? I actually didn't have any concrete examples in mind when I said this. I suppose stuff like: Max matches to fetch for auto-completion?
> Personally, I've found that substring matches are most intuitive. I don't know the name of this algo (if it even has one), but basically, given something like: > > yeah, looks valid indeed
we could have a setting for that on .lsp/config.edn like:
{:workspace-symbol-filter :substring}
where user could change to something like
{:workspace-symbol-filter :fuzzy-dice}
AH, that sounds great. I'll try to find out what the exact algorithm is (for the one I'm describing)
I think the algo I'm talking about is used in regex-fuzzy. https://oremacs.com/2016/01/06/ivy-flx/ I can port the elisp code to a clojure lib?
maybe clj-fuzzy could have another algo with that ? 🙂
Ah sure, I'll make a PR to them