I’m trying to implement un editor that can toggle lint feature by user, but even if I remove the plugin by reconfiguring compartment the lint errors keep being displayed.
const compartment = new Compartment();
const editorView = new EditorView({
state: EditorState.create({
extensions: [compartment.of([])]
})
});
function enable() {
editorView.dispatch({ effects: [compartment.reconfigure(linter(() => {...}))] });
}
function disable() {
editorView.dispatch({ effects: [compartment.reconfigure([])] });
}