From 9239cbef77d1e3312eb7a8d076cc0d4f671d1fe0 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 2 Apr 2025 17:11:01 -0300 Subject: [PATCH] kakoune: add json and yaml formatter --- user/kakoune/filetypes.kak | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index 7ea774e..01b0175 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -15,6 +15,14 @@ hook global WinSetOption filetype=nix %{ set buffer formatcmd 'nixfmt' } +hook global BufCreate .*\.json %{ + set buffer formatcmd 'prettier --parser json' +} + +hook global BufCreate .*\.ya?ml %{ + set buffer formatcmd 'prettier --parser yaml' +} + hook global BufCreate .*\.html %{ set buffer formatcmd 'prettier --parser html' }