{ config, lib, options, pkgs, ... }: { config.programs.kakoune = lib.mkIf config.editors.kakoune.enable { enable = true; colorSchemePackage = pkgs.kakounePlugins.kakoune-catppuccin; config = { colorScheme = "catppuccin_mocha"; hooks = [ { commands = "set window indentwidth 2"; group = "set-indentwidth"; name = "WinSetOption"; option = "filetype=(nix)"; } ]; numberLines = { enable = true; highlightCursor = true; relative = true; }; tabStop = 4; ui.assistant = "cat"; }; defaultEditor = true; extraConfig = builtins.readFile ./kakrc; plugins = with pkgs.kakounePlugins; [ auto-pairs-kak kakoune-extra-filetypes kakoune-lsp ]; }; options.editors.kakoune.enable = lib.mkEnableOption "rosa's kakoune setup"; }