This commit is contained in:
2025-08-12 10:13:57 +00:00
parent 3d5d034f86
commit e3353873ed
8 changed files with 115 additions and 49 deletions

View File

@@ -7,7 +7,6 @@
./plugins/lazygit.nix
./plugins/lsp.nix
./plugins/mini.nix
./plugins/oil.nix
./plugins/treesitter.nix
];

View File

@@ -1,10 +1,60 @@
{
programs.nixvim.keymaps = [
# e - explore/edit
{
mode = "n";
key = "<leader>lf";
action = ":lua require('conform').format({ lsp_fallback = true })<CR>";
options.desc = "Format";
key = "<leader>ed";
action = ":lua require('mini.files').open()<CR>";
options.desc = "Directory";
}
{
mode = "n";
key = "<leader>ef";
action = ":lua require('mini.files').open(vim.api.nvim_buf_get_name(0))<CR>";
options.desc = "File directory";
}
# f - find
{
mode = "n";
key = "<leader>f/";
action = ":Pick history scope='/'<CR>";
options.desc = "'/' history";
}
{
mode = "n";
key = "<leader>f:";
action = ":Pick history scope=':'<CR>";
options.desc = "':' history";
}
{
mode = "n";
key = "<leader>fa";
action = ":Pick git_hunks scope='staged'<CR>";
options.desc = "Added hunks (all)";
}
{
mode = "n";
key = "<leader>fA";
action = ":Pick git_hunks path='%' scope='staged'<CR>";
options.desc = "Added hunks (buffer)";
}
{
mode = "n";
key = "<leader>fb";
action = ":Pick buffers<CR>";
options.desc = "Buffers";
}
{
mode = "n";
key = "<leader>fd";
action = ":Pick diagnostic scope='all'<CR>";
options.desc = "Diagnostic (workspace)";
}
{
mode = "n";
key = "<leader>fD";
action = ":Pick diagnostic scope='current'<CR>";
options.desc = "Diagnostic (buffer)";
}
{
mode = "n";
@@ -14,21 +64,48 @@
}
{
mode = "n";
key = "<leader>/";
action = ":Pick grep_live<CR>";
options.desc = "Grep";
key = "<leader>fr";
action = ":Pick lsp scope='references'<CR>";
options.desc = "References (LSP)";
}
{
mode = "n";
key = "<leader>ed";
action = ":Oil<CR>";
options.desc = "File browser";
key = "<leader>fs";
action = ":Pick lsp scope='workspace_symbol'<CR>";
options.desc = "Symbols (LSP, workspace)";
}
{
mode = "n";
key = "<leader>fS";
action = ":Pick lsp scope='document_symbol'<CR>";
options.desc = "Symbols (LSP, buffer)";
}
# g - git
{
mode = "n";
key = "<leader>gg";
action = ":LazyGit<CR>";
options.desc = "Lazygit";
}
# l - lsp/formatter
{
mode = "n";
key = "<leader>lf";
action = ":lua require('conform').format({ lsp_fallback = true })<CR>";
options.desc = "Format";
}
# next
{
mode = "n";
key = "<leader>/";
action = ":Pick grep_live<CR>";
options.desc = "Grep";
}
{
mode = "n";
key = "sj";
action = ":lua require('mini.jump2d').start(require('mini.jump2d').builtin_opts.query)<CR>";
options.desc = "Jump to character";
}
];
}

View File

@@ -11,5 +11,9 @@
globals = {
clipboard = "osc52";
};
opts = {
ignorecase = true;
smartcase = true;
};
};
}

View File

@@ -2,6 +2,18 @@
programs.nixvim.plugins.mini = {
enable = true;
modules = {
jump = {};
files = {};
jump2d = {
settings = {
spotter.__raw = "require('mini.jump2d').gen_spotter.pattern('[^%s%p]+')";
labels = "asdfghjkl";
view = {
dim = true;
n_steps_ahead = 2;
};
};
};
basics = {
options = {
basic = true;

View File

@@ -1,30 +0,0 @@
{
programs.nixvim.plugins.oil = {
enable = true;
settings = {
columns = [
"icon"
];
keymaps = {
"<C-r>" = "actions.refresh";
"<leader>qq" = "actions.close";
};
skip_confirm_for_simple_edits = true;
constrain_cursor = "editable";
default_file_explorer = true;
view_options = {
show_hidden = true;
};
win_options = {
concealcursor = "ncv";
conceallevel = 3;
cursorcolumn = false;
foldcolumn = "0";
list = false;
signcolumn = "no";
spell = false;
wrap = false;
};
};
};
}