Emacs Redux: Flymake Can Now Show Diagnostics at the End of the Line

Wait 5 sec.

If you’ve used modern editors like VS Code, you’ve probably noticed how theydisplay error and warning messages inline, right at the end of the offendingline. It’s a nice touch - you don’t have to hover over a squiggly underline orcheck a separate diagnostics buffer to see what’s wrong.Emacs 30 brings this capability to Flymake with the newflymake-show-diagnostics-at-end-of-line option.Enabling it(setq flymake-show-diagnostics-at-end-of-line t)With this set, Flymake will display diagnostic summaries right at the end ofeach affected line, in addition to the usual fringe indicators andunderlines. Here’s what it looks like in an Emacs Lisp buffer with a fewissues (an error, a warning, and a checkdoc note):Display optionsThe option accepts three values: Value Behavior nil Don’t show inline diagnostics (default) short Show only the most severe diagnostic per line t Show all diagnostics for the line If a line has both a warning and an error, the short setting will only show theerror. Using t shows everything - which can get a bit noisy on lines withmultiple issues, but gives you the complete picture at a glance.;; Only show the most important diagnostic per line(setq flymake-show-diagnostics-at-end-of-line 'short)Is this distracting?Honestly, it depends on your taste. The Emacs documentation itself acknowledgesthe trade-off: Depending on your preference, this can either be distracting and easilyconfused with actual code, or a significant early aid that relieves you frommoving the buffer or reaching for the mouse to consult an error message.I’d suggest trying it for a few days. If you find it too noisy, the shortsetting is a good middle ground - you still get inline feedback, but limited tothe most severe issue on each line.I was sure I’d hate this - text floating around in my buffer sounded like pureclutter - but the short variant won me over surprisingly fast. Having themessage right there, without reaching for the mouse or popping open thediagnostics buffer, is one of those small conveniences you stop noticingprecisely because it’s always quietly helping.How do you like to consult your diagnostics - inline, in the fringe, or in adedicated buffer? I’d love to hear your thoughts in the comments!That’s all I have for you today. Keep those errors in plain sight!