From 2d8e4573691fa8e3c00af8bce57e889fc7350232 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Fri, 17 Jan 2020 08:47:40 -0600 Subject: [PATCH] set shift width to 2 for Nix and Ruby --- dotfiles/kakoune.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dotfiles/kakoune.nix b/dotfiles/kakoune.nix index cbd5900..a3327c0 100644 --- a/dotfiles/kakoune.nix +++ b/dotfiles/kakoune.nix @@ -55,7 +55,7 @@ in { hooks = [ { commands = "auto-pairs-enable"; - name = "WinSetOption"; + name = "WinCreate"; option = ".*"; } { @@ -72,7 +72,7 @@ in { } { commands = "git show-diff"; - name = "WinSetOption"; + name = "WinCreate"; option = ".*"; } { @@ -88,8 +88,11 @@ in { # Nix { - commands = "set-option buffer formatcmd nixfmt"; - name = "WinSetOption"; + commands = '' + set-option buffer formatcmd nixfmt + set-option buffer indentwidth 2 + ''; + name = "WinCreate"; option = ".*.nix"; } { @@ -98,9 +101,16 @@ in { option = ".*.nix"; } + # Ruby + { + commands = "set-option buffer indentwidth 2"; + name = "WinCreate"; + option = ".*.rb"; + } + # Elm { - name = "WinSetOption"; + name = "WinCreate"; option = ".*.elm"; commands = '' evaluate-commands %sh{