Closed
Description
Currently, the CodeViewer component uses the same component from CodeEditor to highlight and set the decorators on the code block. However, as this component might be static and it's already read-only, we could try to remove the CodeMirror dependency in order to turn it lightweight and free of dependency.
As a result, this would avoid the initialization a new CodeMirror instance on every new codeblock, and turn the implementation way simple.
TODO:
- Split CodeViewer and CodeMirror in two;
- Implement syntax-highlight;
- Implement decorators;
Reference: reactjs/react.dev#5110