-
With most recent eglot and emacs (as of today) I'm getting an error in my python-mode buffers. While eglot is trying to show hover info, it gets a treesit error. I'm using eldoc and treesit a bunch of other stuff so I'm not sure where the real bug is.
and getting an error. Somehow markdown mode is involved too; see the stack trace. The markup arg passed to
I'm using
I note that the following patch appears to fix it for me: modified eglot.el
@@ -1813,7 +1813,7 @@ Doubles as an indicator of snippet support."
(message-log-max nil)
match)
(ignore-errors (delay-mode-hooks (funcall mode)))
- (font-lock-ensure)
+ (ignore-errors (font-lock-ensure))
(goto-char (point-min))
(let ((inhibit-read-only t))
(when (fboundp 'text-property-search-forward) ;; FIXME: use compat The stack trace looks like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
More of a markdown-mode problem right? Anyway, what happens is that Eglot delegates this fontification to markdown-mode who then eventually delegates it to Emacs major modes. In in Emacs a lot of new "tree-sitter" modes with slightly new semantics and breakage are appearing, so you get the error in Eglot. Put a condition-case-unless-debug there instead of the ignore-errors |
Beta Was this translation helpful? Give feedback.
-
Thanks. Revised patch: modified eglot.el
@@ -1813,7 +1813,9 @@ Doubles as an indicator of snippet support."
(message-log-max nil)
match)
(ignore-errors (delay-mode-hooks (funcall mode)))
- (font-lock-ensure)
+ (condition-case-unless-debug oops
+ (font-lock-ensure)
+ (error (eglot--warn (error-message-string oops))))
(goto-char (point-min))
(let ((inhibit-read-only t))
(when (fboundp 'text-property-search-forward) ;; FIXME: use compat |
Beta Was this translation helpful? Give feedback.
Thanks. Revised patch: