Open ghost opened 1 year ago
Big +1 on adding typst syntax highlighting. To me, typst feels like a word and latex killer, and is rapidly growing and developing. Support would be lovely!
I'm hoping to implement just such a thing. It doesn't seem like we can have our own "plug in" syntax highlighting files (the way we can with e.g. color schemes), so I presumably will have to create a pull request to have it merged into the main codebase, unfortunately.
It doesn't seem like we can have our own "plug in" syntax highlighting files (the way we can with e.g. color schemes)
I think we actually can. You can put your own syntax .yaml or .hdr files to ~/.config/micro/syntax
directory.
Also if you want to do it via a plugin, you should be able to do it via something like this in your plugin:
config.AddRuntimeFile("typst", config.RTSyntax, "typst.yaml")
That said, although the above should work, why not add it to the main micro codebase instead? FWIW it's the first time I hear about typst, but if it's useful, why not have its syntax support available out of the box?
Description of the problem or steps to reproduce
I think it would be help to add Typst syntax:
https://github.com/zyedidia/micro/tree/master/runtime/syntax
maybe not the full language, but at least the basics:
https://typst.app/docs/reference/syntax https://github.com/typst/typst