Fork me on GitHub
#spacemacs
<
2023-09-07
>
jcd15:09:23

I recently upgraded to 29.1 and it’s made Spacemacs pretty unstable when using cider: I think completion is hanging, but it’s not getting to a point where debug on error is actually catching it. Anyone had this issue and have a fix?

jcd15:09:49

Or maybe it’s magit hanging when I change branches? Let me see if I can reproduce.

jcd15:09:15

Ah disabling LSP linting seemed to make things snappy again. I’ll start with that and see if I can make LSP linting performant.

jcd17:09:54

It’s actually looking like the LSP itself just bogs down after running a bit.

practicalli-johnny13:09:33

I find completion slow when typing so have increased the delay quite significantly using lsp-idle-delay 1.5 as an lsp layer variable, e.g.

(lsp :variables
          lsp-headerline-breadcrumb-enable t              ; Breadcrumb trail
          lsp-headerline-breadcrumb-segments '(symbols)   ; namespace & symbols, no file path
          lsp-ui-peek-enable nil                          ; popups for refs, errors, symbols, etc.
          lsp-semantic-tokens-enable t                    ; enhance syntax highlight
          lsp-treemacs-error-list-current-project-only t  ; limit errors to current project
          lsp-idle-delay 1.5                              ; smooth LSP features response
          lsp-eldoc-enable-hover nil                      ; disable all hover actions
          lsp-ui-doc-enable nil                           ; doc hover popups
          lsp-ui-sideline-enable nil                      ; sidebar code actions visual indicator
          treemacs-space-between-root-nodes nil           ; spacing in treemacs views
          lsp-log-io t                                    ; Log client-server json communication
          )
This is on Emacs 30 built from source a few weeks ago, so should be a similar experience in Emacs 29 I've only recently increased this value, so not sure if it has other consequences, but it seems to help typing speed.

jcd13:09:20

I’ll try that. I like certain features of LSP but it seems to be grinding gears against cider. I still haven’t found a smoking gun for what’s causing things but I’ve had to hard kill eMacs quite a lot in the last few days.

practicalli-johnny14:09:30

You could also try adding the following to dotspacemacs/user-config section of the spacemacs user configuration file

(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024)
From the suggested config at https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#basic-configuration Spacemacs already sets a large number for gc-cons-threshold though...

🙌 2
jcd14:09:13

Thanks! I’ll give both of those a shot.

jcd14:09:44

Closing the loop on this one: I upped the idle time, and that improved things significantly. I also removed the syntax checking layer about an hour later; performance is stable and no lockups since those changes.

practicalli-johnny17:09:48

Thanks. I have the same too and all seems well.