Fork me on GitHub
#lsp
<
2022-12-04
>
mister_m07:12:00

I'm a bit confused on how to use clojure-lsp -- I have a feeling it might not be working correctly in my emacs. I have a deps.edn project, and a namespace that has a lint error: a function is being called that isn't defined in the current namespace. I have this function defined in a different namespace in the project. Should clojure-lsp know where this function is defined? Should it be able to auto-require from that namespace? Do I need to be jacked in to a cider session in order for that to work? Using something like lsp-find-references does not show any references from the namespace where the function is defined. Something like lsp-ido-workspace-symbol returns a hit for the definition.

mister_m07:12:00

I found it. It was inside the "lsp execute code action" thing. I did not realize that lsp actions were buried in chords using the super key. Took a while to track that down, and figure out how to rebind it to soemthing else that isn't the super key

ericdallo12:12:15

Lsp-mode shows a 💡 on the modeling where there are actions available for that line Also, clojure-lsp is completely based on static analysis, no repl is needed

mister_m15:12:06

I didn't realize things were buried in "code actions". I re-bound the lsp interactions off the hyper key and was able to get into them to auto-require. Thanks!

👍 1