-
Notifications
You must be signed in to change notification settings - Fork 391
Improve PlaintextSyntaxHighlighter #2560
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
base: master
Are you sure you want to change the base?
Conversation
Thank you! Is that json format of some other tool / something generic where other languages can be fetched from? |
I referred to these projects for Markor's current JSON syntax highlighting configuration files. Their syntax highlighting definitions are advanced and sophisticated, I don't know how to directly use these files, so I just reused some basic regex from these files, such as keywords, variable, string, number, function and comment ... By the way, I found many text editors use TextMate grammars to highlight. Maybe we can use TextMate grammars for Markor, and if use it, we can directly use these syntax highlighting configuration files. 1. PrismJSPrismJS syntax highlighting configuration files 2. sora-editorUsing TextMate grammars. 3. Xed-EditorXed-Editor syntax highlighting configuration files Using TextMate grammars. 4. Visual Studio CodeUsing TextMate grammars. |
If you feel any is somewhat similar to whats feasible for Markor, feel free to rearrange the json/definition structure. I asked also because saw the keyword list and what came to my mind were Geany filedefs (https://github.com/geany/geany/blob/master/data/filedefs/filetypes.java) |
Make PlaintextSyntaxHighlighter have versatile languages syntax highlight function based on configuration files (JSON), and add several popular language (C, C++, Java, Python) syntax highlight. Which language to be highlighted depends on the plain text file extension.