Prettier doesn't auto-wrap code if printWidth is set in .prettierrc
kecerud opened this issue · 1 comments
kecerud commented
I have a .prettierrc
file in root of my project with following values:
{
"printWidth": 100,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "auto"
}
The problem is, that if i have a long string for example, the prettier won't wrap it and keeps it for the whole terminal width:
Temporary fix is to set columns=100
directly in nvim/init.vim
but I'm still confused why this doesn't work here and it works on vscode for example normally.
chemzqm commented
Use :CocCommand prettier.open-output
to make sure you're using coc-prettier that that buffer.