-
-
Notifications
You must be signed in to change notification settings - Fork 911
Clojure: Emacs hangs after moving point around a comment
form
#2698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for the detailed report, checking the stacktrace, it seems an issue when emacs is applying the highlighting font-face. |
This is what is causing trouble, can you find us the real value that is used for that call? You can find it using lsp-workspace-show-log in combination with setting lsp-print-io or with using M-x trace-function RET lsp--fontlock-with-mode |
@yyoncho is this what you're looking for? |
looks correct to me the server response |
Can you confirm that evaluating the following blocks: (lsp--fontlock-with-mode
"```clojure\nlambdaisland.glogi/logger\n```\n```clojure\n[n]\n[n level]\n```\n\n----\n```clojure\nGet a logger by name, and optionally set its level. Name can be a string\nkeyword, or symbol. The special keyword :glogi/root returns the root logger.\n```\n----\n*/Users/kommen/work/glogi/src/lambdaisland/glogi.cljs*"
'lsp--render-markdown) |
No, calling that from |
Actually, AFAICS the string from the blocking call starts like that |
Sorry, my bad:
And yes, this hangs when running it in ielm:
|
can you do this:
and then open /tmp/foo.md? |
Opening that /tmp/foo.md also results in Emacs hanging with 100% cpu usage. |
I suggest you try upgrading all packages, even you may try to delete your whole elpa to force redownloading the packages. I don't think the issue is lsp-mode related it seems like it is clojure-mode related, probably some odd setting(or interaction with cider?). If you are unable to fix it with these steps I guess it will be better to ask in clojure-mode repo, most likely they will be able to help right away. |
make sure that you revert all clojure-mode related changes in your config. |
Thank you folks, the issue appears whenever I have this enabled However, I don't get how the interaction between this and lsp can cause the problem I'm seeing? When disabling lsp I don't have any issues working in that clojure project. |
lsp-mode uses markdown mode to render the eldoc help which uses clojure-mode to render clojure sections. So lsp-mode is affected by this clojure-mode bug. |
Marking the bug as closed since there is nothing to address on lsp-mode side. |
FTR if you |
Describe the bug
Emacs hangs with 100% CPU usage and can only be force killed
To Reproduce
Move point around the
comment
form here: https://github.com/nextjournal/glogi/blob/ee8889e44d0b208ab4638d089c6724deb6d24324/src/lambdaisland/glogi.cljs#L39-L42Expected behavior
Emacs not hanging 😅
Which Language Server did you use
clojure-lsp
OS
macOS 10.15.7 (19H524)
Error callstack
Captured when Emacs hangs with 100% CPU usage,
debug-on-quit
enabled, and hittingC-g
multiple times (hitting it once doesn't trigger it):=> Nothing gets logged into
*lsp-log*
while Emacs is using 100% CPUNothing gets logged into the clojure-lsp log file
Emacs Version:
GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H524)) of 2021-03-05
lsp version: LSP ::
lsp-mode 20210307.1909, Emacs 28.0.50, darwin
lsp-clojure-server-info
lsp-doctor:
Emacs config: Latest spacemacs develop branch (syl20bnr/spacemacs@b7cbcb5) with these layers enabled and all packages up to date as of today:
Unfortunately
emacs -q -l lsp-start-plain.el
doesn't reproduce the issue. With my setup it reproduces 100% of the time.The text was updated successfully, but these errors were encountered: