aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMitermayer Reis <mitermayer.reis@gmail.com>2020-08-25 19:47:08 +1000
committerGitHub <noreply@github.com>2020-08-25 19:47:08 +1000
commite193279ee89e994704a4884bd9950046a080e6ac (patch)
treeda9011e80be1ef4d15de3f357b9c4dcf29b05934 /doc
parent87c46da349f035eca36890e880dfe86707117b1e (diff)
parent0241700d62814a1ddafc0227e0c66e9a8e3fae87 (diff)
downloadvim-prettier-e193279ee89e994704a4884bd9950046a080e6ac.tar.xz
Merge pull request #259 from jsit/buffer-cmd-doc
Add buffer-level prettier exec command to doc
Diffstat (limited to 'doc')
-rw-r--r--doc/prettier.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/prettier.txt b/doc/prettier.txt
index b56f6e1..e9cf496 100644
--- a/doc/prettier.txt
+++ b/doc/prettier.txt
@@ -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.