refactor(nvim): overhaul nix glue and be more lazy
This commit is contained in:
parent
21bba2e8fd
commit
9a920427a9
5 changed files with 63 additions and 94 deletions
|
|
@ -5,42 +5,46 @@ with builtins;
|
|||
config.my.programs.nvim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./which-key-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = catppuccin-nvim;
|
||||
conf = readFile ./catppuccin-nvim.lua;
|
||||
lazy = false;
|
||||
priority = 99;
|
||||
}
|
||||
{
|
||||
plugin = formatter-nvim;
|
||||
lazy = true;
|
||||
keys = [
|
||||
{ key = "="; cmd = "<cmd>Format<cr>"; desc = "format (formatter)"; }
|
||||
];
|
||||
conf = readFile ./formatter-nvim.lua;
|
||||
dependencies = [{ plugin = which-key-nvim; lazy = true; }];
|
||||
dependencies = [{ plugin = which-key-nvim; }];
|
||||
}
|
||||
{
|
||||
plugin = oil-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./oil-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; lazy = true; }
|
||||
{ plugin = nvim-web-devicons; lazy = true; }
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = nvim-web-devicons; }
|
||||
];
|
||||
}
|
||||
{ plugin = nvim-ts-context-commentstring; }
|
||||
{
|
||||
plugin = mini-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./mini-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = noice-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./noice-nvim.lua;
|
||||
dependencies = [{ plugin = nui-nvim; lazy = true; }];
|
||||
dependencies = [{ plugin = nui-nvim; }];
|
||||
}
|
||||
{
|
||||
plugin = trouble-nvim;
|
||||
lazy = true;
|
||||
keys = [
|
||||
{ key = "<leader>xx"; cmd = "<cmd>TroubleToggle document_diagnostics<cr>"; desc = "Document Diagnostics (Trouble)"; }
|
||||
{ key = "<leader>xX"; cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>"; desc = "Workspace Diagnostics (Troule)"; }
|
||||
|
|
@ -75,13 +79,12 @@ with builtins;
|
|||
conf = readFile ./trouble-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = nvim-web-devicons; lazy = true; }
|
||||
{ plugin = nvim-web-devicons; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
conf = readFile ./nvim-cmp.lua;
|
||||
lazy = true;
|
||||
event = [ "InsertEnter" ];
|
||||
dependencies = [
|
||||
{ plugin = cmp-async-path; }
|
||||
|
|
@ -98,131 +101,94 @@ with builtins;
|
|||
];
|
||||
}
|
||||
{ plugin = friendly-snippets; }
|
||||
{ plugin = luasnip; lazy = true; }
|
||||
{ plugin = luasnip; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = todo-comments-nvim;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./todo-comments-nvim.lua;
|
||||
dependencies = [{ plugin = plenary-nvim; lazy = true; }];
|
||||
dependencies = [{ plugin = plenary-nvim; }];
|
||||
}
|
||||
{
|
||||
plugin = direnv-vim;
|
||||
lazy = false;
|
||||
}
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./nvim-treesitter.lua;
|
||||
dependencies = [
|
||||
{ plugin = nvim-ts-context-commentstring; }
|
||||
{
|
||||
plugin = orgmode;
|
||||
lazy = true;
|
||||
conf = readFile ./orgmode.lua;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
lazy = true;
|
||||
event = [ "BufReadPre" "BufNewFile" ];
|
||||
conf = readFile ./nvim-lspconfig.lua;
|
||||
dependencies = [
|
||||
{
|
||||
plugin = null-ls-nvim;
|
||||
lazy = true;
|
||||
conf = readFile ./null-ls-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; lazy = true; }
|
||||
{ plugin = plenary-nvim; lazy = true; }
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = plenary-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
lazy = true;
|
||||
}
|
||||
{
|
||||
plugin = lspkind-nvim;
|
||||
lazy = true;
|
||||
}
|
||||
{
|
||||
plugin = lsp_lines-nvim;
|
||||
lazy = true;
|
||||
}
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = lspkind-nvim; }
|
||||
{ plugin = lsp_lines-nvim; }
|
||||
{
|
||||
plugin = lspsaga-nvim-original;
|
||||
lazy = true;
|
||||
dependencies = [
|
||||
{ plugin = nvim-web-devicons; lazy = true; }
|
||||
{ plugin = nvim-treesitter.withAllGrammars; lazy = true; }
|
||||
{ plugin = nvim-web-devicons; }
|
||||
{ plugin = nvim-treesitter.withAllGrammars; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-ufo;
|
||||
lazy = true;
|
||||
dependencies = [
|
||||
{ plugin = promise-async; lazy = true; }
|
||||
{ plugin = promise-async; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
event = [ "VeryLazy" ];
|
||||
lazy = true;
|
||||
plugin = vim-fugitive;
|
||||
}
|
||||
{
|
||||
plugin = vim-tmux-navigator;
|
||||
lazy = false;
|
||||
}
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./gitsigns-nvim.lua;
|
||||
dependencies = [{ plugin = which-key-nvim; }];
|
||||
}
|
||||
{
|
||||
plugin = nvim-lastplace;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./nvim-lastplace.lua;
|
||||
}
|
||||
{
|
||||
plugin = nvim-treesitter-textsubjects;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./nvim-treesitter-textsubjects.lua;
|
||||
dependencies = [
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
lazy = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-ts-context-commentstring;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./nvim-ts-context-commentstring.lua;
|
||||
dependencies = [
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
lazy = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = smartcolumn-nvim;
|
||||
lazy = true;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./smartcolumn-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = telescope-fzf-native-nvim;
|
||||
conf = readFile ./telescope-fzf-native-nvim.lua;
|
||||
lazy = true;
|
||||
keys = [
|
||||
{ key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; }
|
||||
{ key = "<leader>fb"; cmd = "<cmd>Telescope buffers<cr>"; desc = "Find buffers"; }
|
||||
|
|
@ -242,13 +208,17 @@ with builtins;
|
|||
dependencies = [
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
lazy = true;
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; lazy = true; }
|
||||
{ plugin = which-key-nvim; lazy = true; }
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = which-key-nvim; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-startuptime;
|
||||
cmd = [ "StartupTime" ];
|
||||
conf = readFile ./vim-startuptime.lua;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue