reywood / sublime-project-specific-syntax

Allows syntax settings to be specified per project in Sublime Text
GNU Lesser General Public License v3.0
87 stars 8 forks source link

Support per-folder overrides #12

Closed timothybasanov closed 6 years ago

timothybasanov commented 7 years ago

I'd like to have different overrides in the same project for different folders:

{
    "folders":
    [
        {
            "folder_include_patterns":
            [
                ".ssh"
            ],
            "path": "/Users/foo",
            "syntax_override": {
                ".*": ["ShellScript", "Shell-Unix-Generic"]
        }
        },
        {
            "folder_exclude_patterns":
            [
                "web"
            ],
            "path": "."
        }
    ]
}
halilim commented 6 years ago

I'm not sure if I'm on the same page but, I was able to apply an override to all of the subfolders with a certain name like this:

{
  "folders":
  [
    {
      "path": "."
    }
  ],
  "syntax_override": {
    ".*/templates/.*\\.html$": ["HTML Underscore Syntax", "HTML (Underscore)"]
  }
}
reywood commented 6 years ago

Looks like @halilim has a good solution. Thanks!

isalinas11 commented 6 years ago

Thanks @halilim this worked perfectly for syntax override per folder