emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 22dc2f7 034/139: Ready to start fixing flymake in


From: João Távora
Subject: [elpa] externals/eglot 22dc2f7 034/139: Ready to start fixing flymake integration
Date: Mon, 14 May 2018 09:54:49 -0400 (EDT)

branch: externals/eglot
commit 22dc2f7ba341b66bc904afa0ffa75b7da86a413e
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Ready to start fixing flymake integration
    
    * eglot.el (eglot-editing-mode): Turn on flymake-mode.
    (eglot-flymake-backend): Always start by reporting no diagnostics.
    (eglot--textDocument/publishDiagnostics): No annoying message.
---
 eglot.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eglot.el b/eglot.el
index d3428a7..aa23252 100644
--- a/eglot.el
+++ b/eglot.el
@@ -573,7 +573,6 @@ running.  INTERACTIVE is t if called interactively."
       (eglot--warn "outdated publishDiagnostics report from server"))
      (buffer
       (with-current-buffer buffer
-        (eglot--message "OK so add some %s diags" (length diagnostics))
         (cl-flet ((pos-at
                    (pos-plist)
                    (car (flymake-diag-region
@@ -662,6 +661,7 @@ running.  INTERACTIVE is t if called interactively."
     (eglot-mode 1)
     (add-hook 'after-change-functions 'eglot--after-change nil t)
     (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)
+    (flymake-mode 1)
     (if (eglot--current-process)
         (eglot--signalDidOpen)
       (if (y-or-n-p "No process, try to start one with `eglot-new-process'? ")
@@ -857,7 +857,10 @@ running.  INTERACTIVE is t if called interactively."
 (defun eglot-flymake-backend (report-fn &rest _more)
   "An EGLOT Flymake backend.
 Calls REPORT-FN maybe if server publishes diagnostics in time."
-  ;; FIXME: perhaps should call it immediately?
+  ;; call immediately with no diagnostics, this just means we don't
+  ;; have them yet (and also clears any pending ones).
+  ;;
+  (funcall report-fn nil)
   (setq eglot--current-flymake-report-fn report-fn)
   (eglot--maybe-signal-didChange))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]