This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-16
Channels
- # announcements (1)
- # babashka (13)
- # beginners (33)
- # calva (26)
- # cherry (33)
- # clerk (5)
- # clj-kondo (3)
- # clojure (40)
- # clojure-europe (24)
- # clojure-finland (2)
- # clojure-norway (29)
- # clojurescript (18)
- # cursive (2)
- # datomic (6)
- # docker (11)
- # emacs (12)
- # events (1)
- # fulcro (71)
- # graalvm (8)
- # hyperfiddle (2)
- # lsp (23)
- # meander (5)
- # off-topic (36)
- # polylith (4)
- # re-frame (6)
- # reitit (13)
- # shadow-cljs (87)
- # spacemacs (1)
- # tools-deps (19)
- # vim (5)
- # xtdb (57)
A thought occurred to me: When typing a literal namespaced map, is clojure-lsp able to use the namespace of the namespaced map to sort the keyword completions (so as to offer keywords, that have the same namespace as the literal namespaced map, first in the list of completions)?
It's possible, clojure-lsp doesn't do that for completions at the moment, but it has the analysis to do so
Thank you for answering, and thanks for pointing out to write an issue, writing helps to clear my thoughts too 🙂 I'll see if I can write an issue, the idea that lead me to this asking this is a bit specific and maybe out of scope (writing Terraform config as EDN while providing autocompletion), but started to think if there is something here that could be generally helpful.
Yeah, I can see how convenient it is to suggest first the keywords of the namespaces map in the namespaced map, but seeing a real example would be good
trying my luck here as well as #clj-kondo https://clojurians.slack.com/archives/CHY97NXE2/p1684239240461329
AFAICS looks like a nvim LSP client issue, I don't know those details, maybe ask in #C0DF8R51A or wait for other people that can help
this doesn't happen in other LSP servers (eg Python). It happens when trying to open zipfiles / jars from $HOME/.m2
directory, which is were library deps are located
i'm on nvim 0.9.0 . downgrading to 0.8.3 returns same error but nvim doesn't hang afterwards
trying to open the file directly with zipfile scheme opens an empty buffer and nvim hangs:
# nvim zipfile:///home/ory/.m2/repository/com/stuartsierra/component/1.0.0/component-1.0.0.jar::com/stuartsierra/component.cljc
and the swap file created (because nvim crashed) shows this one, why all backslahes turn into %
?
# ls
zipfile:%%%home%ory%.m2%repository%com%stuartsierra%component%1.0.0%component-1.0.0.jar::com%stuartsierra%component.cljc.swo
zipfile:%%%home%ory%.m2%repository%com%stuartsierra%component%1.0.0%component-1.0.0.jar::com%stuartsierra%component.cljc.swp
found the plugin and neovim version combination that cause the issue. Probably irrelevant to clojure-lsp . https://github.com/Olical/conjure/issues/494
Also, reason I got the first error (cursor position outside buffer) was because I was using Lazy plugin manager which disables Neovim's zipPlugin by default - so opening zipfiles fails. Re-enabling this pluging moved me to the next error, where CPU util is 100% by clojure-lsp process
Sorry for the delay, glad you found the plugin cause that, I recall seeing other people with same issue
disabling conjure still reproduces the issue and you can see clojure lsp is on 100 cpu util
Hum, when clojure-lsp opens a external .class file it decompiles it, besides that there's nothing that should use a lot of CPU, only the didOpen request which calls kondo to analyze the file, but should be fast.