From 82350b9149c5891dd0c608238ddae0415c7953d7 Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Fri, 1 Nov 2024 12:05:48 -0400 Subject: [PATCH] Made a bunch of Kakoune changes including installing plugins. --- programs/kakoune.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/programs/kakoune.nix b/programs/kakoune.nix index 4ad775f..7883f96 100644 --- a/programs/kakoune.nix +++ b/programs/kakoune.nix @@ -1,15 +1,23 @@ { pkgs, ... }: { enable = true; defaultEditor = true; - # plugins = with pkgs; [ kakounePlugins.kak-fzf ]; + plugins = with pkgs.kakounePlugins; + [ kak-fzf byline-kak kakboard auto-pairs-kak ]; config = { colorScheme = "tomorrow-night"; numberLines = { enable = true; highlightCursor = true; }; + showMatching = true; + tabStop = 2; indentWidth = 2; hooks = [ + { + name = "WinCreate"; + commands = "kakboard-enable"; + option = ".*"; + } { # When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write name = "BufSetOption"; @@ -22,6 +30,15 @@ option = "filetype=markdown"; commands = "set-option window lintcmd \"proselint\""; } + # { + # name = "BufSetOption"; + # option = "filetype=markdown"; + # commands = '' + # hook buffer BufWritePost .* %{ %sh{ + # + # } }; + # ''; + # } ]; keyMappings = [ # Define select all @@ -59,6 +76,9 @@ set-option global divider_face LineNumbers divider-on 80 + # byline enables extending selection with x + require-module byline + eval %sh{kak-lsp --kakoune -s $kak_session} lsp-enable '';