Is now a good time to start replacing Ace Editor with Monaco Editor, the code editor that powers VSCode?

I’ve tried it in my PR for adding Vega/Vega-Lite support and despite the lack of documentation, it feels quite pleasant to use (just use Google a lot).

1 Like

What benefit does it bring over Ace?

Something I noticed while working with both:

  1. Much more advanced IntelliSense and validation. Most notably, there is out-of-the-box support for both autocomplete and validation based on JSON Schemas. It’s what powers VS Code, after all.
  2. Buit-in right-click menu in which you can format code and go to definition.
  3. A modern codebase: everything written in TypeScript; better integration with webpack & ESM.
  4. Buffer name based validation: each buffer can have a virtual filename, and you can define validation schemas based on filename patterns.

Most out-of-the-box functionalities seem not to be available for SQL yet. I like Monaco and believe that eventually it will replace Ace, but currently we would still need to adapt Format and Autocomplete for example.

1 Like

What about package size? How does it compare to Ace?

Also, if we consider replacing the code editor, CodeMirror is another viable option. We actually used it before Ace, and I’m not sure why we switched. They are working on a major rewrite (v6), but it’s unclear what state it is in :thinking: