This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # asami (1)
- # babashka (7)
- # beginners (11)
- # biff (2)
- # calva (7)
- # cider (1)
- # clara (5)
- # clj-kondo (221)
- # clojure (83)
- # clojure-boston (3)
- # clojure-conj (1)
- # clojure-europe (9)
- # clojure-uk (1)
- # clojurescript (11)
- # cursive (74)
- # emacs (30)
- # figwheel-main (2)
- # fulcro (13)
- # hyperfiddle (6)
- # lsp (6)
- # malli (2)
- # nyc (4)
- # off-topic (78)
- # practicalli (9)
- # reitit (4)
- # sci (20)
- # shadow-cljs (49)
- # sql (9)
- # xtdb (5)
I've been experiencing a conflict between what seems to be clojure-mode and LSP-mode when
clojure-toplevel-inside-comment-form is set to true (a few others have also had this issue)
When moving the cursor around or editing within a
(comment ) form the Emacs process will jump to 100% and the cursor freezes.
C-g pressed many times will kill what ever process is going awry
When I use clojure-mode with
clojure-toplevel-inside-comment-form without LSP server running, all is fine.
Using LSP with clojure-mode and
clojure-toplevel-inside-comment-form set to nil (or just not set as its not a default) seems to be just fine.
Any thoughts as to what could be causing the conflict? Is this a known issue?
https://github.com/clojure-emacs/clojure-mode/issues/639 looks to be related (looks like they can't get it to reproduce), doesn't explicitly mention lsp, but the backtrace contains some lsp functions, so seems to be involved
Thanks for the links, very useful.
I think lsp-mode uses some functions to get current point or defun and end up using indirectly that clojure-mode function which has that performance issue
For the moment I've disabled that clojure-mode feature by setting the variable to nil (the default) and will evaluate code in a comment form via the last sexp command rather than defun command (placing the cursor at the start of the next line after the expression)
After removing the lsp hover functionality by setting
in the Spacemacs LSP layer variables,
I enabled the top level form evaluation in clojure-mode
clojure-toplevel-inside-comment-form t and no longer have the issue. Thank you.