Fork me on GitHub
#lsp
<
2024-05-08
>
Casey06:05:34

I am getting the The conected server(s) doesn't support renaming error when trying to lap-rename symbols/functions. It definitely worked before. It stopped working after upgrading my emacs-doom (which was several months out of date). Unfortunately I didn't keep the known good before versions. Can someone give me some pointers on how to troubleshoot this? The clojure-lsp server log looks fine. The problem is probably on the emacs side..?

Casey06:05:10

Definitely seems like an emacs issue? It seems emacs lsp-mode thinks the server isn't finished starting. lsp-describe-sesssion shows :

`-[-] clojure-lsp:904158/starting
    |-[-] Buffers
    |  `-[+] app.mybuffer. 
    `-[+] Capabilities 

ericdallo16:05:02

can you check if the project root is correct with lsp-workspace-folders-remove ? also lsp-clojure-server-info may print relevant info

Casey06:05:17

> can you check if the project root is correct with lsp-workspace-folders-remove ? yes it is. > also lsp-clojure-server-info may print relevant info execing this doesn't seem to have any visible effect

ericdallo14:05:13

it prints to the messages buffer

Noah Bogart13:05:07

Is it possible to find out which dependency is the source of a clj-kondo config folder?

Noah Bogart13:05:38

i deleted my deps.edn file to try to debug but a specific config folder keeps reappearing, so i'm really confused

Noah Bogart13:05:11

okay, the classpath was cached, so once i cleared everything, i got an error about running bb print-deps --format classpath which for some reason includes http-kit (and a lot of other stuff), which is causing the http-kit hook to be included in my repo. can this be changed? i don't want or need babashka's "built-in deps" included in my clj-kondo config folder

Noah Bogart13:05:20

i've posted in #CLX41ASCS about this as it's not a clojure-lsp issue

ericdallo14:05:37

Yeah, we do log when clj-kondo copies, maybe we could improve logging

Noah Bogart15:05:26

after speaking with borkdude, it seems that the issue is clojure-lsp calling bb print-deps --format classpath unconditionally. i looked at clojure-lsp's settings and i think i can set the https://clojure-lsp.io/settings/#classpath-scan to only check deps.edn. seems like a heavyweight solution but who's to say

ericdallo16:05:59

yes, currently this is the only solution and I know it's not that user friendly, but I think we can improve that

👍 1
Noah Bogart16:05:22

I'll open a github issue to discuss

sheluchin15:05:36

Is LSP leveraging clj-kondo's :callstack option for :var-definitions these days?

borkdude15:05:19

I guess you could grep lsp's codebase for this

sheluchin16:05:53

@UKFSJSM38 thank you. I saw that it's only used to determine inside-comment? at the moment: https://github.com/clojure-lsp/clojure-lsp/blob/eca423d71e08f232e35525a57b96c972691e5619/lib/src/clojure_lsp/feature/diagnostics.clj#L68 Is there a reason you don't require the same sort of logic on other analysis types, like :namespace-definitions and such?

ericdallo16:05:08

Not sure I got the problem or what would that solve

sheluchin16:05:41

What is the general problem that :callstack solves for LSP now? It's to ignore vars defined inside comment forms when looking up var definitions?

ericdallo16:05:16

AFAI remember, yes

sheluchin16:05:20

Wouldn't it make sense to extend the same logic to namespace definitions, for example?

ericdallo16:05:10

I don't think so, the code that uses the :callstack it's for the clojure-lsp/unused-public-var diagnostic, and we don't have that for namespaces

sheluchin17:05:47

I see. That makes sense. Thanks for the bit of background @UKFSJSM38.

👍 1