This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-12
Channels
- # announcements (7)
- # babashka (13)
- # beginners (14)
- # business (7)
- # clerk (4)
- # clj-kondo (21)
- # clojure (42)
- # clojure-denmark (5)
- # clojure-dev (16)
- # clojure-europe (27)
- # clojure-finland (1)
- # clojure-nl (1)
- # clojure-norway (36)
- # clojure-sweden (2)
- # clojure-uk (34)
- # clojurescript (29)
- # datomic (15)
- # emacs (1)
- # hyperfiddle (13)
- # jobs (11)
- # joyride (8)
- # malli (15)
- # missionary (10)
- # off-topic (5)
- # portal (6)
- # releases (3)
- # shadow-cljs (9)
- # spacemacs (28)
- # specter (2)
- # squint (12)
Is it normal that formatting .clj files is sluggish in the practicalli setup?
When the file length grows to be around 80 lines, I've noticed this couple of times. Whenever I refactor something a bit, I can notice the slowness.
If I format the entire document with , = =
that too is slow (sometimes 2-3 secs or even more).
I haven't noticed anything myself. First think I would check is the clojure-lsp version being used by Emacs. Does having the repl running affect the speed of format (could be cider & clojure-clj fighting, but this is unlikely although easy to check) It could be native compilation, I found Emacs a bit slower for some things with it enabled. I compiled Emacs 29.2 without native-como at the weekend, so will give that a try this evening and see if I can replicate the format issue
I have around 10 clj buffers open. Does that matter? I'm asking because quite new to spacemacs.
Usually it's very long linese.g 100s of characters. Or lots of line, e.g in a log buffer or repl buffer (although Practicalli sets a repl buffer line limit of 100 lines)
If Emacs is fast otherwise, then it's probably a package that's not behaving properly.
If you have some examples code to share that has the problem, I can test it out.
If there is general slowness it's usually the combination of a specific Emacs distribution and a specific Operating system
https://github.com/nakiya/htmx-examples-clojure I'm working on this and I have most of the clj files open I guess. Ubuntu 22.04, emacs v29.2, nproc = 8
I will give it a try after dinner. It could be htmlx aspects.
Is there a difference between the speed of using
, = b
(which calls lsp-format-buffer ) and
, = =
(which calls cider-format-buffer )
While , = =
takes ~2 secs. First the entire buffer text coloring disappears and gets reformatted at the end.
I suspect there is something in the htmx examples code that trips up the Cider format, perhaps because its htmlx (although that is a guess).
One way is to try a different Clojure project and see if the issue occurs there too.
Or use , = b
and avoid the issue.
I cant seem to emulate the issue, at least not in a way I notice.
I guess would be that Clojure LSP is formatting the buffer after using , = =
is used to format the buffer with Cider. Resulting in the code sense and syntax highlighting being refreshed.
Or it could be an issue with the LSP mode client, but that seems less likely.
I suggest sticking with , = b
and = r
to format the buffer or region using LSP rather than Clojure.
Or if not using Clojure LSP diagnostic and tools, disable Clojure LSP formatting.
I don't have time to check for a day or two, but if wanted to find out what's causing the sluggishness, how do I go about it? Any general pointers on debugging this kind of thing?
The troubleshooting page has some guidance on debugging issues https://practical.li/spacemacs/install-spacemacs/troubleshooting/#scorched-earth-approach
The sluggishness seems to have gone down a little bit. I reset my spacemacs and cleaned up some of my user customizations. But it's still not as snappy as I see people have in videos.
When searching for a command, I'm not able to select anything that's in the second section - only ones in History. Neither arrow down nor C-n work. This used to work for me some time ago but it broke at same point. Even after I did a new installation,it's still broken. Anyone else experiencing the same problem? How can I debug it?
I'm using Emacs 29.2 and arrow keys or C-j
& C-k
navigate history and recent lists
I am using Evil mode (for many years now). I wonder if the issue is related to the changes in helm-descbinds (although that seems unlikely). I will run another Spacemacs package and see if I can replicate the issue I think I'll pin an older version of helm-descbinds as it's still interfering with which-key (until the maintainer of that package stops actively breaking things)
I havent been able to replicate the issue. I can use arrow keys, C-j , C-k, C-n & C-p to navigate the helm list. Maybe there is some issue with the .spacemacs (or .spacemacs.d) configuration being used. That is the only thing I can think of.
I'm still suffering from this problem with navigation in helm buffers.
The other place where it shows is list-buffers
- as with commands, I enter a partial name and it shows some matches from open buffers. But I'm not able to move to the Recentf section at all.
Pressing C-n
/ C-p
only oscillates between the items in the Buffers section.
I can jump to Create buffer via C-v
or M-S-v
I'm still suffering from this problem with navigation in helm buffers.
The other place where it shows is list-buffers
- as with commands, I enter a partial name and it shows some matches from open buffers. But I'm not able to move to the Recentf section at all.
Pressing C-n
/ C-p
only oscillates between the items in the Buffers section.
I can jump to Create buffer via C-v
or M-S-v