From 68d95c8125327b7cef0ce496a70abb407bbf9b7f Mon Sep 17 00:00:00 2001 From: Michal Krzywkowski Date: Wed, 8 May 2019 13:33:34 +0200 Subject: [PATCH] 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 --- lisp/progmodes/eglot.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)) -- 2.39.2