Fork me on GitHub
Drew Verlee14:11:06

How would I go about getting a richer more interactive menu for references in LSP? For example, Intellij doesn't just show the files in a temporary (click away and it disappears) list. It opens a permanent hierarchy/tree of files with the reference as the last node in the tree. It also opens an accompanying window pane so i can see some range of code around the reference. The later is really nice to have. Would this be an editor advancement?


You want intelliJ behavior on emacs, is that right?


this is something to be improved on client side (editor level), for example:

Drew Verlee14:11:26

Correct, the intelliji feature is richer and i would assume universally preferred. I'm guessing the change is a matter of configuration options passed to a emacs window manager (helm?). Brb


I think help/ivy already support a larger preview of code, I already saw that on doom-emacs at least


but for a more intellij like behavior probably only using lsp-treemacs


I think we already have it


Like lsp-treemacs-errors-list:


there is already lsp-treemacs-references , but for some reason is not working for me

Drew Verlee16:11:49

Awesome. lsp treemacs view is what i would want, a list that sticks around.


yeah, lsp-treemacs is cool, I use for one or 2 features, it needs some bugfix though, but overall it works fine

Drew Verlee16:11:26

@ericdallo do you have a minute to pair with me to see if we can learn why this re-name doesn't work on my project? Or what diagnostics could i send your way?


Sure, I'm releasing a new clojure-lsp version in a couple of hours that improve rename, I think it should fix a lot of cases where rename doesn't work


if that doesn't fix/help we can debug it

Drew Verlee16:11:32

ok. i'll wait for that.

Drew Verlee16:11:46

Here is what seems to be a bug that caught me the other day. lsp-show references is showing incorrectly showing one less reference then lsp-treemacs view


isn't the definition itself that is missing?


there are 2 ways that LSP find the references can return, all the references and another with all the references + the definition itself


AFAIK lsp-show-references doesn't include the definition


maybe via lsp-treemacs it's calling passing the arg to include the definition

Drew Verlee17:11:06

This was a keyword, fwiw.


could you provide the code that you tried? or a sample that reproduce the issue?

Drew Verlee17:11:29

hmm. Ok, i see what happened here. This is interesting. It is considering the keyword i said it missed as a definition. That is, it goes to it when i use lsp-find-defination. In this case, we are re-using that keyword for both re-frame/reg-event-fx and re-frame/reg-fx a pattern i'm not sure I think is worth it. As it makes even basic text searches a bit confusing.

Drew Verlee17:11:37

That it finds the re-frame event definition via "find definition" is btw, amazing.


yeah, maybe we can improve that behavior

Drew Verlee17:11:19

This is a fairly rare case, i just was worried it was more common.


yeah not sure it's common as well


clojure-lsp Released clojure-lsp, improving mostly code actions and completion! We had a huge improvement on keyword completions and snippets, the rename feature now should work for most projects even for not correctly configured source-paths, we also fixed some code parsing which should reflect on most features. • General ◦ Improve rename feature to not heavily rely on valid source-paths for most cases. ◦ Fix setTrace exception logs for graalvm native images. ◦ Huge improvements on namespaces renames and namespaces references find. ◦ Fix/Remove warnings during datalevin access. ◦ Improve freezing for some MacOS cases. ◦ Bump clj-kondo to `2021.10.20-20211116.110002-7` improving code parsing and other fixes. • Editor ◦ Fix "Add require" code actions adding multiple requires instead of the selected. ◦ Improve "Add require" wording, making it easier to understand what each different action will do. ◦ Smart check all available refers to require, adding refer options to `Add require` code actions. ◦ Big improvements on keyword completions. ◦ Add setting `keep-parens-when-threading?` to keep parens for single arity functions when threading. ◦ Avoid adding duplicate requires when adding a new require via code action. ◦ Improve common known snippets to replace completion items, improving completion UX.

🎉 12
🚀 5
catjam 2