Skip to content

Commit

Permalink
Don't error out on unsupported diagnostic.codedescription
Browse files Browse the repository at this point in the history
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 joaotavora/eglot#768
  • Loading branch information
leungbk authored and skangas committed Jan 12, 2022
1 parent 538bfe2 commit 859f49e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lisp/progmodes/eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 859f49e

Please sign in to comment.