From: João Távora Date: Thu, 10 May 2018 11:51:21 +0000 (+0100) Subject: More rls-specifics: update flymake diags when indexing done X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~597 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=845063c090678d5888f69ec58baebe215b26f885;p=emacs.git 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 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index f865c22589e..1ba5324de93 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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