[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/eglot2emacs 4f1f06375a 045/120: Prevent empty diagnostic tags ve
From: |
João Távora |
Subject: |
feature/eglot2emacs 4f1f06375a 045/120: Prevent empty diagnostic tags vector hiding main fontification |
Date: |
Thu, 20 Oct 2022 07:16:49 -0400 (EDT) |
branch: feature/eglot2emacs
commit 4f1f06375a219178ba681a6101af1fece73024b0
Author: Brian Leung <bkleung89@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Prevent empty diagnostic tags vector hiding main fontification
* eglot.el (eglot-handle-notification): Require that the resulting
list of faces is non-empty and that each face corresponds only to a
known tag.
For unknown tags, we don't pass any additional face information to
Flymake, and instead expect it to make the appropriate overlay with
the "severity" property of the Diagnostic.
Co-authored-by: João Távora <joaotavora@gmail.com>
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/851
---
lisp/progmodes/eglot.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 5a0a8caba4..3f84b3b7a2 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1866,11 +1866,11 @@ COMMAND is a symbol naming the command."
(current-buffer) beg end
(eglot--diag-type severity)
message `((eglot-lsp-diag . ,diag-spec))
- (and tags
- `((face
- . ,(mapcar (lambda (tag)
- (alist-get tag eglot--tag-faces))
- tags)))))))
+ (when-let ((faces
+ (cl-loop for tag across tags
+ when (alist-get tag
eglot--tag-faces)
+ collect it)))
+ `((face . ,faces))))))
into diags
finally (cond (eglot--current-flymake-report-fn
(eglot--report-to-flymake diags))
- feature/eglot2emacs 917e8ffa31 080/120: Add support for jedi-language-server, (continued)
- feature/eglot2emacs 917e8ffa31 080/120: Add support for jedi-language-server, João Távora, 2022/10/20
- feature/eglot2emacs 9dbc18cbfa 084/120: Tweak some details, fix some bugs, João Távora, 2022/10/20
- feature/eglot2emacs 2a12f622dc 087/120: Eglot-workspace-configuration can be a function, João Távora, 2022/10/20
- feature/eglot2emacs 1986c4df88 089/120: Reply more reasonably to server's workspace/applyedit, João Távora, 2022/10/20
- feature/eglot2emacs bef332a983 101/120: Adjust last commit about workspace configuration, João Távora, 2022/10/20
- feature/eglot2emacs 523547321e 102/120: Allow :initializationoptions in eglot-server-programs, João Távora, 2022/10/20
- feature/eglot2emacs 68b9c03b44 106/120: Don't use three-argument plist-get, João Távora, 2022/10/20
- feature/eglot2emacs 0829d5e7a2 107/120: Revert "fix jdtls support", João Távora, 2022/10/20
- feature/eglot2emacs b205479035 108/120: Fix blunder in eglot--guess-contact, João Távora, 2022/10/20
- feature/eglot2emacs b07fa37d04 113/120: Add half-baked m-x eglot-list-connections, João Távora, 2022/10/20
- feature/eglot2emacs 4f1f06375a 045/120: Prevent empty diagnostic tags vector hiding main fontification,
João Távora <=
- feature/eglot2emacs be47552331 049/120: Change capability 'documentchanges' to t, João Távora, 2022/10/20
- feature/eglot2emacs 27ba1994fe 038/120: ; fix thinko in last commit, João Távora, 2022/10/20