branch: externals/eglot
commit b868ee168a3c72debb7843d23468c4bba83b95f5
Author: Michał Krzywkowski <[email protected]>
Commit: João Távora <[email protected]>
Fix #260: 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.
---
eglot.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index ef0cb08..f5d81e4 100644
--- a/eglot.el
+++ b/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))