(1+ (plist-get (plist-get range :end) :line)))))))
(cons beg end)))
+(defvar-local eglot--versioned-identifier 0)
+
(cl-defmethod eglot-handle-notification
- (server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics
- &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode'
+ (server (_method (eql textDocument/publishDiagnostics))
+ &key uri diagnostics version
+ &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode'
"Handle notification publishDiagnostics."
(cl-flet ((eglot--diag-type (sev)
(cond ((null sev) 'eglot-error)
(with-current-buffer buffer
(cl-loop
initially
+ (if (and version (/= version eglot--versioned-identifier))
+ (cl-return))
(setq flymake-list-only-diagnostics
(assoc-delete-all path flymake-list-only-diagnostics))
for diag-spec across diagnostics
`(,truename . (:uri ,(eglot-path-to-uri truename :truenamep t))))))
(cdr eglot--TextDocumentIdentifier-cache))
-(defvar-local eglot--versioned-identifier 0)
-
(defun eglot--VersionedTextDocumentIdentifier ()
"Compute VersionedTextDocumentIdentifier object for current buffer."
(append (eglot--TextDocumentIdentifier)