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)
Hello everyone, I'm using neovim
using packer
and mason
. I am restricted to a Windows machine using WSL2
and I am developing a ClojureScript
application using shadow-cljs
. I am also using Conjure
, which might be relevant. I am listing these keywords in hopes you might understand my following issue:
Everything is smooth usually, and if I install clojure-lsp
using mason
I get the helpful LSP
features I would expect, but the editor starts micro-freezing every ~3 seconds for maybe 500ms
each time. This makes the editor unusable. My question is, does anyone know why this could be? I've tried leaving the editor running for a while in case it does some slow caching, but that did nothing.
Context:
• As far as I can tell I am not mixing any Windows files and working strictly inside WSL2 with Linux files, as I've noticed even having one Windows file somewhere can cause severe performance issues.
• I am running Windows 10 21H2 with the MS store version of WSL2
• The config I'm using: https://github.com/greensponge/nvim
I heard that when WSL2 tries to communicate with Windows then it's slow.
Is it possible that you have a part of your editor on Windows side (let's say you run LSP there) and part of your editor in WSL side (nvim)?
Is it possible to run LSP fully inside WSL2? This way you could at least avoid this network hop between your environments.
Also somebody mentioned that if your project or temp files are located in Windows side and not WSL2 side then every time you interact with them you have this network hop.
So for instance if nvim creates some kind of temporary file (let's say it's a .clj-kondo
or .lsp
temp files in your project root) then you could be unknowingly be changing their contents and it could be one of the sources for this freeze too.
I've tried double checking but can't find anything, I have cloned down my project to ~/greensponge/myProject
and all the .clj-kondo/.lsp etc.
therein should be contained within WSL/Linux? I can't find anything that would reference back to Windows at least.
I've also tried to re-install clojure
, leiningen
and used different versions of the jdk
--currently using v17
.
Additional context, I'm using this Arch WSL
:
https://github.com/yuk7/ArchWSL
I ruled out the WSL distro, I installed a fresh vanilla Ubuntu, cloned down my project to ~
, and after setting up Neovim and getting it running I experience the same stuttering / freezing. ¯\(ツ)/¯
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.