-
Notifications
You must be signed in to change notification settings - Fork 3
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
Syntax Highlighting on Website for Soar Code #24
Comments
Wow, a Soar lexer would be really amazing! Writing a general Soar parser is really difficult, but it looks like you don't actually have to do that to get syntax highlighting. This will make our website look a lot better, but will also do the same for anyone else that wants to write/blog about Soar, which would be really wonderful. Thank you! I'm looking forward to this. |
Gonna note here since I was thinking about it: It would be great to have syntax highlighting on GitHub, too, but GitHub asks that there be at least 200 unique repositories that contain a particular language before accepting a new extension to linguist, and I don't think we qualify yet: https://github.com/search?q=path%3A%2F%28%5E%7C%5C%2F%29.*%5C.soar%24%2F&type=code. |
As of now, the lexer works fairly good, see examples, but everything is very gray due to the coloring of mkdocs material and the pygments tokens for Any idea/ suggestion on how to separate ExamplesLeft-side displays updated version with local pygments version with Soar support, left-side is current upstream version. Light mode example: Dark mode example: |
Not sure what |
I decided to declare all identifiers as |
Since the pygments PR is not reviewed yet this already enables the Soar syntax highlighting and might allow us to catch existing bugs. This also enables the use of mkdocs material code annotations. Related: SoarGroup#24
Since the pygments PR is not reviewed yet this already enables the Soar syntax highlighting and might allow us to catch existing bugs. This also enables the use of mkdocs material code annotations. Related: SoarGroup#24
Since the pygments PR is not reviewed yet this already enables the Soar syntax highlighting and might allow us to catch existing bugs. This also enables the use of mkdocs material code annotations. Related: #24
It would be nice, if the Soar code snippets on the website would have syntax highlighting.
According to the MkDocs Material docs relies on pygments to highlight the syntax of code blocks. Unfortunately, pygments does not have a Soar lexer, yet.
I have created a pygments lexer for Soar in my fork, but this needs more work until it might be in a state which is acceptable to be merged in pygments.
Tasks for native highlighting for Soar code via mkdocs:
The text was updated successfully, but these errors were encountered: