You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let g:prettier#config#trailing_comma = get(g:,'prettier#config#trailing_comma', 'es5')
It doesn't seem to be loading the actual prettier#config#trailing_comma from prettier, so it always goes with the "default" provided in that file.
If I change es5 to all on that line, everything works (although ideally I wouldn't do it there, of course, and it would load the proper defaults from the prettier version)
What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0
What version of prettier are you using - (output of :PrettierCliVersion) ?
3.1.1
What is your prettier executable path - (output of :PrettierCliPath) ?
Did this work in previous versions of vim-prettier and/or prettier ?
Sort of. It worked because prettier hadn't yet changed the default for trailingComma. Once prettier switched the default, however, it started to be overridden by vim-prettier
The text was updated successfully, but these errors were encountered:
gkoberger
changed the title
Vim-Prettier is using its own defaults, not the defaults from prettier (specifically, trailingComma)
Vim-Prettier is using its own defaults, not the defaults from prettier (in my case, trailingComma)
Jan 11, 2024
Do you want to request a feature or report a bug?
A bug
What is the current/expected behavior?
When I run
vim-prettier
, trailingComma is using 'es5' rather than 'all'. In 3.0.0,prettier
switched the default fromes5
->all
.However, for some reason prettier.vim (line 125) decided to override it: https://github.com/prettier/vim-prettier/blob/master/plugin/prettier.vim#L134
This line is the problem:
It doesn't seem to be loading the actual
prettier#config#trailing_comma
from prettier, so it always goes with the "default" provided in that file.If I change es5 to all on that line, everything works (although ideally I wouldn't do it there, of course, and it would load the proper defaults from the prettier version)
What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?1.0.0
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?3.1.1
What is your
prettier
executable path - (output of:PrettierCliPath
) ?/Users/gkoberger/.nvm/versions/node/v18.18.2/bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
Sort of. It worked because
prettier
hadn't yet changed the default for trailingComma. Once prettier switched the default, however, it started to be overridden byvim-prettier
The text was updated successfully, but these errors were encountered: