Function: eglot-flymake-backend

eglot-flymake-backend is a byte-compiled function defined in eglot.el.gz.

Signature

(eglot-flymake-backend REPORT-FN &rest MORE)

Documentation

A Flymake backend for Eglot.

Calls REPORT-FN (or arranges for it to be called) when the server publishes diagnostics. Between calls to this function, REPORT-FN may be called multiple times (respecting the protocol of flymake-diagnostic-functions).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot-flymake-backend (report-fn &rest _more)
  "A Flymake backend for Eglot.
Calls REPORT-FN (or arranges for it to be called) when the server
publishes diagnostics.  Between calls to this function, REPORT-FN
may be called multiple times (respecting the protocol of
`flymake-diagnostic-functions')."
  (cond (eglot--managed-mode
         (setq eglot--flymake-push-report-fn report-fn)
         (cond
          ;; Use pull diagnostics if server supports it
          ((eglot-server-capable :diagnosticProvider)
           (eglot--flymake-pull))
          ;; Otherwise push whatever we might have, and wait for
          ;; `textDocument/publishDiagnostics'.
          (t (eglot--flymake-push))))
        (t
         (funcall report-fn nil))))