aboutsummaryrefslogtreecommitdiff
path: root/modules/kakoune/default.nix
blob: efb26ace33977d9fa1054483763eb50d87d0ef8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ pkgs, lib, ... }:
with pkgs;
let
  my-kakoune = kakoune.override {
    plugins = with kakounePlugins; [
      kak-ansi
      (import ./kak-active-window.nix { inherit pkgs lib; })
    ];
  };
  kak-tree-sitter-unstable = import ./kak-tree-sitter.nix { inherit pkgs lib; };
  kak-tmux = pkgs.writeShellScriptBin "kak-tmux" ''
    if [ -t 0 ] && [ -z "$TMUX" ]; then
      exec </dev/tty; exec <&1; ${tmux}/bin/tmux new "${my-kakoune}/bin/kak$(printf ' %q' "$@")"
    else
      exec "${my-kakoune}/bin/kak" "$@"
    fi
  '';
in
{
  environment.systemPackages = [
    my-kakoune
    kakoune-lsp
    kakoune-cr
    kak-tree-sitter-unstable
    kak-tmux

    editorconfig-core-c
    ripgrep
    tmux
    gitu
    moreutils
  ];
}