]> git.eshelyaron.com Git - emacs.git/commit
Don't ignore flymake-no-changes-timeout
authorJoão Távora <joaotavora@gmail.com>
Thu, 19 May 2022 08:59:55 +0000 (09:59 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 19 May 2022 09:00:13 +0000 (10:00 +0100)
commit5c6eb3caa903ad1479b3e901cee4b845bada1f1e
tree4ad59d6944ed067796fe90092eb6f961fcb73c1e
parent50ff73d753708467621d6ce8495a5d78dc31ae63
Don't ignore flymake-no-changes-timeout

Also per https://github.com/joaotavora/eglot/issues/957.

Only actually and eagerly report LSP diagnotics if the user has
Flymake starting automatically on a timer (flymake-no-changes-timeout
is a number).

By contrast, if flymake-no-changes-timeout is nil, the user starts the
diagnostic collection process on-demand via 'M-x flymake-start'.

Since the control of such collection is impossible with LSP, we should
just hold on to whatever diagnostics we have (which are presumably
up-to-date) until the next invocation of 'eglot-flymake-backend'.

For now, this doesn't affect Flymake "list-only" diagnostics.  Those
are reported via the 'flymake-list-only-diagonstics' variable and
are always communicated immediately to it.

* eglot.el: (eglot-handle-notification
textDocument/publishDiagnostics): Consult flymake-no-changes-timeout.

Suggested-by: Jim Davis <jim.jd.davis@gmail.com>
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/508
lisp/progmodes/eglot.el