I'm trying to let Sublime build haml files automatic on save. I've installed SublimeOnSaveBuild, added haml extension:
{
    "filename_filter": "\\.(css|js|sass|less|scss|haml)$",
    "build_on_save": 1
}
and created haml.sublime-build in AppData\Roaming\Sublime Text 3\Packages\User:
{
    "cmd": ["haml"],
    "working_dir": "${file_path:${folder}}",
    "selector": "source.haml",
    "file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
    "windows":
    {
        "cmd": ["haml", "--trace", "$file", "${file_base_name}.html"],
        "shell": "true"
    }
}
As a result it works fine if I set build system = haml, but it doesn't if I try to set automatic ddetection of build system. Can anyone help with this issue?
P.S. I'm using sublime 3 without any additional plugins and extensions, but SublimeOnSaveBuild
P.P.S Also automatic detection works good for scss files
                        
The problem was in line
It happens because file's scope for haml looks a bit different - "text.haml" instead of "source.haml". So I've change line above to:
and in works for me. You may find out the file's scope in sublime by pressing Ctrl + Alt + Shift + P on file's tab