46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
programs.kakoune = {
|
|
enable = true;
|
|
|
|
config = {
|
|
colorScheme = "gruvbox-dark";
|
|
ui.enableMouse = true;
|
|
|
|
hooks = [{ # Start kak-lsp for specific windows
|
|
name = "WinSetOption";
|
|
commands = "lsp-enable-window";
|
|
option = "filetype=rust";
|
|
}
|
|
|
|
];
|
|
|
|
keyMappings = [
|
|
# { # Enter LSP Usermode
|
|
# docstring = "LSP mode";
|
|
# mode = "user";
|
|
# key = "l";
|
|
# effect = "%{: enter-user-mode lsp<ret>}";
|
|
# }
|
|
];
|
|
};
|
|
|
|
extraConfig = ''
|
|
eval %sh{kak-lsp --kakoune -s $kak_session}
|
|
map global user l %{: enter-user-mode lsp<ret>} -docstring "LSP mode"
|
|
|
|
hook global WinSetOption filetype=rust %{
|
|
hook window -group rust-inlay-hints BufReload .* rust-analyzer-inlay-hints
|
|
hook window -group rust-inlay-hints NormalIdle .* rust-analyzer-inlay-hints
|
|
hook window -group rust-inlay-hints InsertIdle .* rust-analyzer-inlay-hints
|
|
hook -once -always window WinSetOption filetype=.* %{
|
|
remove-hooks window rust-inlay-hints
|
|
}
|
|
}
|
|
'';
|
|
|
|
plugins = with pkgs.kakounePlugins; [ kak-lsp ];
|
|
};
|
|
}
|