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
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
By default, bracket spacing is true, thus I expect the following format:
import{foo}from'./foo.js';
But vim-prettier is always collapsing that to:
import{foo}from'./foo.js';
What version of vim-prettier are you using - (output of :PrettierVersion) ?
0.2.7
What version of prettier are you using - (output of :PrettierCliVersion) ?
1.19.1
What is your prettier executable path - (output of :PrettierCliPath) ?
prettier
Did this work in previous versions of vim-prettier and/or prettier ?
This is my first time using vim-prettier. Prettier is working as expected in other editors (VS Code).
The text was updated successfully, but these errors were encountered:
When I save the file in nvim, it collapses the brackets. If I then check the file:
prettier --check "foo.js"
Checking formatting...
foo.js
Code style issues found in the above file(s). Forgot to run Prettier?
...then manually running prettier --write "foo.js" puts the spaces back in.
For reference, here are all my plugins:
" My PluginsPlugin'VundleVim/Vundle.vim'Plugin'scrooloose/nerdtree'Plugin'vim-airline/vim-airline-themes'Plugin'vim-airline/vim-airline'Plugin'ctrlpvim/ctrlp.vim'Plugin'sheerun/vim-polyglot'Plugin'fatih/molokai'Plugin'lifepillar/vim-solarized8'Plugin'dracula/vim'Plugin'neoclide/coc.nvim'Plugin'prettier/vim-prettier'Plugin'brooth/far.vim'Plugin'Xuyuanp/nerdtree-git-plugin'Plugin'airblade/vim-gitgutter'Plugin'scrooloose/nerdcommenter'Plugin'scrooloose/nerdtree-project-plugin'Plugin'ryanoasis/vim-devicons'Plugin'vwxyutarooo/nerdtree-devicons-syntax'
And my prettier setting:
" Run prettier before save (async)letg:prettier#autoformat =0autocmdBufWritePre*.js,*.jsx,*.ts,*.tsx,*.json,*.css,*.scss,*.less,*.graphql PrettierAsync
It turns out there was an issue with coc and its config to formatOnSaveFiletypes. Removing JS/TS let vim-prettier behave properly. But since I'm using coc I switched to coc-prettier instead. Is one preferred over the other (coc-prettier or vim-prettier)?
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
By default, bracket spacing is
true
, thus I expect the following format:But vim-prettier is always collapsing that to:
What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?0.2.7
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?1.19.1
What is your
prettier
executable path - (output of:PrettierCliPath
) ?prettier
Did this work in previous versions of vim-prettier and/or prettier ?
This is my first time using vim-prettier. Prettier is working as expected in other editors (VS Code).
The text was updated successfully, but these errors were encountered: