Skip to content

Be smarter about when to update diagnostics

Yorick Peterse requested to merge smart-update into main

Instead of always deferring diagnostics by N seconds, we now handle things as follows:

  • When the diagnostics count increases, we defer things as usual
  • When the diagnostics count decreases, we show diagnostics immediately

The idea is that when diagnostics are added, they're not always immediately relevant (e.g. syntax errors after you just finished typing), so we want to defer them. This way you're not immediately bombarded with diagnostics. But when fixing diagnostics, we don't want irrelevant diagnostics to linger around until the deferreal timeout expires.

I'm currently still testing this to see how well this works in practise.

Merge request reports