Skip to content

Commit

Permalink
Merge pull request prettier#259 from jsit/buffer-cmd-doc
Browse files Browse the repository at this point in the history
Add buffer-level prettier exec command to doc
  • Loading branch information
mitermayer authored Aug 25, 2020
2 parents 87c46da + 0241700 commit e193279
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/prettier.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ Running before saving, changing text or leaving insert mode:
let g:prettier#quickfix_enabled = 0
autocmd BufWritePre,TextChanged,InsertLeave *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
<
Buffer-level custom commands

To use an alternative command, like `prettier-stylelint`, set this at the
buffer level with `b:prettier_exec_cmd`, e.g.:
>
au FileType css,scss let b:prettier_exec_cmd = "prettier-stylelint"
<
vim-prettier will look for the executable in the same places it looks for
`prettier`, and will fall back to `prettier` if it can't find
`b:prettier_exec_cmd`

Overwrite default prettier configuration

**Note:** vim-prettier default settings differ from prettier intentionally.
Expand Down

0 comments on commit e193279

Please sign in to comment.