aboutsummaryrefslogtreecommitdiff
path: root/modules/kakoune/default.nix
blob: bacab15e0d6e3e6a294f29f82fc13443157c4047 (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
{ pkgs, lib, ... }:
with pkgs;
let
  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 "${kakoune}/bin/kak$(printf ' %q' "$@")"
    else
      exec "${kakoune}/bin/kak" "$@"
    fi
  '';
in {
  environment.systemPackages = [
    kakoune
    kakoune-lsp
    kakoune-cr
    kak-tree-sitter-unstable
    kak-tmux

    ripgrep
    tmux
    gitu
    moreutils
  ];
}