neoclide / coc-html

Html language server extension for coc.nvim.
208 stars 6 forks source link

Passing arguments to Tidy? #54

Closed xiumingzhang closed 1 year ago

xiumingzhang commented 2 years ago

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.

chemzqm commented 1 year ago

It can't use tidy, vscode-html-languageservice is used