neoclide/coc-prettier

Per extension Prettier settings override ?

SirWrexes opened this issue · 1 comments

Hello, thanks for this cool extension I use very day !

I would like to know if there is a way to override Prettier settings (in my case, tabWidth) based on file extensions.
Either via CoC config, or some VimScript tricks such as autocmd FileType *.ext...

I would like to have tabWidth=2 when writing *.jsx/*.tsx, and tabWidth=4 when writing regular *.js/*.ts.
Is this possible ? And if not, can I propose this as an enhancement suggestion ?

Thanks !

It's vim's shiftwidth option, use autocmd like autocmd FileType javascript setl shiftwidth=2