Add tree-sitter kakoune module
This commit is contained in:
parent
da7cb27c04
commit
8774f1afd6
4 changed files with 307 additions and 134 deletions
|
@ -28,7 +28,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./kak-lsp.nix ./fish-session.nix ];
|
||||
imports = [ ./kak-lsp.nix ./fish-session.nix ./tree-sitter.nix ];
|
||||
|
||||
options.programs.my-kakoune = {
|
||||
enable = mkEnableOption "My version of the kakoune configuration";
|
||||
|
@ -52,6 +52,12 @@ in
|
|||
default = { };
|
||||
description = "Themes to load";
|
||||
};
|
||||
|
||||
extraFaces = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Extra faces to include";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -89,10 +95,21 @@ in
|
|||
})
|
||||
cfg.themes
|
||||
));
|
||||
|
||||
kakouneFaces =
|
||||
let
|
||||
txt = strings.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: face: "face global ${name} \"${face}\"") cfg.extraFaces));
|
||||
in
|
||||
pkgs.writeText "faces.kak" txt;
|
||||
in
|
||||
{
|
||||
# kakrc
|
||||
"kak/kakrc".text = cfg.rc;
|
||||
"kak/kakrc".text = ''
|
||||
${cfg.rc}
|
||||
|
||||
# Load faces
|
||||
source ${kakouneFaces}
|
||||
'';
|
||||
} //
|
||||
(builtins.listToAttrs (lib.lists.flatten (map kakouneAutoload ([
|
||||
# include the original autoload files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue