This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-06
Channels
- # announcements (14)
- # babashka (14)
- # beginners (22)
- # calva (56)
- # cider (20)
- # clerk (8)
- # clj-commons (10)
- # clj-kondo (18)
- # cljs-dev (11)
- # clojure (87)
- # clojure-conj (3)
- # clojure-europe (29)
- # clojure-nl (1)
- # clojure-poland (5)
- # clojure-portugal (1)
- # clojurescript (100)
- # data-science (3)
- # datahike (1)
- # datomic (13)
- # events (2)
- # fulcro (10)
- # funcool (2)
- # helix (19)
- # hoplon (6)
- # humbleui (2)
- # hyperfiddle (40)
- # leiningen (5)
- # lsp (22)
- # malli (26)
- # nrepl (2)
- # off-topic (19)
- # reagent (32)
- # releases (1)
- # shadow-cljs (266)
- # spacemacs (6)
- # tools-build (9)
- # vim (1)
Hi folks! I know clojure-lsp understands potemkin's import-var
and provides proper completion and go-to-definition. But I'm experiencing something a bit weird when it comes to docstring/arity info. When I use hover
it shows the correct info, but the completion only shows the function name and the source file.
For context: I'm on neovim using the builtin lsp client and cmp for completion. I'm also using https://github.com/hrsh7th/cmp-nvim-lsp-signature-help which shows the signature help as I'm typing the params and this one also shows the proper information, which makes me thing the problem is scoped to the lsp completion source in cmp.
Could you share a print of what you are seeing on completion and what you expect to see?
This is what I see when in the cmp completion dialog which uses the lsp completioin source. The source file is the file where I used import-vars.
This is what I see when I used the plugin I mentioned above. I haven't checked where exactly they get this info from, I'll take a look.
Here's what I see on hover
. The source file is the file where the var os original def'd.
In the completion (first screenshot) I would expect seeing the docstring and arity information.
Thanks for the detailed info, yeah, could be something on server on client, kinda hard to tell, but if you manage to make a simple repro project with that I can try and confirm where is the bug
Sure, I'll do that. Btw, the plugin apparently - as the name suggest - simply https://github.com/hrsh7th/cmp-nvim-lsp-signature-help/blob/3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1/lua/cmp_nvim_lsp_signature_help/init.lua#L62-L75, so clojure-lsp is definitely making the info available there. The question now is whether the completion problem is server or client as you mentioned.
Hum, yeah, fut from what you are seeing the completion popup I'd guess it's server's fault
I have a weird bug with eglot + clojure-lsp (clangd seems ok) -> https://github.com/joaotavora/eglot/discussions/1202#discussioncomment-5542912
I am not sure what's the culprit, if I remove markdown mode from the picture it works (no error, but I get no doc popup), but it could just be a side-effect
Sorry, I don't have context o about eglot, but I use company-quickhelp with clojure-lsp and works all the time, so it's probably a eglot thing indeed I think
I was wondering if it could be related to the server response maybe, but I ll wait on eglot maintainer to look at it more
I don't think it's server response otherwise we could probably repro in other packages/editors, but you can can confirm checking the <https://clojure-lsp.io/troubleshooting/#client-server-log%7Cclient<->server logs>, and check what server returns after you trigger the completion