This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-17
Channels
- # ai (1)
- # announcements (1)
- # aws (38)
- # babashka (25)
- # beginners (84)
- # biff (11)
- # calva (58)
- # clerk (14)
- # clj-kondo (14)
- # cljdoc (9)
- # cljs-dev (2)
- # clojars (2)
- # clojure (93)
- # clojure-czech (2)
- # clojure-dev (13)
- # clojure-europe (19)
- # clojure-nl (1)
- # clojure-spec (13)
- # clojure-uk (2)
- # clojurescript (6)
- # conjure (1)
- # core-async (9)
- # cursive (12)
- # data-science (7)
- # datahike (47)
- # datalevin (10)
- # datalog (3)
- # datomic (35)
- # emacs (3)
- # events (4)
- # fulcro (49)
- # gratitude (7)
- # humbleui (1)
- # hyperfiddle (42)
- # jobs-discuss (19)
- # kaocha (5)
- # lsp (20)
- # malli (3)
- # meander (2)
- # membrane (2)
- # off-topic (22)
- # pathom (2)
- # polylith (14)
- # practicalli (1)
- # rdf (3)
- # reitit (2)
- # shadow-cljs (11)
- # squint (3)
- # tools-deps (32)
- # vim (9)
- # xtdb (16)
You know what would be nice (perhaps it exists already?) is to have a lsp action that does this:
I do it one-by-one:
(deftest test-test)
Go to deftest
Run action
Add import
It's not ideal but it's a step towards something.
Hello everyone, is there any known issues using neovim
with clojure-lsp
? I cannot figure out why I'm getting micro-stutters (every 2 seconds I get ~100-300ms freezes) whenever I have clojure-lsp
enabled.
• I am restricted to using WSL2
on Windows.
• There are no Windows
files/links in the folder I am working in.
• I am using Arch WSL2
with nvim v0.9.0
.
• There are no issues found when running :checkhealth
.
• There are no standard warning or errors logged anywhere as far as I can tell. :messages
is empty as well.
• The project I am working in is a ClojureScript
project which uses both Leiningen
and shadow-cljs
• I have no issues in Calva
or Doom Emacs
. But I want to use neovim
😅
• If I check htop
in another terminal window nvim --embed .
takes up 50-100% CPU with a clojure-lsp
attached buffer open (I started nvim
in my project folder with nvim .
)
• I've tried disabling every plugin except what is required for clojure-lsp
to run with Mason
and I still have micro-stutters.
• I am running Windows 10 21H2
• Here's my neovim
config: https://github.com/greensponge/nvim
I guess I'll just disable clojure-lsp
when using neovim
if we can't figure this out, but that would be a shame.
I'm not aware of any clojure-lsp issues related to that, but I saw other people complaining about that ton neovim, I have no nvim experience, but It's probably something to be fixed on neovim side. Maybe @U7ERLH6JX or @UEENNMX0T know anything?
That’s pretty odd! I don’t have a windows machine or I’d give it a go myself. Which version of neovim are you using? Which clojure-lsp?
I use a similar setup on Linux and Mac and I have zero issues.
If you add in your ~/.lsp/config.edn
the :log-path "/tmp/clojure-lsp.out"
and check if there is any regular log in there
BTW what installation of the clojure-lsp you are using the package from aur?
Thank you for the responses, here's some additional context:
I have installed:
• neovim 0.9.0-2
from extra/neovim
on my ArchWSL.
• clojure-lsp 2023.05.04-19.38.01
with Mason
• aur/clojure-lsp-bin 2:2023.05.04_19.38.01-1
Uhm it's the binary then, I was afraid you were using the jar
If I check /tmp/clojure-lsp.out
as suggested I mostly have rows that look like this:
2023-05-26T11:32:16.574Z INFO [clojure-lsp.server:102] - :publish-diagnostics 0ms
Nothing out of the ordinary I think, it refreshes clojuredocs cache, analyze-files-in-watched-dir once etc.
I have a few warnings like this:
2023-05-26T11:32:11.296Z WARN [clojure-lsp.kondo:328] - Non-fatal error from clj-kondo: No configs copied.
But it's a non-fatal warning so not sure if that's relevant.
Those logs are ok. Maybe you could get the <https://clojure-lsp.io/troubleshooting/#client-server-log%7Cclient<->server logs> and check if server is taking time to do anything. But my guess is still nvim for wsl2 doing something different
Thanks for the suggestion, I didn't find anything in those jsonrpc logs either unfortunately. I believe you are correct @UKFSJSM38, that it's something to be fixed on the nvim
side.
If someone has any other ideas I'm open for it, though I'll just use some other editor that works until I'm not on Windows
in the meantime.
I think give visibility to nvim maintainers would be the best, otherwise we may just leave this issue where others may be facing, it could even be something that happen on nvim with other LSP servers, I suggest opening an issue in nvim
Good news! Looks like this was fixed with the latest neovim
release (released 20h ago):
https://github.com/neovim/neovim/commit/7d4bba7aa7a4a3444919ea7a3804094c290395ef
Not sure which one of these fixes did the trick, but after updating to neovim 0.9.1-1
I can use the editor again with clojure-lsp
in WSL2
without stuttering.