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
Build custom MD parser w/ custom extensions (metadata, smart list support). Get ideas from emacs org mode: https://youtu.be/cxoE2FhOIgI
Build custom syntax highlighter for MD parser
Use syntect as well in the MD parser & syntax highlighting in editor component
Motivation for this change
Currently in the editor component, syntax highlighting breaks when a new line is added. Here's an example.
**bold <- this appears bold
bold** <- this does not
I suspect the issue is the naive way in which we am doing syntax highlighting (1 line at a time). The helix editor uses the same syn hi engine and it handles the example above w/ no issues.
Also, lists are highlighted a single line at time, and it's not really possible to collect a smart list and its items that span multiple lines & multiple levels of indentation.
Thoughts on writing a custom MD parser using nom & ditching syntect
Potentially use nom in order to write a custom parser for MD. This has the advantage of being able to theme it intricately.
Leverage syntect as well (for code blocks that have lang specified). And fallback on the syntect highlighter. The implementation results in a nice interaction/animation almost where something will be highlighted using syntect & then overridden w/ the custom highlighter (when it has more specificity).
Also make color support smarter so that the R3BL syntect theme can fallback to ANSI colors on macOS (truecolor isn't supported)
Misc
This link has all the background info, videos, tutorials,
code, etc. on nom:
Overview
Motivation for this change
Currently in the editor component, syntax highlighting breaks when a new line is added. Here's an example.
I suspect the issue is the naive way in which we am doing syntax highlighting (1 line at a time). The helix editor uses the same syn hi engine and it handles the example above w/ no issues.
Also, lists are highlighted a single line at time, and it's not really possible to collect a smart list and its items that span multiple lines & multiple levels of indentation.
Thoughts on writing a custom MD parser using nom & ditching syntect
lang
specified). And fallback on the syntect highlighter. The implementation results in a nice interaction/animation almost where something will be highlighted using syntect & then overridden w/ the custom highlighter (when it has more specificity).Misc
This link has all the background info, videos, tutorials,
code, etc. on nom:
https://github.com/nazmulidris/rust_scratch/blob/main/nom/README.md
test image for upload
![out](https://user-images.githubusercontent.com/2966499/231541489-e9b2a11a-22a9-4c92-9380-8cb90065c9ce.gif)
new screenshot for docs
https://user-images.githubusercontent.com/2966499/233481838-b6da884f-f73d-4e1f-adef-94beb9761c46.mp4
new screenshot for linkedin (gif)
![tui-v0 3 3-10fps](https://user-images.githubusercontent.com/2966499/233799311-210b887e-0aa6-470a-bcea-ee8e0e3eb019.gif)
new screenshot for linkedin (gif)
![rc-prototype-10fps](https://user-images.githubusercontent.com/2966499/234949476-98ad595a-3b72-497f-8056-84b6acda80e2.gif)
The text was updated successfully, but these errors were encountered: