kakoune: add defaultEditor option
This commit is contained in:
parent
47c2adc6b3
commit
a7002d6bfc
|
@ -630,6 +630,15 @@ in {
|
||||||
description = "kakoune configuration options.";
|
description = "kakoune configuration options.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultEditor = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to configure <command>kak</command> as the default
|
||||||
|
editor using the <envar>EDITOR</envar> environment variable.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -654,6 +663,7 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ kakouneWithPlugins ];
|
home.packages = [ kakouneWithPlugins ];
|
||||||
|
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; };
|
||||||
xdg.configFile."kak/kakrc".source = configFile;
|
xdg.configFile."kak/kakrc".source = configFile;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue