From 17a41fe2a943c80ca59637d4d5f76e4709db4069 Mon Sep 17 00:00:00 2001 From: Madeleine Date: Fri, 21 Apr 2023 22:14:03 +0100 Subject: [PATCH] more kakoune config --- maddie/common/kakoune.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/maddie/common/kakoune.nix b/maddie/common/kakoune.nix index c9c1421..0ced3a6 100644 --- a/maddie/common/kakoune.nix +++ b/maddie/common/kakoune.nix @@ -10,6 +10,7 @@ numberLines = { enable = true; relative = true; + }; scrollOff.lines = 3; showWhitespace.enable = false; @@ -21,6 +22,16 @@ enableMouse = true; setTitle = true; }; + hooks = [ + { + name = "WinSetOption"; + option = "filetype=nix"; + commands = '' + set-option window indentwidth 2 + set-option window formatcmd nixpkgs-fmt + ''; + } + ]; }; plugins = with pkgs.kakounePlugins; [ kakoune-rainbow @@ -29,7 +40,8 @@ pkgs.kak-lsp ]; extraConfig = '' - eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak. + hook global InsertChar \t %{ exec -draft h@ } + eval %sh{kak-lsp --kakoune -s $kak_session} lsp-enable ''; };