Closed fgimian closed 3 months ago
I think this need to add configuration from https://github.com/textmate/toml.tmbundle/blob/master/Syntaxes/TOML.tmLanguage into https://github.com/danipen/TextMateSharp .
There also is https://github.com/tamasfe/taplo/blob/master/editors/vscode/toml.tmLanguage.json that is fresher and in a supported JSON format
Here's how to add unsupported syntax highlighting in this program.
TextMateSharp
compatible language grammar under the src/Resources/Grammars/
directorymodify src/Models/TextMateHelper.cs
file, find the constructor of RegistryOptionsWrapper
, then add the filename of your grammar to the extraGrammarFiles
array.
public RegistryOptionsWrapper(ThemeName defaultTheme)
{
_backend = new RegistryOptions(defaultTheme);
_extraGrammars = new Dictionary<string, IRawGrammar>();
string[] extraGrammarFiles = ["toml.json"]; // Add the filename of your grammar here
foreach (var file in extraGrammarFiles)
{
Hey there, amazing job on this application!
I noticed that TOML files (which are quite prominent in Rust and Python projects) don't have syntax highlighting. Any chance of adding support for them please?
Thanks Fotis