Closed SALZKARTOFFEEEL closed 5 years ago
I suggest you rename your custom syntax files to hold the same name as shown in the statusbar (and specified in a syntax's name
field) because this is how they are keyed for all purposes except in the status bar and the command palette. Notably, when using syntax-specific settings the settings' file name must be the same as the sublime-syntax's and not its name
field.
I don't see a reason to parse every syntax file's YAML to fetch their exact name specified inline or even do a regex approximation over the first few lines when the file's name gives the exact same name 99% of the time and in the remaining 1% at least a closely related name.
Well okay.
I thought it would be simpler to get the proper name of the syntax highlighter.
I originally just named it differently so that there were no spaces in the filename, but I guess I'm going to rename it.
And thanks for the info on syntax-specific settings! I didn't know that.
When setting some filed to include
{lang}
(for example:"state": "Working in {lang}"
), the value{lang}
gets replaced with is the filename of the.sublime-syntax
file, not what the name of the language is defined to be (as shown in the status bar).This is an issue for custom syntax highlighters (for example those stored in the
User
folder). The file name does not necessarily reflect the actual syntax name, as defined with thename
field at the top of.sublime-syntax
files.Reference to the
.sublime-syntax
format