coc-html icon indicating copy to clipboard operation
coc-html copied to clipboard

Passing arguments to Tidy?

Open xiumingzhang opened this issue 2 years ago • 0 comments

Good work! If I'm not wrong, coc-html implicitly runs Tidy on the buffer, giving error and warning hints for the current buffer content.

I often use Tidy to auto-format my HTML code with

tidy -m /path/to/my.html

Is there a way to pass -m to Tidy so that my buffer gets auto-formatted on every buffer write? Thanks.

Update

Achieved this with neomake by adding:

let g:neomake_html_enabled_makers = ['tidy']
let g:neomake_html_tidy_maker = { 'args': ['-modify'] }

to my neovim configuration. But this, together with coc-html, will run Tidy twice, right? Doesn't sound optimal to me.

xiumingzhang avatar May 15 '22 18:05 xiumingzhang