Some servers such as cquery and clangd publish diagnostic with
identical start and end positions.
* eglot.el (eglot-handle-notification
:textDocument/publishDiagnostics): Add 1 to :line since LSP lines
are 0-based. Don't subtract 1 from :character, since both emacs and
LSP have 0-based columns.
(let* ((st (plist-get range :start))
(diag-region
(flymake-diag-region
- (current-buffer) (plist-get st :line)
- (1- (plist-get st :character)))))
+ (current-buffer) (1+ (plist-get st :line))
+ (plist-get st :character))))
(setq beg (car diag-region)
end (cdr diag-region))))
(eglot--make-diag (current-buffer) beg end