Skip to content

Instantly share code, notes, and snippets.

@reyhansofian
Last active August 4, 2017 13:08
Show Gist options
  • Save reyhansofian/bba5d7711c0fa5d75cd45397593ade53 to your computer and use it in GitHub Desktop.
Save reyhansofian/bba5d7711c0fa5d75cd45397593ade53 to your computer and use it in GitHub Desktop.
let g:neoformat_javascript_prettier = {
  \ 'exe': 'prettier',
  \ 'args': ['--single-quote'],
  \ 'replace': 0,
  \ 'stdin': 1,
  \ 'no_append': 1
  \ }
let g:neoformat_enabled_javascript = ['prettier']
autocmd FileType javascript set formatprg=prettier\ --stdin
autocmd BufWritePre *.js :Neoformat prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment