remove --stdin (#7668)
This commit is contained in:
1 parent
d469140322
commit
1f64401915
10 files changed
+18
-40
No files matched your search
+2
-2
@@ -41,7 +41,7 @@ See `:help autocmd-events` in Vim for details.
|
||||
It's recommended to use a [config file](configuration.md), but you can also add options in your `.vimrc`:
|
||||
|
||||
```
|
||||
autocmd FileType javascript setlocal formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5
|
||||
autocmd FileType javascript setlocal formatprg=prettier\ --single-quote\ --trailing-comma\ es5
|
||||
" Use formatprg when available
|
||||
let g:neoformat_try_formatprg = 1
|
||||
```
|
||||
@@ -125,7 +125,7 @@ Update your `coc-settings.json` for languages that you want format on save.
|
||||
If you want something really bare-bones, you can create a custom key binding. In this example, `gp` (mnemonic: "get pretty") is used to run prettier (with options) in the currently active buffer:
|
||||
|
||||
```
|
||||
nnoremap gp :silent %!prettier --stdin --stdin-filepath % --trailing-comma all --single-quote<CR>
|
||||
nnoremap gp :silent %!prettier --stdin-filepath % --trailing-comma all --single-quote<CR>
|
||||
```
|
||||
|
||||
Note that if there's a syntax error in your code, the whole buffer will be replaced with an error message. You'll need to press `u` to get your code back.
|
||||
|
||||
Reference in new issue
Block a user