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
The logic surrounding autoformat_config_present basically only runs once (when the plugin is loaded). It is desirable for that logic to be deferred until the buffer is actually written in at least two cases:
If you create a prettier config file in the project after you started the vim instance or
If you just happened to have started vim in a different directory, then :cd'ed into the directory where a prettier config file resides (or a subdirectory of such a directory)
The former bug is hopefully straightforward, but I've given more detail for the latter bug below in case it's not clear.
STR:
In .vimrc
letg:prettier#autoformat =0" default settingletg:prettier#autoformat_config_present =1" default is 0
Did this work in previous versions of vim-prettier and/or prettier ?
Pretty sure the same behavior has been present since the introduction of autoformat_config_present in #212
The text was updated successfully, but these errors were encountered:
cjlarose
changed the title
autoformat_config_present does not re-evaluate the presense of the prettier config file after vim is startedautoformat_config_present does not re-evaluate the presence of the prettier config file after vim is started
Apr 8, 2020
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
The logic surrounding
autoformat_config_present
basically only runs once (when the plugin is loaded). It is desirable for that logic to be deferred until the buffer is actually written in at least two cases:prettier
config file in the project after you started the vim instance or:cd
'ed into the directory where a prettier config file resides (or a subdirectory of such a directory)The former bug is hopefully straightforward, but I've given more detail for the latter bug below in case it's not clear.
STR:
In
.vimrc
Example project structure:
Open
vim
,:cd
(or:lcd
or:tcd
in nvim), open the file and saveExpected
Prettier runs when you save the buffer
Observed
Prettier does not run
What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?1.0.0-alpha
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?2.0.4
What is your
prettier
executable path - (output of:PrettierCliPath
) ?Did this work in previous versions of vim-prettier and/or prettier ?
Pretty sure the same behavior has been present since the introduction of
autoformat_config_present
in #212The text was updated successfully, but these errors were encountered: