[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot d2eca65 045/139: Fix another Flymake sync bug
From: |
Jo�o T�vora |
Subject: |
[elpa] externals/eglot d2eca65 045/139: Fix another Flymake sync bug |
Date: |
Mon, 14 May 2018 09:54:51 -0400 (EDT) |
branch: externals/eglot
commit d2eca65b86acea1e7ce293f737806affec8f89c4
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix another Flymake sync bug
* eglot.el (eglot-flymake-backend): Only report unreported sometimes.
(eglot--maybe-activate-editing-mode): Start flymake explicitly
when didOpen.
(eglot--textDocument/publishDiagnostics): No need to set
unreported-diagnostics to nil.
(flymake): Require it.
---
eglot.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/eglot.el b/eglot.el
index ccf4b72..3561da2 100644
--- a/eglot.el
+++ b/eglot.el
@@ -32,6 +32,7 @@
(require 'pcase)
(require 'compile) ; for some faces
(require 'warnings)
+(require 'flymake)
(defgroup eglot nil
"Interaction with Language Server Protocol servers"
@@ -657,12 +658,11 @@ running. INTERACTIVE is t if called interactively."
message))))
into diags
finally
- (if (null eglot--current-flymake-report-fn)
- (setq eglot--unreported-diagnostics
- diags)
- (funcall eglot--current-flymake-report-fn
- diags)
- (setq eglot--unreported-diagnostics nil))))))
+ (if eglot--current-flymake-report-fn
+ (funcall eglot--current-flymake-report-fn
+ diags)
+ (setq eglot--unreported-diagnostics
+ diags))))))
(t
(eglot--message "OK so %s isn't visited" filename)))))
@@ -724,7 +724,8 @@ that case, also signal textDocument/didOpen."
(and proc (eq proc cur)))
(unless eglot-editing-mode
(eglot-editing-mode 1))
- (eglot--signalDidOpen)))))
+ (eglot--signalDidOpen)
+ (flymake-start)))))
(add-hook 'find-file-hook 'eglot--maybe-activate-editing-mode)
@@ -947,10 +948,11 @@ Records START, END and LENGTH locally."
(defun eglot-flymake-backend (report-fn &rest _more)
"An EGLOT Flymake backend.
Calls REPORT-FN maybe if server publishes diagnostics in time."
- ;; Call immediately with anything unreported (this will clear any
- ;; pending diags)
- (funcall report-fn eglot--unreported-diagnostics)
- (setq eglot--unreported-diagnostics nil)
+ ;; Maybe call immediately if anything unreported (this will clear
+ ;; any pending diags)
+ (when eglot--unreported-diagnostics
+ (funcall report-fn eglot--unreported-diagnostics)
+ (setq eglot--unreported-diagnostics nil))
;; Setup so maybe it's called later, too.
(setq eglot--current-flymake-report-fn report-fn)
;; Take this opportunity to signal a didChange that might eventually
- [elpa] externals/eglot 92bf3a0 038/139: Signal textDocument/didClose, (continued)
- [elpa] externals/eglot 92bf3a0 038/139: Signal textDocument/didClose, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot b511b7d 036/139: Redesign and simplify parser, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 328c7ae 025/139: Auto update mode-line after setting some process properties, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 2b61a3b 048/139: Delete two useless forward declarations, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 88e3655 040/139: Appease checkdoc.el, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot c948713 035/139: Auto-reconnect on unexpected connection loss, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 1dc2a9f 021/139: Implement spinners and RLS's window/progress, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 931093e 032/139: Don't clutter UI with warnings, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 95983c9 028/139: Change status to error everytime an error is found, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot be52e1e 037/139: Rework connection restarting again, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot d2eca65 045/139: Fix another Flymake sync bug,
Jo�o T�vora <=
- [elpa] externals/eglot f7f77e1 044/139: Make M-x eglot the main entry point, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot d90efdf 001/139: Initial commit, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 1514e0f 052/139: Fix a couple of Rust-related edge cases, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot b4dd4f8 022/139: Report server status in the mode-line, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 6689a15 026/139: Add eglot-clear-status interactive command, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot a3545fb 050/139: Rename RPC methods for clarity, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 9665a3e 051/139: Fix textDocument/didChange, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot eebd32b 059/139: When user declines to reconnect, first quit existing server, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 17e0ca4 047/139: Fix Flymake diagnostic positions, Jo�o T�vora, 2018/05/14
- [elpa] externals/eglot 9d404c9 054/139: Update README.md, Jo�o T�vora, 2018/05/14