kakoune: fix prettier formatter config

This commit is contained in:
Leonardo Eugênio 2025-05-15 12:57:15 -03:00
parent 5dcf7259ed
commit 4c67c260a7
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B

View file

@ -16,15 +16,15 @@ hook global WinSetOption filetype=nix %{
} }
hook global BufCreate .*\.json %{ hook global BufCreate .*\.json %{
set buffer formatcmd 'prettier --parser json' set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
} }
hook global BufCreate .*\.ya?ml %{ hook global BufCreate .*\.ya?ml %{
set buffer formatcmd 'prettier --parser yaml' set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
} }
hook global BufCreate .*\.html %{ hook global BufCreate .*\.html %{
set buffer formatcmd 'prettier --parser html' set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
} }
hook global BufCreate .*\.component\.html %{ hook global BufCreate .*\.component\.html %{
@ -43,11 +43,15 @@ hook global BufCreate .*\.php %{
} }
hook global BufCreate .*\.js %{ hook global BufCreate .*\.js %{
set buffer formatcmd 'prettier --parser babel' set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
}
hook global BufCreate .*\.ts %{
set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
} }
hook global BufCreate .*\.scss %{ hook global BufCreate .*\.scss %{
set buffer formatcmd 'prettier --parser scss' set buffer formatcmd "prettier --stdin-filepath=%val{buffile}"
} }
hook global BufCreate .*\.vue %{ hook global BufCreate .*\.vue %{