From: Michal Krzywkowski Date: Wed, 8 May 2019 11:33:34 +0000 (+0200) Subject: Only consider eglot's own diagnostics in eglot-code-actions X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~329 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68d95c8125327b7cef0ce496a70abb407bbf9b7f;p=emacs.git Only consider eglot's own diagnostics in eglot-code-actions * eglot.el (eglot-code-actions): Filter out non-eglot diagnostics before sending a request to the server. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/260 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ef0cb08342e..f5d81e4aa4c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2297,10 +2297,9 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp." :end (eglot--pos-to-lsp-position end)) :context `(:diagnostics - [,@(mapcar (lambda (diag) - (cdr (assoc 'eglot-lsp-diag - (eglot--diag-data diag)))) - (flymake-diagnostics beg end))])))) + [,@(cl-loop for diag in (flymake-diagnostics beg end) + when (cdr (assoc 'eglot-lsp-diag (eglot--diag-data diag))) + collect it)])))) (menu-items (or (mapcar (jsonrpc-lambda (&rest all &key title &allow-other-keys) (cons title all))