2024-05-30 16:54:58 -03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2023-01-24 11:42:49 -03:00
|
|
|
let
|
2024-06-05 01:18:48 -03:00
|
|
|
inherit (config.my)
|
2024-05-30 16:54:58 -03:00
|
|
|
key
|
|
|
|
dmenu
|
|
|
|
editor
|
|
|
|
theme
|
|
|
|
accent
|
|
|
|
;
|
2023-01-24 11:42:49 -03:00
|
|
|
inherit (theme) color;
|
2023-05-07 14:25:22 -03:00
|
|
|
inherit (pkgs) kakounePlugins;
|
|
|
|
inherit (pkgs.kakouneUtils) buildKakounePlugin;
|
2023-01-24 11:42:49 -03:00
|
|
|
in
|
|
|
|
{
|
2022-08-05 11:00:11 -03:00
|
|
|
config = {
|
|
|
|
programs.kakoune = {
|
2022-08-06 18:32:34 -03:00
|
|
|
enable = true;
|
2023-05-07 14:25:22 -03:00
|
|
|
plugins = with kakounePlugins; [
|
|
|
|
kak-ansi
|
|
|
|
active-window-kak
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "auto-pairs.kak";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "alexherbo2";
|
|
|
|
repo = pname;
|
|
|
|
rev = "bfdcb8566076f653ec707f86207f83ea75173ce9";
|
|
|
|
sha256 = "sha256-MgqCuGj03ctKty2yQgQvy6qV/0s7euNwukhSjqauqW8=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "kakoune-mirror-colemak";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "lelgenio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "8f191172590d7615d0a56c857e9331ce69164670";
|
|
|
|
sha256 = "sha256-ERNtWOn8rq53YmByTQnwDObN7Fs5HYBwvNIyTJrj2hw=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "kakoune-palette";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "delapouite";
|
|
|
|
repo = pname;
|
|
|
|
rev = "052cab5f48578679d94717ed5f62429be9865d5d";
|
|
|
|
sha256 = "sha256-fk0TL6qG3zX8cPp1xvhMw0/g9xSKKp04uyagaPq/Nd0=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "kak-crosshairs";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "lelgenio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "3a6bcd9b50737a9280de109e32048991a2f85f7c";
|
|
|
|
sha256 = "sha256-wZQ9tsAOqG4eW28DwJ6VcsR9gSrCGqFjbTARhvTLWTQ=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "kakoune-colemak-neio";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "lelgenio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "28b9aabafb8d422a4c52b2a15424056fb87c8d90";
|
|
|
|
sha256 = "sha256-d3OTjo02QFsbNqmgd28fHgSjPcdF8BJleCJGCyOFc18=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
(buildKakounePlugin rec {
|
|
|
|
pname = "kakoune-multi-file";
|
|
|
|
version = "0.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "natasky";
|
|
|
|
repo = pname;
|
|
|
|
rev = "1cc6baeb14b773916eb9209469aa77b3cfa67a0a";
|
|
|
|
sha256 = "sha256-3PLxG9UtT0MMSibvTviXQIgTH3rApZ3WSbNCEH3c7HE=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2023-01-22 18:12:04 -03:00
|
|
|
extraConfig =
|
2024-05-30 16:54:58 -03:00
|
|
|
lib.concatStringsSep "\n" (
|
|
|
|
map (lib.readFile) (
|
|
|
|
[
|
|
|
|
./filetypes.kak
|
|
|
|
./hooks.kak
|
|
|
|
./indent.kak
|
|
|
|
./keys.kak
|
|
|
|
./lsp-config.kak
|
|
|
|
./usermode.kak
|
|
|
|
./git-mode.kak
|
|
|
|
]
|
|
|
|
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
|
|
|
|
)
|
|
|
|
)
|
|
|
|
+ ''
|
2022-08-05 11:00:11 -03:00
|
|
|
|
2024-05-30 16:54:58 -03:00
|
|
|
set global scrolloff 10,20
|
|
|
|
set global autoreload yes
|
|
|
|
set global startup_info_version 99999999
|
2022-08-05 11:00:11 -03:00
|
|
|
|
2024-05-30 16:54:58 -03:00
|
|
|
''
|
|
|
|
+ (import ./colors.nix {
|
|
|
|
inherit
|
|
|
|
pkgs
|
|
|
|
lib
|
|
|
|
color
|
|
|
|
accent
|
|
|
|
;
|
2023-01-27 10:42:59 -03:00
|
|
|
});
|
2022-08-05 11:00:11 -03:00
|
|
|
};
|
2024-05-30 16:54:58 -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; [
|
|
|
|
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
|
|
|
|
2023-08-31 14:08:48 -03:00
|
|
|
emmet-cli
|
2023-09-01 09:49:41 -03:00
|
|
|
nodePackages.prettier
|
2023-08-31 14:08:48 -03:00
|
|
|
|
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-05-07 14:25:22 -03:00
|
|
|
$DRY_RUN_CMD timeout 1s kak -clear &&
|
|
|
|
$DRY_RUN_CMD timeout 1s kak -l | xargs -r -n1 timeout 1s 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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|