42 lines
842 B
Nix
42 lines
842 B
Nix
|
{ ... }:
|
||
|
{
|
||
|
plugins.snacks = {
|
||
|
enable = true;
|
||
|
|
||
|
settings = {
|
||
|
bigfile.enabled = true;
|
||
|
notifier.enabled = true;
|
||
|
quickfile.enabled = true;
|
||
|
statuscolumn.enabled = false;
|
||
|
|
||
|
terminal.win.keys = let
|
||
|
mkKey = k: d: {
|
||
|
__unkeyed.1 = "<C-${k}>";
|
||
|
__unkeyed.2 = helpers.mkRaw #lua
|
||
|
''
|
||
|
function(self)
|
||
|
return self:is_floating() and "<c-${k}>" or vim.schedule(function()
|
||
|
vim.cmd.wincmd(${k})
|
||
|
end)
|
||
|
end
|
||
|
'';
|
||
|
desc = "Go to ${d} Window";
|
||
|
expr = true;
|
||
|
mode = "t";
|
||
|
};
|
||
|
in {
|
||
|
nav_h = mkKey "h" "Left";
|
||
|
nav_j = mkKey "j" "Lower";
|
||
|
nav_k = mkKey "k" "Upper";
|
||
|
nav_l = mkKey "l" "Right";
|
||
|
};
|
||
|
|
||
|
toggle.map = "";
|
||
|
words.enabled = true;
|
||
|
};
|
||
|
|
||
|
opts = {
|
||
|
statuscolumn = "%!v:lua.require'snacks.statuscolumn'.get()";
|
||
|
};
|
||
|
}
|