Fork me on GitHub

[Emacs] 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?

hiredman22:03:56 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 lsp-eldoc-enable-hover nil 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.