lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
anonimitoraf 2021-04-04T04:30:14.213800Z

Thanks, as always @ericdallo!

anonimitoraf 2021-04-04T13:07:23.214400Z

Hmm, I've been noticing some code being deleted on-save 😞 I'll make a minimal reproduction tomorrow

👍 1
anonimitoraf 2021-04-06T13:03:12.221700Z

@ericdallo I've raised: https://github.com/clojure-lsp/clojure-lsp/issues/396 Weird if I'm the only one experiencing this lol Thanks

👍 1
1
anonimitoraf 2021-04-07T14:35:52.249100Z

Oh, interesting

ericdallo 2021-04-07T14:36:24.249400Z

If you could test if that branch fix your issue, it'd help

ericdallo 2021-04-07T14:36:40.249600Z

you can just checkout it and run make debug-bin to generate a local clojure-lsp

anonimitoraf 2021-04-07T14:37:47.249800Z

Sweet, will do. Thanks

anonimitoraf 2021-04-07T15:16:06.250Z

@ericdallo After using LSP for a few mins with that branch, haven't seen the issue so far 😄 I'll keep an eye out throughout the day tomorrow too

ericdallo 2021-04-07T15:16:19.250200Z

nice 🙂

anonimitoraf 2021-04-04T23:36:52.214900Z

The filtering of workspace symbols seems a bit weird. I think it only takes in the first 2 chars (and also, some search results don't even have those 2 chars)

anonimitoraf 2021-04-06T22:59:24.247200Z

@ericdallo I opened https://github.com/Yomguithereal/clj-fuzzy/issues/49for clj-fuzzy. It doesn't feel appropriate to put this algorithm into clj-fuzzy. So, I'm thinking I just publish a separate lib (like https://github.com/lewang/flx, so maybe call it clj-flx or something). Then I'll make a PR to clojure-lsp so that {:workspace-symbol-filter :flx} uses the lib?

ericdallo 2021-04-06T23:01:10.247600Z

Oh, seems good 🙂

👍 1
ericdallo 2021-04-06T23:01:56.248100Z

If the algo is better than the current one, I think we could just replace the clj-fuzzy with that new one

anonimitoraf 2021-04-06T23:02:35.248300Z

Right, ok. I'll write extensive unit tests to show how intuitive (or otherwise) it is

🤘 1
anonimitoraf 2021-04-10T08:03:18.003300Z

@ericdallo I've published https://github.com/anonimitoraf/clj-flx 🙂 I'll inject it into clojure-lsp later/tomorrow. Are there other parts of clojure-lsp that uses "fuzzy" candidate matching?

ericdallo 2021-04-10T13:23:34.003600Z

Nice! No, this is the only one :)

👍 1
ericdallo 2021-04-04T23:37:53.215300Z

it's not perfect as it uses a fuzzy search, the idea is that it scores all symbols with your query and order by the score

anonimitoraf 2021-04-04T23:38:55.215500Z

Fuzzy meaning the search term has to be a substring of the searched term, no?

anonimitoraf 2021-04-04T23:39:18.215700Z

If so, should create-topic be matched by the search term try-pop?

ericdallo 2021-04-04T23:40:17.216300Z

we could probably tune the config I just used the defaults from https://github.com/Yomguithereal/clj-fuzzy

anonimitoraf 2021-04-04T23:45:54.216600Z

Ah, I see. I had the wrong expectations. Reading the doc for clj-fuzzy, I couldnt tell whether it uses all the algorithms together or the client (of the lib) has to pick which ones.

ericdallo 2021-04-04T23:46:19.216800Z

the client has to pick one

ericdallo 2021-04-04T23:47:04.217300Z

Feel free to improve that, I think it can be improved somehow

ericdallo 2021-04-04T23:47:51.217500Z

Maybe the score filter on the line below should check if it's equal to 0?