Hello TiddlyFolks,
While building the CodeMirror 6 plugin I read a lot about Syntax Highlighting and that custom Highlighting can be achieved for unsupported languages.
Now, TiddlyWiki5 language is such an unsupported language.
The challenge is, that TiddlyWiki5 language will need a mixed parser like the CodeMirror 6 Markdown parser (that’s my personal verdict).
A mixed parser parses uses the Lezer parser and other parsers and combines them.
TiddlyWiki5 uses:
- HTML syntax
- TiddlyWiki5 markdown-like syntax
- Widget syntax
- Filter syntax
- CSS syntax
- Codeblocks within WikiText
- Macro syntax
- …
We would need to understand, how we can make the future CodeMirror 6 TiddlyWiki5 parser split a TiddlyWiki5 syntax text into semantic tokens that can then be used for Syntax Highlighting (and autocompletion, too).
I’m writing these lines because I hope that with the power of more brains we can achieve something.
I have the knowledge how to integrate the parser, how to generate a parser from a lezer.grammar file and “put it into the library”.
What I don’t have is the correct approach, that’s why I ask if interested Forum members could leave their comments, maybe we find a suitable approach
That’s all for now,
best wishes from sunny Southtyrol,
Simon