neoclide / coc-prettier

Prettier extension for coc.nvim.
MIT License
546 stars 48 forks source link

Support html parser #43

Open seeARMS opened 4 years ago

seeARMS commented 4 years ago

Need to use HTML parser to format HTML files: https://github.com/prettier/prettier/issues/1882#issuecomment-437631682

Currently only babylon and flow are supported parsers for coc-prettier

mblarsen commented 4 years ago

What needs to be done to support the html-parser. The vetur plugin has something like:

vetur.format.defaultFormatter.css
vetur.format.defaultFormatter.js
vetur.format.defaultFormatter.html
.. and so on

Are you thinking something in lines of that?

prettier.parser = whatever the default is
prettier.parserOverride.html = html

and maybe from tailwind:

tailwindCSS.htmlLanguages = [
  html,
  blade,
  ejs
]

Just thoughts.