From b55a93aa0ca035383f84c091259750d58f0d4c5a Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 26 Jan 2023 10:59:28 +0100 Subject: [PATCH] Add kakoune-buffers --- flake.lock | 11 +++++------ flake.nix | 2 +- home/kakoune/kak.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index c261e5b..df15739 100644 --- a/flake.lock +++ b/flake.lock @@ -197,16 +197,15 @@ "kakoune": { "flake": false, "locked": { - "lastModified": 1670235597, - "narHash": "sha256-4LO/SbhrtcUajHsDrG38ntq2GxY+JRwc4Bl1qgL/Fzo=", - "owner": "natsukagami", + "lastModified": 1674455980, + "narHash": "sha256-y4r+UPLGzOu9rocZfFjoYR+r9I0BD04cuH758hv8hzo=", + "owner": "mawww", "repo": "kakoune", - "rev": "39c875856a8dcfc2dcb0d796df05474e0eb30a3f", + "rev": "509788460889ed934e4a51d03243aedf776e8b96", "type": "github" }, "original": { - "owner": "natsukagami", - "ref": "revert-latex-changes", + "owner": "mawww", "repo": "kakoune", "type": "github" } diff --git a/flake.nix b/flake.nix index 21893d9..85efc24 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ nix-gaming.url = github:fufexan/nix-gaming; # --- Sources - kakoune.url = github:natsukagami/kakoune/revert-latex-changes; + kakoune.url = github:mawww/kakoune; kakoune.flake = false; kak-lsp.url = github:kak-lsp/kak-lsp; kak-lsp.flake = false; diff --git a/home/kakoune/kak.nix b/home/kakoune/kak.nix index 98c7680..defbfaf 100644 --- a/home/kakoune/kak.nix +++ b/home/kakoune/kak.nix @@ -236,6 +236,34 @@ in map global insert ': insert-unicode ' ''; } + { + name = "kakoune-buffers"; + src = pkgs.fetchFromGitHub { + owner = "Delapouite"; + repo = "kakoune-buffers"; + rev = "6b2081f5b7d58c72de319a5cba7bf628b6802881"; + sha256 = "sha256-jOSrzGcLJjLK1GiTSsl2jLmQMPbPxjycR0pwF5t/eV0="; + }; + activationScript = '' + # Suggested hook + + hook global WinDisplay .* info-buffers + + # Suggested mappings + + map global user b ':enter-buffers-mode' -docstring 'buffers…' + map global normal ^ ':enter-buffers-mode' -docstring 'buffers…' + map global user B ':enter-user-mode -lock buffers' -docstring 'buffers (lock)…' + + # Suggested aliases + + alias global bd delete-buffer + alias global bf buffer-first + alias global bl buffer-last + alias global bo buffer-only + alias global bo! buffer-only-force + ''; + } ]; }