nixos/home/nixvim/plugins.nix

139 lines
5.0 KiB
Nix
Raw Normal View History

2026-03-03 20:15:06 +01:00
let
button = shortcut: text: action: {
type = "button";
val = text;
on_press.__raw = "function() vim.cmd([[${action}]]) end";
opts = {
keymap = [
"n"
shortcut
action
{
noremap = true;
silent = true;
}
];
shortcut = shortcut;
position = "center";
width = 30;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
};
in
{
programs.nixvim.plugins = {
neocord.enable = true;
colorizer.enable = true;
nvim-autopairs.enable = true;
treesitter = {
enable = true;
settings = {
highlighting.enable = true;
auto_install = true;
ignore_install = [ "ipkg" ];
};
};
nvim-tree.enable = true;
alpha = {
enable = true;
settings.layout = [
{
type = "padding";
val = 2;
}
{
type = "text";
val = [
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
];
opts = {
position = "center";
hl = "Type";
};
}
{
type = "padding";
val = 2;
}
{
type = "group";
opts = {
position = "center";
};
val = [
(button "f" " Find File" "<cmd>lua Snacks.picker.files()<cr>")
(button "g" " Find Text" "<cmd>lua Snacks.picker.grep()<cr>")
(button "r" " Recent Files" "<cmd>lua Snacks.dashboard.pick('oldfiles')<cr>")
(button "q" " Quit" "<cmd>qa<cr>")
];
}
];
};
snacks = {
enable = true;
settings = {
notifier.enabled = true;
picker.enabled = true;
indent.enabled = true;
};
};
lualine = {
enable = true;
settings = {
options = {
globalstatus = true;
section_separators = {
left = "";
right = "";
};
component_separators = {
left = "";
right = "";
}; # Fixed: Added missing braces
};
sections = {
lualine_a = [ "mode" ];
lualine_b = [ "diagnostics" ];
lualine_c = [
"filename"
"branch"
"navic"
];
lualine_x = [
"filetype"
"lsp_status"
];
lualine_y = [ "progress" ];
lualine_z = [ "location" ];
};
};
};
bufferline.enable = true;
web-devicons.enable = true;
};
}