nvim: after/ftplugin: javascript: Add keymapping to invoke prettier
Different prettier versions format differently. Add a keymapping to invoke the project local prettier. Using Neoformat prettier uses the global install prettier which can give different results.
This commit is contained in:
parent
cb1358df1b
commit
1ba2fee97d
1 changed files with 1 additions and 0 deletions
1
nvim/.config/nvim/after/ftplugin/javascript.vim
Normal file
1
nvim/.config/nvim/after/ftplugin/javascript.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
nmap <buffer> <silent> gf :!npx prettier --write %:p<CR>:e<CR>
|
Loading…
Reference in a new issue