From: Brian Leung Date: Tue, 11 Jan 2022 03:32:19 +0000 (-0800) Subject: Don't error out on unsupported diagnostic.codedescription X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9adb310e08410b555651d7b819671842bd99f2c1;p=emacs.git Don't error out on unsupported diagnostic.codedescription A codeDescription property is, at the time of writing, an object with an href property (of type URI, or a string), denoting a "URI to open with more information about the diagnostic error". It's not obvious how best to put this into a Flymake diagostic aside from simply appending it to the diagnostic message, so we'll worry about it some other time. * eglot.el (eglot--lsp-interface-alist) (eglot-client-capabilities): Don't error out on unsupported Diagnostic.codeDescription. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/768 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 80eb58f5791..bdd0dcccc5e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -351,7 +351,7 @@ This can be useful when using docker to run a language server.") :sortText :filterText :insertText :insertTextFormat :textEdit :additionalTextEdits :commitCharacters :command :data)) - (Diagnostic (:range :message) (:severity :code :source :relatedInformation)) + (Diagnostic (:range :message) (:severity :code :source :relatedInformation :codeDescription)) (DocumentHighlight (:range) (:kind)) (FileSystemWatcher (:globPattern) (:kind)) (Hover (:contents) (:range)) @@ -689,7 +689,11 @@ treated as in `eglot-dbind'." :formatting `(:dynamicRegistration :json-false) :rangeFormatting `(:dynamicRegistration :json-false) :rename `(:dynamicRegistration :json-false) - :publishDiagnostics `(:relatedInformation :json-false)) + :publishDiagnostics (list :relatedInformation :json-false + ;; TODO: We can support :codeDescription after + ;; adding an appropriate UI to + ;; Flymake. + :codeDescriptionSupport :json-false)) :experimental eglot--{}))) (defclass eglot-lsp-server (jsonrpc-process-connection)