big refactor

This commit is contained in:
Asaki Yuki 2026-04-09 10:36:32 +07:00
commit 76d68230f6
81 changed files with 3065 additions and 0 deletions

View file

@ -0,0 +1,26 @@
[
{
mode = "i";
key = "<A-h>";
action = "<Left>";
options.silent = true;
}
{
mode = "i";
key = "<A-j>";
action = "<Down>";
options.silent = true;
}
{
mode = "i";
key = "<A-k>";
action = "<Up>";
options.silent = true;
}
{
mode = "i";
key = "<A-l>";
action = "<Right>";
options.silent = true;
}
]

View file

@ -0,0 +1,11 @@
{ ... }:
{
globals.mapleader = " ";
keymaps =
[ ]
++ (import ./_default.nix)
++ (import ./barbar.nix)
++ (import ./toggleterm.nix)
++ (import ./nvim-tree-toggle.nix);
}

View file

@ -0,0 +1,39 @@
[
{
mode = "n";
key = "<A-,>";
action = "<cmd>BufferPrevious<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-.>";
action = "<cmd>BufferNext<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-<>";
action = "<cmd>BufferMovePrevious<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A->>";
action = "<cmd>BufferMoveNext<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-c>";
action = "<Cmd>BufferClose<CR>";
options.silent = true;
}
]
++ (builtins.genList (i: {
mode = "n";
key = "<A-${toString (i + 1)}>";
action = "<cmd>BufferGoto ${toString (i + 1)}<CR>";
options.silent = true;
}) 9)

View file

@ -0,0 +1,8 @@
[
{
mode = "n";
key = "<C-b>";
action = "<cmd>NvimTreeToggle<CR>";
options.silent = true;
}
]

View file

@ -0,0 +1,63 @@
[
{
mode = "t";
key = "<esc>";
action = "<C-\\><C-n>";
}
{
mode = "t";
key = "jk";
action = "<C-\\><C-n>";
}
{
mode = "t";
key = "<C-w>";
action = "<C-\\><C-n><C-w>";
}
{
mode = "t";
key = "<C-l>";
action = "<Cmd>wincmd l<CR>";
}
{
mode = "t";
key = "<C-k>";
action = "<Cmd>wincmd k<CR>";
}
{
mode = "t";
key = "<C-j>";
action = "<Cmd>wincmd j<CR>";
}
{
mode = "t";
key = "<C-h>";
action = "<Cmd>wincmd h<CR>";
}
]
++ builtins.concatLists (
builtins.genList (i: [
{
mode = "n";
key = "<leader>th${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=horizontal<CR>";
options.silent = true;
options.noremap = true;
}
{
mode = "n";
key = "<leader>tv${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=vertical<CR>";
options.silent = true;
options.noremap = true;
}
{
mode = "n";
key = "<leader>tf${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=float<CR>";
options.silent = true;
options.noremap = true;
}
]) 9
)