aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/kakoune/default.nix8
-rw-r--r--modules/kakoune/kak-tree-sitter.nix8
-rw-r--r--modules/kakoune/kakoune-lsp.nix19
-rw-r--r--modules/tmux/default.nix10
-rw-r--r--modules/tmux/tmux.conf81
5 files changed, 117 insertions, 9 deletions
diff --git a/modules/kakoune/default.nix b/modules/kakoune/default.nix
index f15260c..b9d5287 100644
--- a/modules/kakoune/default.nix
+++ b/modules/kakoune/default.nix
@@ -8,6 +8,7 @@ let
];
};
kak-tree-sitter-unstable = import ./kak-tree-sitter.nix { inherit pkgs lib; };
+ kakoune-lsp-unstable = import ./kakoune-lsp.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' "$@")"
@@ -19,15 +20,12 @@ in
{
environment.systemPackages = [
my-kakoune
- kakoune-lsp
+ # kakoune-lsp
+ kakoune-lsp-unstable
kakoune-cr
kak-tree-sitter-unstable
kak-tmux
editorconfig-core-c
- ripgrep
- tmux
- # gitu
- moreutils
];
}
diff --git a/modules/kakoune/kak-tree-sitter.nix b/modules/kakoune/kak-tree-sitter.nix
index 7df49bd..abd0d79 100644
--- a/modules/kakoune/kak-tree-sitter.nix
+++ b/modules/kakoune/kak-tree-sitter.nix
@@ -2,16 +2,16 @@
with pkgs;
rustPlatform.buildRustPackage rec {
pname = "kak-tree-sitter";
- version = "3.0.0-local.1";
+ version = "3.0.0-local.2";
src = fetchFromSourcehut {
owner = "~hadronized";
repo = "kak-tree-sitter";
- rev = "e183201ebdd247b7bbefb9ce9cab10930788aa05"; # 3 Jan 2026
- hash = "sha256-iDpWzvtM0xQSEqs+TsfW3AGaMYwYkHwWqKrbWPRposc=";
+ rev = "5fe17202e3b818da0f12790d8186fd5ea5e22f6b"; # 28 Feb 2026
+ hash = "sha256-z89g58Dr+c1TW9qQVpry1HRNcbxOCIMcNsc+u3KGtFo=";
};
- cargoHash = "sha256-WblDG+8GSsy3s2dDE7fgWY6Jkoe7Qqw0ijPR/YQrX7I=";
+ cargoHash = "sha256-ink1qZD/ujLi/PlJRej5rByBka5a6pPVMP+Y1YlTE1c=";
meta = {
mainProgram = "kak-tree-sitter";
diff --git a/modules/kakoune/kakoune-lsp.nix b/modules/kakoune/kakoune-lsp.nix
new file mode 100644
index 0000000..92d1998
--- /dev/null
+++ b/modules/kakoune/kakoune-lsp.nix
@@ -0,0 +1,19 @@
+{ lib, pkgs }:
+with pkgs;
+rustPlatform.buildRustPackage rec {
+ pname = "kakoune-lsp";
+ version = "19.0.1-local.0";
+
+ src = fetchFromGitHub {
+ owner = "kakoune-lsp";
+ repo = "kakoune-lsp";
+ rev = "5ac69fde4222fa458908ff0c17d3aa429c74e28a"; # 28 Feb 2026
+ hash = "sha256-PjYPhzMoT8rE2XGI/O9SAcksv2XGyk682IbHJW5vusc=";
+ };
+
+ cargoHash = "sha256-nwxZwyT9sNoZuvvg/YJFlVshe6i+W9avmquq9iXmFVM=";
+
+ meta = {
+ mainProgram = "kak-lsp";
+ };
+}
diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix
new file mode 100644
index 0000000..67b31cb
--- /dev/null
+++ b/modules/tmux/default.nix
@@ -0,0 +1,10 @@
+{ lib, ... }:
+{
+ programs.tmux = {
+ enable = true;
+ terminal = "screen-256color"; # tmux-256color
+ escapeTime = 25;
+ shortcut = "q";
+ extraConfig = lib.readFile ./tmux.conf;
+ };
+}
diff --git a/modules/tmux/tmux.conf b/modules/tmux/tmux.conf
new file mode 100644
index 0000000..0ca4712
--- /dev/null
+++ b/modules/tmux/tmux.conf
@@ -0,0 +1,81 @@
+set -g display-time 4000
+set -g base-index 1
+setw -g pane-base-index 1
+setw -g pane-base-index 1
+set -g renumber-windows on
+set -g monitor-bell off
+set -g pane-active-border-style "fg=brightcyan bg=default"
+set -g pane-border-style "fg=black bg=default"
+set -g pane-border-lines simple
+set -g pane-border-indicators arrows
+set -g status-keys emacs
+set -g set-clipboard on
+set -g default-terminal "screen-256color"
+set -g focus-events on
+set -g alternate-screen on
+setw -g aggressive-resize on
+
+bind r source-file ~/.config/tmux/tmux.conf
+bind C-q send-prefix
+bind q last-pane
+
+# Selection
+setw -g mode-keys vi
+bind-key -T copy-mode-vi v send-keys -X begin-selection
+bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
+bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+
+# Statusline
+set -g status-left-style "fg=white bg=default"
+set -g status-right-style "fg=white bg=default"
+set -g status-style "fg=white bg=default"
+set -g message-style "fg=white bg=default"
+set -g status-justify right
+set -g window-status-format "#I:#W"
+set -g window-status-current-format "#[bold][#I:#W]"
+
+# Only show status if there are multiple windows
+set -g status off
+set -g status-left ''
+set -g status-right ''
+set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"'
+set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+
+# Window styles
+set -g window-style 'bg=#0f0f0f'
+set -g window-active-style 'bg=#000000'
+
+# Windows/panes management
+bind C-v split-window -vc "#{pane_current_path}"
+bind v split-window -vc "#{pane_current_path}"
+bind C-s split-window -hc "#{pane_current_path}"
+bind s split-window -hc "#{pane_current_path}"
+
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r H resize-pane -L 5
+bind -r L resize-pane -R 5
+
+bind j select-pane -D
+bind C-j select-pane -D
+bind k select-pane -U
+bind C-k select-pane -U
+bind h select-pane -L
+bind C-h select-pane -L
+bind l select-pane -R
+bind C-l select-pane -R
+bind M-j swap-pane -D
+bind M-k swap-pane -U
+
+bind -n M-1 select-window -t 1
+bind -n M-2 select-window -t 2
+bind -n M-3 select-window -t 3
+bind -n M-4 select-window -t 4
+bind -n M-5 select-window -t 5
+bind -n M-6 select-window -t 6
+bind -n M-7 select-window -t 7
+bind -n M-8 select-window -t 8
+bind -n M-9 select-window -t 9