Hey! I’ve set up two synced EditorView
s as described in the split view tutorial. Now, I want them to share lint diagnostics, with one view providing them and the other view (“follower view”) being passed the decorations as a state effect.
When using @codemirror/lint
, I need to add a linter
plugin to both views. So far, I’ve spotted two ways of having the views share their lints:
- Throw an exception in the follower view’s linting handler, e.g.
linter(() => {throw "no"})
. This works, but prints the error on the console. - Patch
@codemirror/lint
to optionally omit thelintPlugin
from thelinter
’s extension array for the follower view. This also works, but I don’t necessarily want to maintain such a patch.
What would be a clean way to do this?