lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
anonimitoraf 2021-04-05T00:00:22.217700Z

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)?

ericdallo 2021-04-05T00:03:11.217900Z

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?

anonimitoraf 2021-04-05T00:03:50.218100Z

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)

anonimitoraf 2021-04-05T00:04:51.218300Z

> 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?

ericdallo 2021-04-05T00:07:41.218600Z

> 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

ericdallo 2021-04-05T00:08:46.218900Z

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}

anonimitoraf 2021-04-05T00:12:19.219100Z

AH, that sounds great. I'll try to find out what the exact algorithm is (for the one I'm describing)

👍 1
anonimitoraf 2021-04-05T01:22:43.219400Z

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?

ericdallo 2021-04-05T01:29:45.219600Z

maybe clj-fuzzy could have another algo with that ? 🙂

anonimitoraf 2021-04-05T01:46:45.219800Z

Ah sure, I'll make a PR to them

🤘 1