Wednesday, April 12, 2017

Need to know Laravel's blade template "syntax-name" so I can add it to Sublime Linter's "syntax_map" for html-tidy

I installed SublimeLinter and SublimeLinter-html-tidy packages for Sublime Text 3 and these seem to work fine with .html and .php files, highlighting errors in my html syntax. However, they don't seem to work on .blade.php files, the Laravel Blade template files I use. There is a syntax_map bit in the SublimeLinter settings which looks like this:

"syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "javascript (babel)": "javascript",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python"
        },  

From what I understand, it uses "syntax names" rather than file extensions to identify which linters will be applied to which file types. What is the specific syntax name for blade template files?



via Marko Antonić

Advertisement