aboutsummaryrefslogtreecommitdiff
path: root/autoload/formatter.kak
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-01-18 16:34:31 +0530
committerAkshay Nair <phenax5@gmail.com>2026-01-18 16:34:31 +0530
commit8e6fa2062700d8c4816e8ecd95940805bedc245b (patch)
treef6c7ba5210e20ad8068285e4a7ba86d4c0620923 /autoload/formatter.kak
parent64c5e3b2e5dd1310e79062170d96113ecc06a092 (diff)
downloadkakoune-config-8e6fa2062700d8c4816e8ecd95940805bedc245b.tar.gz
kakoune-config-8e6fa2062700d8c4816e8ecd95940805bedc245b.zip
Add plugins directory linking
Diffstat (limited to 'autoload/formatter.kak')
-rw-r--r--autoload/formatter.kak11
1 files changed, 9 insertions, 2 deletions
diff --git a/autoload/formatter.kak b/autoload/formatter.kak
index 6b8c126..0830164 100644
--- a/autoload/formatter.kak
+++ b/autoload/formatter.kak
@@ -17,8 +17,15 @@ hook global BufSetOption filetype=(?:javascript|typescript|jsx|tsx) %{
fi
}
}
-define-command biome -docstring 'Format file on disk using biome' %{
- nop %sh{ npx biome check --fix --stdin-file-path=$kak_buffile }
+
+define-command biome-buffer -docstring 'Format buffer file on disk using biome' %{
+ biome %val{buffile}
+}
+
+define-command biome -params .. -docstring 'Format project using biome' %{
+ info %sh{
+ npx biome check --fix "$@" && echo "Success" || echo "Failed"
+ }
}
define-command apply-formatting -docstring 'Apply formatting with formatcmd or lsp' %{