Listen for linting changes

With a linter setup is it possible to listen for when the linting results changes?

Currently I am delaying my handler for when docChanged to account for the linting delay, but have to increase it arbitrarily to account for the running of the linting so that the result of diagnosticCount matches the UI.

You could add an update listener which checks for transactions with the setDiagnosticsEffect effect in their set of effects.

Thanks for the quick and helpful answer @marijn led me to being able to detect the addition of the linting errors but don’t see anything I can test for when they’re cleared.

Individual errors aren’t added or cleared. The linter keeps a set of current diagnostics, and completely replaces that when it updates.