branch: externals/eglot
commit 54fc8854b8e0782cb46c46b83af99ed6b65c2688
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
More RLS-specifics: update Flymake diags when indexing done
RLS could/should report diagnostics for every opened file, even if
there aren't any problems. Because it doesn't, loop for every buffer
managed by the process and call eglot--current-flymake-report-fn
* eglot.el
(eglot--server-window/progress): Call eglot--current-flymake-report-fn
---
eglot.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index f865c22..1ba5324 100644
--- a/eglot.el
+++ b/eglot.el
@@ -825,6 +825,9 @@ DEFERRED is passed to `eglot--request', which see."
(or (and (null proc) cur)
(and proc (eq proc cur))))))
+(defvar-local eglot--current-flymake-report-fn nil
+ "Current flymake report function for this buffer")
+
(defun eglot--maybe-activate-editing-mode (&optional proc)
"Maybe activate mode function `eglot--managed-mode'.
If PROC is supplied, do it only if BUFFER is managed by it. In
@@ -969,9 +972,6 @@ called interactively."
"Handle notification telemetry/event"
(eglot--log "Server telemetry: %s" any))
-(defvar-local eglot--current-flymake-report-fn nil
- "Current flymake report function for this buffer")
-
(defvar-local eglot--unreported-diagnostics nil
"Unreported diagnostics for this buffer.")
@@ -1479,7 +1479,13 @@ Proceed? "
(cl-defun eglot--server-window/progress
(process &key id done title message &allow-other-keys)
"Handle notification window/progress"
- (setf (eglot--spinner process) (list id title done message)))
+ (setf (eglot--spinner process) (list id title done message))
+ (when (and (equal "Indexing" title) done)
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when (eglot--buffer-managed-p process)
+ (funcall (or eglot--current-flymake-report-fn #'ignore)
+ eglot--unreported-diagnostics))))))
(provide 'eglot)
;;; eglot.el ends here