This commit is contained in:
Charlie Root 2024-10-28 22:45:18 +01:00
commit 7e34c388a4
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
2 changed files with 83 additions and 53 deletions

View file

@ -48,7 +48,7 @@ in {
neovim.enable = true; neovim.enable = true;
# sadly just not advanced enough, yet. # sadly just not advanced enough, yet.
helix.enable = true; helix.enable = true;
kakoune.enable = false; kakoune.enable = true;
}; };
discord.enable = true; discord.enable = true;
nushell.enable = true; nushell.enable = true;

View file

@ -7,60 +7,90 @@
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
cfg = config.modules.system.programs.editors.kakoune; cfg = config.modules.system.programs.editors.kakoune;
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
in { custom-kakoune = pkgs.stdenv.mkDerivation {
imports = [./mappings.nix]; name = "custom-kakoune";
options.modules.editors.kakoune.enable = mkEnableOption "kakoune"; src = pkgs.fetchFromGitHub {
config.home-manager.users.${username}.programs.kakoune = mkIf cfg.enable { owner = "mawww";
enable = true; repo = "kakoune";
package = pkgs.kakoune-unwrapped; rev = "be82047dbf5f74f123e925b96e0e13962a4e0c09";
config = { hash = "sha256-akSmIe0SUe9re8a90ssrykowCzThZnzqVow9erT+0U4=";
autoComplete = ["insert"];
autoReload = "yes";
indentWidth = 4;
tabStop = 4;
incrementalSearch = false;
numberLines = {
enable = true;
relative = true;
highlightCursor = true;
separator = "|";
};
scrollOff = {
lines = 4;
columns = 4;
};
wrapLines = {
enable = true;
indent = true;
word = true;
};
ui = {
enableMouse = true;
assistant = "none";
statusLine = "bottom";
};
}; };
plugins = with pkgs.kakounePlugins; [ makeFlags = ["debug=no" "PREFIX=${placeholder "out"}"];
active-window-kak
auto-pairs-kak enableParallellBuilding = true;
byline-kak # ope
prelude-kak # dependency of byline doInstallCheck = false;
fzf-kak installCheckPhase = ''
kakboard $out/bin/kak -ui json -e "kill 0"
kakoune-buffer-switcher '';
kakoune-buffers postInstall = ''
kakoune-lsp cd "$out/share/kak"
kakoune-rainbow autoload_target=$(readlink autoload)
kakoune-registers rm autoload
kakoune-vertical-selection mkdir autoload
powerline-kak ln -s --relative "$autoload_target" autoload
quickscope-kak '';
smarttab-kak };
zig-kak in {
imports = [./mappings.nix];
options.modules.programs.editors.kakoune.enable = mkEnableOption "kakoune";
config = {
environment.systemPackages = [
custom-kakoune
]; ];
# extraConfig = ./kakrc; home-manager.users.${username}.programs.kakoune = mkIf false {
enable = true;
package = custom-kakoune;
config = {
autoComplete = ["insert"];
autoReload = "yes";
indentWidth = 4;
tabStop = 4;
incrementalSearch = false;
numberLines = {
enable = true;
relative = true;
highlightCursor = true;
separator = " ";
};
scrollOff = {
lines = 4;
columns = 4;
};
wrapLines = {
enable = true;
indent = true;
word = true;
};
ui = {
enableMouse = true;
assistant = "none";
statusLine = "bottom";
};
};
plugins = with pkgs.kakounePlugins; [
active-window-kak
auto-pairs-kak
byline-kak # ope
prelude-kak # dependency of byline
kak-ls
kakboard
kakoune-buffer-switcher
kakoune-buffers
kakoune-lsp
kakoune-rainbow
kakoune-registers
kakoune-vertical-selection
powerline-kak
quickscope-kak
smarttab-kak
zig-kak
];
# extraConfig = ./kakrc;
};
}; };
} }