]> git.eshelyaron.com Git - emacs.git/commit
Support optional diagnostic.tags
authorBrian Leung <bkleung89@gmail.com>
Tue, 11 Jan 2022 05:48:21 +0000 (21:48 -0800)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 13 Jan 2022 12:32:08 +0000 (13:32 +0100)
commit0f44d338f17bd426ab43f6a619873c9ac91bc51e
treec775b790442fb2db550e5664eb1c7824b83bfc85
parenta905bad63305b456eeaaa5d716b9f7fcb60ec5ab
Support optional diagnostic.tags

https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#diagnosticTag

A DiagnosticTag can be either 1 (DiagnosticTag.Unnecessary) or
2 (DiagnosticTag.Deprecated).  Following the rendering suggestions in
the protocol, we fade out Unnecessary code and strike-through
Deprecated code.

* eglot.el (eglot-diagnostic-tag-unnecessary-face)
(eglot-diagnostic-tag-deprecated-face): New faces.
(eglot--tag-faces): New defconst.
(eglot--lsp-interface-alist): Add Diagnostic.tags.
(eglot-client-capabilities): Advertise supported tags.
(eglot-handle-notification): Assign the appropriate properties.

* eglot-tests.el (diagnostic-tags-unnecessary-code): New test.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/794
lisp/progmodes/eglot.el