Disable syntasic html/tidy checker for a file
Asked Answered
P

3

9

Is there a way to disable the html/tidy plugin for syntastic for a certain file?

I have a handlebars template that contain an empty <tbody></tbody> tag as a placeholder, and I keep getting the error trimming empty <tbody> [html/tidy]

Is there a way to either disable this specific rule, or just disable the html/tidy plugin for this specific file?

Prevailing answered 19/9, 2015 at 14:18 Comment(0)
S
6

Try to put this in your .vimrc

let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute " ,"trimming empty <", "unescaped &" , "lacks \"action", "is not recognized!", "discarding unexpected"]

This solves more things than one but I think it can be helpful. More on this here.

Spinule answered 19/9, 2015 at 14:43 Comment(1)
Thanks for the list of rules! Any way I could put these in a config file for the project instead?Prevailing
Q
6

I was running into this with .hbs and .html templating for a node project. Adding this to my .vimrc helped:

let syntastic_mode_map = { 'passive_filetypes': ['html'] }

more options here https://github.com/scrooloose/syntastic/issues/240

Quintan answered 29/10, 2016 at 19:15 Comment(0)
C
3

Additionally, if you just want to turn warnings off for html tidy:

let g:syntastic_html_tidy_quiet_messages = { "level" : "warnings" }

I have found this is a welcome setting for editing twig templates.

Of course for more info, in vim:

:h syntastic-checkers
Cardholder answered 1/2, 2018 at 15:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.