vim-prettier icon indicating copy to clipboard operation
vim-prettier copied to clipboard

let g:prettier#config#tab_width not working

Open Nishant-Pall opened this issue 3 years ago • 4 comments

What is the current/expected behavior? whenever I execute :Prettier it's using tab spaces as 2, even though I have set the value as let g:prettier#config#tab_width = 4

What version of vim-prettier are you using - (output of :PrettierVersion) ? 1.0.0-beta

What version of prettier are you using - (output of :PrettierCliVersion) ? 2.3.1

What is your prettier executable path - (output of :PrettierCliPath) ? .config/nvim/vim-prettier/node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ? No

Nishant-Pall avatar Sep 04 '21 19:09 Nishant-Pall

Hello, you found a solution? I have the same problem :(

Daniel-Monroy avatar Dec 03 '21 20:12 Daniel-Monroy

Hey, I didnt fix it but I did reset my neovim and everything and never encountered this again. Maybe that'll help you. I did switch to 0.6 neovim maybe that's the reason

Nishant-Pall avatar Jan 04 '22 12:01 Nishant-Pall

I had the same issue and I think it was to do with this

" use tabs instead of spaces: true, false, or auto (use the expandtab setting).
" default: 'auto'
let g:prettier#config#use_tabs = 'auto'

aaaaargZombies avatar Mar 02 '22 14:03 aaaaargZombies

To solve this you need to add let g:prettier#config#use_tabs = 'false' to your .vimrc. Then you can use let g:prettier#config#tab_width = 2 as intended.

theodale avatar Dec 14 '22 14:12 theodale