lsp 2025-02-10

I am happy to see clojure-lsp is much faster now

๐Ÿš€ 1

I was wondering, do I need to configure anything to find references? I have a namespace with a function that is referenced in another namespace. lsp, however, mentions 0 references. if the usage is in the same namespace it does work.

are both namespaces on your classpath?

๐Ÿ™ 1

ah after loading the core.cljs into lsp it does find the reference

not sure how I can add it to my classpath when opening the project? itโ€™s a leiningen + shadow-cljs project

> If a shadow-cljs.edn is found at the project root, clojure-lsp will run npx shadow-cljs classpath

thank you

another reference thatโ€™s not found, comes from the integration test

hmm

you need to configure lsp such that your integration tests are on the classpath

that lsp is going to analyze

this seems to work for lsp as well

you need to do this in the lsp config file, not in clj-kondo's

ah ok interesting

perhaps it works because it merges stuff, but you can't count on this

๐Ÿ‘ 1

is there a way to prevent the โ€œ1 referenceโ€ to go underneath the function name? so that it always appears on the right?

What does LSP actually still do after disabling all these features? ๐Ÿ™‚

The only thing I notice is that I am missing aggressive-indent-mode

or you have to specifically look for the features?

i do notice the new keybindings

you can check all features https://clojure-lsp.io/features/

๐Ÿ‘ 1

great thank you I have taken them over as well ๐Ÿ™‚

What editor/plugin are you using?

emacs/spacemacs

if using lsp-mode, there is the lsp-lens-place-position variable, but the default is already end-of-line

great

warnings appear on the right and seemingly push the reference down

yeah, sounds like a problem with the warnings ui, I don't have lsp-ui sideline enabled for this and other reasons

ah let me disable it too

good to know thatโ€™s where it comes from

FYI: I set options in the https://github.com/practicalli/spacemacs-config/blob/main/init.el#L119 for a minimal set of UI elements (config includes basic descriptions of options)