YAPF clears the buffer on formatting
- Lingua principale
- Vim Script
- Stelle
- 1.1k
- Fork
- 102
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Describe the bug**
I have set yapf as my default formatter in .vimrc and whenever I save a .py file, it clears the buffer. And if I change it to black or autopep8, it doesn't.
**To Reproduce**
Minimal vimrc:
```vim
Plug 'google/vim-maktaba'
Plug 'google/vim-codefmt'
Plug 'google/vim-glaive'
call plug#end()
call glaive#Install()
augroup autoformat_settings
autocmd FileType bzl AutoFormatBuffer buildifier
autocmd FileType c,cpp,proto,javascript,arduino AutoFormatBuffer clang-format
autocmd FileType dart AutoFormatBuffer dartfmt
autocmd FileType go AutoFormatBuffer gofmt
autocmd FileType gn AutoFormatBuffer gn
autocmd FileType html,css,sass,scss,less,json AutoFormatBuffer js-beautify
autocmd FileType java AutoFormatBuffer google-java-format
autocmd FileType python AutoFormatBuffer black
autocmd FileType rust AutoFormatBuffer rustfmt
autocmd FileType vue AutoFormatBuffer prettier
augroup END
```
**OS (version)**
Windows 10
NVIM v0.4.3 and vim-plug
yapf 0.30.0
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.