What a fantastic project, many thanks to everyone ๐
@ericdallo Does LSP emacs support something like an interactive finding of a var? I just want to enter (part of the) name
without hovering over it in a buffer for example
Yes. the textDocument/workspaceSymbol
should handle that
e.g. right now I am trying to find the var syntax-label
but I forgot in which namespace this var was defined, but lsp knows all of this
in emacs there is: lsp-ivy-workspace-symbol
Or if you use helm
: helm-lsp-workspace-symbol
via the helm-lsp
package
I don't use either but I'll try ivy
doesn't work though
I'll just use grep :/
It works for me:
why did you type *clj?
I don't know too much about the ivy filters
but It needs some prefix
eh, this is too hard for me on Monday ;)
can we maybe have lsp-clojure-find-var-interactively
and then type some string which filters over the vars using some fuzzyness?
For some reason it seems to need a first anything param :man-shrugging:
that command should do that, we just need to fix that search, not sure it's a lsp-mode bug or related how the server is returning the data
I tested with Dart lang and it worked perfectly, so I need to investigate why clojure-lsp is returning the symbol filtered only when it has 2 params
For now you can use it with . syntax-label
,it should work
@ericdallo Confirming that works with lsp-ivy-workspace-symbol
. I tried lsp-ivy-global-workspace-symbol
which didn't work
the global one get symbols from all active projects, not so useful and may have performance issue I suppose
ok. so it only finds symbols from the source paths right? if I type concat
it doesn't return clojure.core/concat
for example
yes
But maybe we should add support for it as well
It makes sense to me
Hey guys
Iโm considering using lsp and kondo for a very specific feature, but it seems like a lot of setup for something so little. I havenโt delved into lsp before. Cursive users, do you think that LSP gives you some very valuable feature that you donโt get from Cursive out of the box?
Hm, I got curious and tried the workspace-symbol from NeoVim and it doesn't seem to take the query into account -> I get all the symbols of my workspace back instead.
Sell it to me ๐
If you can be bothered!
@reefersleep There are already people using the clj-kondo LSP plugin with Cursive, so at least diagnostics work for sure
Without clj-kondo you probably get less diagnostics from Cursive only
I was a Cursive user before Emacs, most features LSP features are available on Cursive, there is a specific one that I think only LSP has like get all references of a a keyword
My favorite clojure-lsp feature is probably finding keywords, although TIL that Cursive also has this
Oh Cursive has too ๐ https://clojurians.slack.com/archives/CPABC1H61/p1614606002322100
And what you don't get with Cursive (I think) is being able to define custom (clj-kondo) hooks for your macros so the IDE "gets" them
Thatโs the interesting part for me. But I wonder if there are other killer features ๐
Namespace cleanup maybe?
not sure Cursive supports all clojure-lsp code actions
Maybe not all, but it seems to me like thereโs a big overlap. Thatโs why itโd be cool if Cursive users could highlight the golden differences ๐
yes, I found the issue, we don't filter on server-side only on front-end
I'll fix it soon
add a fuzzy search
Thanks ๐ glad to be providing NeoVim info ๐
Is there any way I can manually change the project root?
are you using Emacs?
lsp-workspace-folder-remove
and then lsp
, it'll ask for the new project-root
yes, emacs
thx
updating ๐
BTW the auto update brew action didn't work, but we have an idea to auto sed and commit to the repo
yeah, I'm doing something like that but then locally
https://github.com/4rbor/tq/blob/main/.github/workflows/release.yaml#L205-L223
https://github.com/borkdude/homebrew-brew/blob/master/update-babashka
so are you saying I should download the bin manually?
for now, yep
You can also do a script like this: https://github.com/clj-kondo/clj-kondo/blob/master/script/install-clj-kondo
oh, we have one similar to that
https://github.com/clojure-lsp/clojure-lsp/blob/master/install-latest-clojure-lsp.sh
but it's quite simple
It still doesn't return symbols from clojure.core etc for me.
Yes, I didn't change that, it s a lsp-mode issue since lsp-mode need to open the buffer for each symbol I think
And then Emacs prompt with a lot of questions if you want to import the root of that jar
Then why did you poke me with > latest release should fix the workspaceSymbols querying issue ? :)
So for now, until know how to fix that, I didn't enable the all analysis
It fixes the querying, using fuzzy search
ooh kk
thanks!
so you don't need a prefix like before
you mean, I don't have to type the leading .
?
yes
and the search now use fuzzy search on server side
When I don't give a leading dot, the search results don't seem to be related at all.
Iโm running into an issue where I get different diagnostics between latest version of clj-kondo and clojure-lsp with regard to clojure-lsp not finding some macro used in cljs code. kondo seems to find the definitions and doesnโt emit warnings. how to best debug what is going on?
@kommen please check the issue above โ๏ธ it could be related with your issue indeed
@ericdallo thank you, confirmed this is the same issue I was seeing and adding a lint-as makes it all good. Thank you!
Great ๐ thank you!
Hum, yeah, we may improve the fuzzy logic
I mean, there are dozens of symbols which literally have the word concat
in them, which do show with . concat
;)
on server side we just use the . concat
to the fuzzy search
have no idea how this works now hahah
it just returns the first results without any matching it seems
hum, first, remove the .lsp/sqlite.db
of your project
and .clj-kondo/.cache
yes, also, I know lsp-mode has a filtering on the front-end
did both and restarted clojure-lsp, same result
if you can use clj-kondo on command line and it works and on clojure-lsp doesn't, please open a issue with a minimal repro, then I can test it and check why is not working if it's really a issue on clojure-lsp
ok, thanks, will try to build a minimal repro