Replace R Mode Definition with Custom Mode

Hi,

Apologies if this has been asked before.

I would like to replace the mode definition for the ‘R’ syntax. I would like to the tokenizer to be able to differentiate between different operator types ie arithmetic, logical, relational and assignment. So I have written a more detailed mode in CodeMirror 5.47.0. To use it I have just tried importing the new mode, however, it doesn’t seem to override the existing ‘R’ mode. How can I override the existing implementation?

Thanks
Preyesh

If you’re loading your own mode and not the built-in one, you should definitely get your own mode. If you’re using the automatic mode loader, that gets its information from mode/meta.js, which will be pointing at the built-in one.