1 Using Flymake

Flymake is only useful if at least one backend is configured to provide the buffer-checking service. This is done via the hook flymake-diagnostic-functions. See Hooks in The Emacs Editor.

It’s possible that some major modes or a third-party package has already setup this hook for you, by adding backend functions to flymake-diagnostic-functions. If you know Elisp you may also write your own Flymake backend functions. See Backend functions.

When the Emacs LSP support mode Eglot is enabled, Flymake will use that as an additional back-end automatically. See Eglot Features in Eglot: The Emacs LSP Client