Diagnostic delay in doom

I started using emacs very recently and decided to begin with doom emacs as it offers a lower barrier to entry. I was trying out the python mode, but noticed that diagnostic information take a little bit too long to display. Here’s a video where I compare doom (bottom) and neovim (top): video. With neovim, diagnostics appear almost immediately after exiting insert mode. So, I was wondering if the delay in emacs is inherent to emacs or maybe there is some variable the doom has set that defines the delay. For emacs,I am using the version with native compilation support, and for python, I am using the LSP.

There are several variables that control how long flycheck (or flymake) waits before it preforms diagnostic. The main ones involved here are:

  • flycheck-idle-change-delay
  • flymake-no-changes-timeout
  • lsp-idle-delay

Look them up with C-hv to see their documentation, what package they’re defined in, and current value (after their containing packages are loaded), and use C-hv to search for other variables with the name delay or idle in it.

Their upstream defaults tend to be relatively conservative, and Doom prefers more conservative defaults. To make them kick in faster, lower these delays in your config:

(after! PACKAGE


;;; add to $DOOMDIR/config.el
(after! flycheck
  (setq flycheck-idle-change-delay 0.5))

Side note: in the future, please do not ignore the issue template. At the very least, your M-x doom/info would have been very helpful here in ruling out issues or mistakes.

1 Like

Sorry for not following the guidelines. Thanks for the help! This actually fixed the issue. Is there any reason why the default delay is set high? Wouldn’t that make emacs appear less responsive?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.