Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let g:prettier#config#tab_width not working #313

Open
Nishant-Pall opened this issue Sep 4, 2021 · 4 comments
Open

let g:prettier#config#tab_width not working #313

Nishant-Pall opened this issue Sep 4, 2021 · 4 comments

Comments

@Nishant-Pall
Copy link

Nishant-Pall commented Sep 4, 2021

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

@Daniel-Monroy
Copy link

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

@Nishant-Pall
Copy link
Author

Nishant-Pall commented Jan 4, 2022

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

@aaaaargZombies
Copy link

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'

@theodale
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants