kakoune: add pint as formatter

This commit is contained in:
Leonardo Eugênio 2024-10-23 12:35:07 -03:00
parent 93b652b952
commit 4532cb43fa
4 changed files with 13 additions and 0 deletions

View file

@ -124,6 +124,7 @@
zbar
wl-clipboard
];
pint-fmt = [ ];
powerplay-led-idle = [
bash
libinput

7
scripts/pint-fmt Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
file="$(mktemp --tmpdir=/dev/shm).php"
cat - >"$file"
./vendor/bin/pint --quiet "$file"
cat "$file"
rm "$file"

View file

@ -133,6 +133,7 @@ in
emmet-cli
nodePackages.prettier
pint-fmt
aspell
aspellDicts.en

View file

@ -30,6 +30,10 @@ hook global WinSetOption filetype=angular %[
add-highlighter buffer/angular ref html
]
hook global BufCreate .*\.php %{
set buffer formatcmd 'pint-fmt'
}
hook global BufCreate .*\.js %{
set buffer formatcmd 'prettier --parser babel'
}