Closed michaelblyons closed 5 years ago
Pretty sure I inherited that rule when I took over ApplySyntax, but I could be wrong. I'll take a look when I get a chance and get back to you. I need to refresh on overrides.
Turns out, none of these work:
{
// If you have PackageDev installed, use it for tmPreference files
"syntax": [
"PackageDev/TextMate Preferences",
"PackageDev/TextMate Preferences (PList / XML)",
"PackageDev/TextMate Preferences/TextMate Preferences",
"TextMate Preferences",
"TextMate Preferences (PList / XML)",
"TextMate Preferences/TextMate Preferences",
"XML/XML",
],
"extensions": ["tmPreferences"],
},
I'm not sure how easy it is to override. User rules may just append, I'll have to check. Just haven't had a chance yet.
User rules may just append
Nuts, you're right. I am very opinionated that the order should be switched so user rules come first.
I didn't come up with the current design. I'm not the original author. I think the original idea was that the default rules were universally desired.
I mean we could add a package dev rule. We could also overhaul the current rule system to be more flexible.
I have the venerable PackageDev package installed, which has some specialty language definitions. Unfortunately, ApplySyntax overrides one of them (the one for
.tmPreferences
files) and sets it to XML with the default rules. I'd like to override it back in my User Settings' rules, but I can't seem to get it to work. I've tried these things so far:I'm curious why you even need the
first_line
rule in thedefault_syntaxes
. It basically duplicates the first line matching already inXML.sublime-syntax
.