1
votes

I would like to use Monaco to edit ES6 code and would like syntax coloring. Monarch provides a basic JavaScript tokenizer at https://microsoft.github.io/monaco-editor/monarch.html, but it isn't ES6 compliant. The typescript languages tokenizer is ES6 compliment, but when it comes with a lot of extra features I don't want, like code completion and type hints.

Is it possible to use only the typescript tokenizer, or is there a monarch tokenizer for ES6?

1

1 Answers

0
votes

When passing options to an editor instance, you can disable most providers:

const options = {
  value: 'var c=1;',
  hover: false, 
  quickSuggestions: false,
  wordBasedSuggestions: false
};
monaco.editor.create(DOMElement, options);

All possible options are detailed here.