Update instructions for configuring Neoformat (#11946)

Co-authored-by: fisker Cheung <[email protected]>
This commit is contained in:
Wyatt Anderson
2021-12-20 09:21:53 +08:00
committed by GitHub
co-authored by fisker Cheung
parent c847de4e71
commit a91465dfde
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -17,6 +17,12 @@ The best way to install Neoformat is with your favorite plugin manager for Vim,
Plug 'sbdchd/neoformat'
```
In order for Neoformat to use a project-local version of Prettier (i.e. to use `node_modules/.bin/prettier` instead of looking for `prettier` on `$PATH`), you must set the `neoformat_try_node_exe` option:
```vim
let g:neoformat_try_node_exe = 1
```
Run `:Neoformat` or `:Neoformat prettier` in a supported file to run Prettier.
To have Neoformat run Prettier on save:
@@ -18,6 +18,12 @@ The best way to install Neoformat is with your favorite plugin manager for Vim,
Plug 'sbdchd/neoformat'
```
In order for Neoformat to use a project-local version of Prettier (i.e. to use `node_modules/.bin/prettier` instead of looking for `prettier` on `$PATH`), you must set the `neoformat_try_node_exe` option:
```vim
let g:neoformat_try_node_exe = 1
```
Run `:Neoformat` or `:Neoformat prettier` in a supported file to run Prettier.
To have Neoformat run Prettier on save: