borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
558 stars 18 forks source link

Compatibility with SublimeLinter-contrib-htmllint and SublimeLinter-contrib-htmlhint #173

Open phts opened 5 years ago

phts commented 5 years ago

Is it possible to add compatibility with plugins https://github.com/necramirez/SublimeLinter-contrib-htmllint and https://github.com/htmlhint/SublimeLinter-contrib-htmlhint with Naomi->HTML syntax.

They seem to check syntax "html".

Most likely here could be a similar fix as for #171

borela commented 5 years ago

The detection by syntax name was deprecated, ideally we would update the HTML linter to detect it by the scope text.html like the yaml linter does here.

~But there might be other old plugins doing the same thing, so I'll change the CSS too to improve compatibility.~

borela commented 5 years ago

The change I proposed earlier would not work because of the (Naomi) suffix. I'll send a pull request to the linter's repo to fix the issue.

borela commented 5 years ago

I sent a pull request to the respective repos:

https://github.com/necramirez/SublimeLinter-contrib-htmllint/pull/6 https://github.com/htmlhint/SublimeLinter-contrib-htmlhint/pull/11

On the shortterm, you can add this setting to sublime linter:


{
    "linters": {
        "htmlhint": {"selector": "text.html"},
        "htmllint": {"selector": "text.html"},
    }
}
phts commented 5 years ago

Cool thanks!