From 28080d31c0b870f4d82b09d99cd4ed4b8ca4c1a3 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 29 Jul 2024 17:07:08 +0200 Subject: [PATCH] Set up special indentation for crab --- home/kakoune/kakrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/home/kakoune/kakrc b/home/kakoune/kakrc index 10b5bed..c254669 100644 --- a/home/kakoune/kakrc +++ b/home/kakoune/kakrc @@ -62,7 +62,13 @@ map global normal D ": delete-current-brackets" # Tab sizes hook global InsertChar \t %{ exec -draft -itersel h@ } set global tabstop 2 -set global indentwidth 2 +set global indentwidth 2 + +# Language-specific tabstop with override +hook global WinSetOption filetype=(rust) %{ + set window tabstop 4 + set window indentwidth 4 +} # Ctrl + a in insert mode = esc map global insert '' @@ -152,9 +158,6 @@ hook global WinSetOption filetype=(rust) %{ hook global WinSetOption filetype=(scala) %{ # Format the document if possible hook -group scala-fmt window BufWritePre .* %{ lsp-formatting-sync } - - set window tabstop 2 - set window indentwidth 2 } hook global WinSetOption filetype=(typst) %{