Editor settings via prettier config
- With packer.nvim
use('numToStr/prettierrc.nvim')
- With vim-plug
Plug 'numToStr/prettierrc.nvim'
And that's it. Restart your neovim to see the magic.
Following options are supported:
Following config files are supported in the respective order.
.prettierrc
.prettierrc.json
.prettierrc.yml
.prettierrc.yaml
.prettierrc.toml
Keep in mind, there is no support for nested configuration as of now.
- Supported
{
"trailingComma": "es5",
"tabWidth": 4,
"printWidth": 100
}
- Not Supported
{
"semi": false,
"overrides": [
{
"files": "*.test.js",
"options": {
"semi": true
}
},
{
"files": ["*.html", "legacy/**/*.js"],
"options": {
"tabWidth": 4
}
}
]
}
Following filetype/format are not supported
.prettierrc.{js,cjs}
and.prettierrc.config.{js,cjs}
- I am not going to create a javascipt parserpackage.json
(prettier
option) - Technically, it's possible to support but I am lazy.
You can contribute to the project by filing bug reports or submit PR :)
editorconfig.nvim
- For motivation and guidance