You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the editor component's data model is an array of Strings. This needs to be parsed all the time by the syntax highlighter which is lossy since this happens for every render.
It would be better to have an AST (like DOM) that is kept in memory and modified by the editor component. This also has the benefits of allowing code folding and all kinds of smart refactoring operations to be performed in the editor.
This AST could then be dumped into MD when saving the editor buffer to disk or whatever persistent storage.
Currently the editor component's data model is an array of Strings. This needs to be parsed all the time by the syntax highlighter which is lossy since this happens for every render.
It would be better to have an AST (like DOM) that is kept in memory and modified by the editor component. This also has the benefits of allowing code folding and all kinds of smart refactoring operations to be performed in the editor.
This AST could then be dumped into MD when saving the editor buffer to disk or whatever persistent storage.
Look into tree sitter:
The text was updated successfully, but these errors were encountered: