2023-01-27 10:42:59 -03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-24 11:42:49 -03:00
|
|
|
let
|
2023-01-27 10:42:59 -03:00
|
|
|
inherit (pkgs.uservars) key dmenu editor theme accent;
|
2023-01-24 11:42:49 -03:00
|
|
|
inherit (theme) color;
|
|
|
|
in
|
|
|
|
{
|
2022-08-05 11:00:11 -03:00
|
|
|
config = {
|
|
|
|
programs.kakoune = {
|
2022-08-06 18:32:34 -03:00
|
|
|
enable = true;
|
2023-01-22 18:12:04 -03:00
|
|
|
extraConfig =
|
|
|
|
lib.concatStringsSep "\n"
|
|
|
|
(map (lib.readFile) ([
|
2023-01-27 10:12:12 -03:00
|
|
|
./filetypes.kak
|
|
|
|
./hooks.kak
|
|
|
|
./indent.kak
|
|
|
|
./keys.kak
|
|
|
|
./plug.kak
|
|
|
|
./usermode.kak
|
|
|
|
./git-mode.kak
|
|
|
|
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
|
2022-08-05 11:00:11 -03:00
|
|
|
|
|
|
|
set global scrolloff 10,20
|
|
|
|
set global autoreload yes
|
|
|
|
set global startup_info_version 20200901
|
|
|
|
|
2023-01-27 10:42:59 -03:00
|
|
|
'' + (import ./colors.nix {
|
|
|
|
inherit pkgs lib color accent;
|
|
|
|
});
|
2022-08-05 11:00:11 -03:00
|
|
|
};
|
2023-01-27 10:12:12 -03:00
|
|
|
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; };
|
2022-10-18 22:41:40 -03:00
|
|
|
home.packages = with pkgs; [
|
2023-01-28 01:45:31 -03:00
|
|
|
kakoune
|
2022-10-18 22:41:40 -03:00
|
|
|
terminal
|
|
|
|
ranger
|
|
|
|
bmenu
|
|
|
|
kak-lsp
|
|
|
|
kak-pager
|
2022-11-07 23:57:34 -03:00
|
|
|
kak-man-pager
|
2023-01-21 16:24:40 -03:00
|
|
|
|
|
|
|
aspell
|
|
|
|
aspellDicts.en
|
|
|
|
aspellDicts.pt_BR
|
2022-10-18 22:41:40 -03:00
|
|
|
];
|
2022-12-26 00:23:50 -03:00
|
|
|
home.activation = {
|
|
|
|
update_kakoune = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
2023-01-28 01:45:31 -03:00
|
|
|
$DRY_RUN_CMD kak -clear &&
|
|
|
|
$DRY_RUN_CMD kak -l | xargs -r -n1 kak -e "config-source;quit" -ui dummy -c ||
|
2023-01-24 10:08:28 -03:00
|
|
|
$DRY_RUN_CMD true
|
2022-12-26 00:23:50 -03:00
|
|
|
'';
|
|
|
|
};
|
2023-01-24 10:07:04 -03:00
|
|
|
home.sessionVariables = lib.mkIf (editor == "kakoune") {
|
2022-08-05 11:00:11 -03:00
|
|
|
EDITOR = "kak";
|
2022-08-05 21:09:52 -03:00
|
|
|
# Some plugins(kak_ansi) like to compile stuff
|
|
|
|
CC = "cc";
|
2022-08-05 11:00:11 -03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|