Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce data model (AST) for editor component #100

Open
nazmulidris opened this issue Apr 24, 2023 · 0 comments
Open

Introduce data model (AST) for editor component #100

nazmulidris opened this issue Apr 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Apr 24, 2023

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:

@nazmulidris nazmulidris added the enhancement New feature or request label Apr 24, 2023
@nazmulidris nazmulidris changed the title Introduce data model (AST / IR) for editor component Introduce data model (AST) for editor component Apr 24, 2023
@nazmulidris nazmulidris closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
@nazmulidris nazmulidris reopened this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant