Fork me on GitHub
#cider
<
2024-03-10
>
Jee Lee13:03:44

Hi I'm not sure where I'm going wrong (or if it it even is cider's problem) but could someone give me an idea why certain completions show up but others don't? As you can see from this example, for some reason aero's read-config or anything doesn't show up. But io is required the same way and its completions show up. I'm currently using doom emacs if it matters.

lassemaatta13:03:26

Usually I start debugging by looking at (`C-h v`) the completion-at-point-functions to figure out what functions are providing completion candidates (e.g. cider-complete-at-point or lsp-completion-at-point).

vemv13:03:43

From the visual widgets it looks like you're using a #CPABC1H61 based setup instead

hiredman19:03:48

lsp's completions are from the static analysis that clj-kondo does, and macros often defeat that analysis. areo wraps a lot of definitions in some custom macros which kondo doesn't understand.

🙏 1
oyakushev08:03:03

I have a suspicion that you haven't evaluated your ns form, so the completion backend doesn't know yet that aero is an alias to aero.core. Could that be the case?

Jee Lee10:03:52

That was my initial thought so I tried to load all the namespaces. It turned out to be lsp issue. Everything worked as expected once I turned off the lsp and just used cider

👍 1
lassemaatta10:03:53

you can also check if there's a difference when using lsp-mode vs eglot. I've had some hard-to-reproduce problems with lsp-mode wrt. completions, where (similar to your issue) I sometimes get no completions until I modify the file a little bit. eglot seems to work better in that regard (but might have other issues).

🙏 1
Jee Lee13:03:20

Ah. I’m currently using eglot because it seems to work better for me. I’ll take a look at lsp-mode as well.