feat: replace alpha, lazygit-nvim, dressing with snacks.nvim
This commit is contained in:
parent
7f388998c7
commit
5ee4c41721
5 changed files with 33 additions and 36 deletions
|
|
@ -12,5 +12,6 @@
|
||||||
./plugins/editing.nix
|
./plugins/editing.nix
|
||||||
./plugins/keymaps.nix
|
./plugins/keymaps.nix
|
||||||
./plugins/claude-code.nix
|
./plugins/claude-code.nix
|
||||||
|
./plugins/snacks.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@
|
||||||
package = inc-rename-nvim;
|
package = inc-rename-nvim;
|
||||||
setup = ''require("inc_rename").setup({})'';
|
setup = ''require("inc_rename").setup({})'';
|
||||||
};
|
};
|
||||||
dressing-nvim = {
|
|
||||||
package = dressing-nvim;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{...}: {
|
||||||
vim.git = {
|
vim.git = {
|
||||||
gitsigns.enable = true;
|
gitsigns.enable = true;
|
||||||
vim-fugitive.enable = true;
|
vim-fugitive.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
vim.extraPlugins = with pkgs.vimPlugins; {
|
|
||||||
lazygit-nvim = {
|
|
||||||
package = lazygit-nvim;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vim.keymaps = [
|
|
||||||
{
|
|
||||||
key = "<leader>gg";
|
|
||||||
mode = ["n"];
|
|
||||||
action = "<cmd>LazyGit<CR>";
|
|
||||||
desc = "LazyGit";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
31
plugins/snacks.nix
Normal file
31
plugins/snacks.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{...}: {
|
||||||
|
vim.utility.snacks-nvim = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
|
input.enable = true;
|
||||||
|
lazygit.enable = true;
|
||||||
|
rename.enable = true;
|
||||||
|
|
||||||
|
dashboard = {
|
||||||
|
enable = true;
|
||||||
|
sections = [
|
||||||
|
{section = "header";}
|
||||||
|
{section = "keys"; gap = 1; padding = 1;}
|
||||||
|
{section = "startup";}
|
||||||
|
];
|
||||||
|
preset.keys = [
|
||||||
|
{icon = " "; key = "e"; action = ":ene | startinsert"; desc = "New file";}
|
||||||
|
{icon = " "; key = ",ff"; action = ":FzfLua files"; desc = "Find file";}
|
||||||
|
{icon = " "; key = ",fo"; action = ":FzfLua oldfiles"; desc = "Recently opened";}
|
||||||
|
{icon = " "; key = ",fg"; action = ":FzfLua live_grep"; desc = "Find word";}
|
||||||
|
{icon = " "; key = ",fp"; action = ":SessionManager load_session"; desc = "Open session";}
|
||||||
|
{icon = " "; key = "q"; action = ":qa"; desc = "Quit";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vim.keymaps = [
|
||||||
|
{key = "<leader>gg"; mode = ["n"]; lua = true; action = "function() Snacks.lazygit() end"; desc = "LazyGit";}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -33,22 +33,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
dashboard.alpha = {
|
|
||||||
enable = true;
|
|
||||||
theme = "dashboard";
|
|
||||||
};
|
|
||||||
|
|
||||||
luaConfigRC.alpha-buttons = ''
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button("e", " New file", ":ene <BAR> startinsert<CR>"),
|
|
||||||
dashboard.button(",ff", " Find file", ":FzfLua files<CR>"),
|
|
||||||
dashboard.button(",fo", " Recently opened", ":FzfLua oldfiles<CR>"),
|
|
||||||
dashboard.button(",fg", " Find word", ":FzfLua live_grep<CR>"),
|
|
||||||
dashboard.button(",fp", " Open session", ":SessionManager load_session<CR>"),
|
|
||||||
dashboard.button("q", " Quit", ":qa<CR>"),
|
|
||||||
}
|
|
||||||
require("alpha").setup(dashboard.config)
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue