AutoYADM commit: 2025-07-13 17:16:33
This commit is contained in:
parent
f56ce0f748
commit
eb5305d808
2 changed files with 30 additions and 1 deletions
|
@ -14,6 +14,31 @@ hook global WinSetOption filetype=python %{
|
|||
}
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=((java|type)script|jsx) %{
|
||||
set-option window formatcmd %sh{
|
||||
case "$kak_hook_param" in
|
||||
filetype=javascript)
|
||||
ext='js'
|
||||
;;
|
||||
filetype=typescript)
|
||||
ext='ts'
|
||||
;;
|
||||
filetype=jsx)
|
||||
ext='jsx'
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
if dprint output-resolved-config >/dev/null 2>&1; then
|
||||
printf 'dprint fmt --stdin %s' "$ext"
|
||||
else
|
||||
printf 'dprint fmt --stdin %s --config %s' "$ext" "$HOME/.dprint.jsonc"
|
||||
fi
|
||||
}
|
||||
set-option window indentwidth 2
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=yaml %{
|
||||
set-option window formatcmd %{
|
||||
if dprint output-resolved-config >/dev/null 2>&1; then
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"markdown": {
|
||||
"lineWidth": 74,
|
||||
"lineWidth": 80,
|
||||
"textWrap": "always",
|
||||
},
|
||||
"typescript": {
|
||||
"lineWidth": 74,
|
||||
"indentWidth": 2,
|
||||
},
|
||||
"dockerfile": {},
|
||||
"markup": {},
|
||||
"excludes": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue