kak: replace fzf.kak with peneira
This commit is contained in:
parent
c9ee01f65e
commit
9fcbb9750a
|
@ -58,10 +58,19 @@ let
|
|||
maintainers = [ maintainers.spacekookie ];
|
||||
};
|
||||
};
|
||||
|
||||
activationScript = text: pkgs.writeText "config.kak" ''
|
||||
hook global KakBegin .* %{
|
||||
${text}
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ../modules/programs/my-kakoune ./kaktex.nix ];
|
||||
|
||||
# ctags for peneira
|
||||
home.packages = [ pkgs.universal-ctags ];
|
||||
|
||||
# Enable the kakoune package.
|
||||
programs.my-kakoune.enable = true;
|
||||
programs.my-kakoune.enable-fish-session = true;
|
||||
|
@ -120,14 +129,60 @@ in
|
|||
|
||||
# Plugins
|
||||
{
|
||||
name = "fzf.kak";
|
||||
name = "01-luar";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "andreyorst";
|
||||
repo = "fzf.kak";
|
||||
rev = "68f21eb78638e5a55027f11aa6cbbaebef90c6fb";
|
||||
sha256 = "12zfvyxqgy18l96sg2xng20vfm6b9py6bxmx1rbpbpxr8szknyh6";
|
||||
owner = "gustavo-hms";
|
||||
repo = "luar";
|
||||
rev = "2f430316f8fc4d35db6c93165e2e77dc9f3d0450";
|
||||
sha256 = "sha256-vHn/V3sfzaxaxF8OpA5jPEuPstOVwOiQrogdSGtT6X4=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "02-luar-config.kak";
|
||||
src = activationScript ''
|
||||
# Enable luar
|
||||
require-module luar
|
||||
# Use luajit
|
||||
set-option global luar_interpreter ${pkgs.luajit}/bin/luajit
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "03-peneira";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "peneira";
|
||||
rev = "743b9971472853a752475e7c070ce99089c6840c";
|
||||
sha256 = "sha256-E4ndbF9YC1p0KrvSuGgwmG1Y2IGTuGKJo/AuMixhzlM=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "04-peneira-config.kak";
|
||||
src = activationScript ''
|
||||
require-module peneira
|
||||
|
||||
# Change selection color
|
||||
set-face global PeneiraSelected @PrimarySelection
|
||||
|
||||
# Buffers list
|
||||
define-command -hidden peneira-buffers %{
|
||||
peneira 'buffers: ' %{ printf '%s\n' $kak_quoted_buflist } %{
|
||||
buffer %arg{1}
|
||||
}
|
||||
}
|
||||
|
||||
# A peneira menu
|
||||
declare-user-mode fuzzy-match-menu
|
||||
|
||||
map -docstring "Switch to buffer" global fuzzy-match-menu b ": peneira-buffers<ret>"
|
||||
map -docstring "Symbols" global fuzzy-match-menu s ": peneira-symbols<ret>"
|
||||
map -docstring "Lines" global fuzzy-match-menu l ": peneira-lines<ret>"
|
||||
map -docstring "Files in project" global fuzzy-match-menu f ": peneira-files<ret>"
|
||||
map -docstring "Files in currently opening file's directory" global fuzzy-match-menu F ": peneira-local-files<ret>"
|
||||
|
||||
# Bind menu to user mode
|
||||
map -docstring "Fuzzy matching" global user f ": enter-user-mode fuzzy-match-menu<ret>"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "01-cargo.kak";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
|
|
@ -46,13 +46,6 @@ set global grepcmd "rg --line-number --no-column --no-heading --color=never ''"
|
|||
# }
|
||||
# map global user t -docstring "Open a side terminal on the current directory" ' :iterm-terminal-horizontal fish<ret>'
|
||||
|
||||
# fzf.kak
|
||||
require-module fzf
|
||||
# set global fzf_terminal_command 'iterm-terminal-horizontal kak -c %val{session} -e "%arg{@}"'
|
||||
# set global fzf_grep_command 'rg'
|
||||
set global fzf_highlight_command 'bat --style=plain --theme=GitHub --color=always {}'
|
||||
map global user f -docstring "FZF mode" ': fzf-mode<ret>'
|
||||
|
||||
# Comment line and block
|
||||
map global normal <#> ': comment-line<ret>'
|
||||
map global normal <a-#> ': comment-block<ret>'
|
||||
|
|
|
@ -59,8 +59,8 @@ in
|
|||
(builtins.listToAttrs (map kakouneAutoload ([
|
||||
# include the original autoload files
|
||||
{
|
||||
name = "rc";
|
||||
src = "${cfg.package}/share/kak/autoload";
|
||||
name = "00-rc";
|
||||
src = "${cfg.package}/share/kak/autoload/rc";
|
||||
}
|
||||
] ++ cfg.autoload)));
|
||||
};
|
||||
|
|
|
@ -48,13 +48,19 @@ with lib;
|
|||
background_tint = "0.85";
|
||||
};
|
||||
in
|
||||
background // {
|
||||
# Scrollback (128MBs)
|
||||
scrollback_pager_history_size = 128;
|
||||
mkMerge [
|
||||
background
|
||||
{
|
||||
# Scrollback (128MBs)
|
||||
scrollback_pager_history_size = 128;
|
||||
|
||||
# Disable Shell integration (leave it for Nix)
|
||||
shell_integration = "no-rc";
|
||||
};
|
||||
# Disable Shell integration (leave it for Nix)
|
||||
shell_integration = "no-rc";
|
||||
|
||||
# Allow remote control (for kakoune integration)
|
||||
allow_remote_control = true;
|
||||
}
|
||||
];
|
||||
|
||||
keybindings = { };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue