2023-06-23 08:32:40 +02:00
|
|
|
{ lib, pkgs, ... }:
|
2023-06-10 21:52:57 +02:00
|
|
|
|
|
|
|
with builtins;
|
|
|
|
{
|
|
|
|
config.my.programs.nvim.plugins = with pkgs.vimPlugins; [
|
|
|
|
{
|
|
|
|
plugin = which-key-nvim;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-06-10 21:52:57 +02:00
|
|
|
conf = readFile ./which-key-nvim.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = catppuccin-nvim;
|
|
|
|
conf = readFile ./catppuccin-nvim.lua;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-06-10 21:52:57 +02:00
|
|
|
priority = 99;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = formatter-nvim;
|
|
|
|
keys = [
|
|
|
|
{ key = "="; cmd = "<cmd>Format<cr>"; desc = "format (formatter)"; }
|
|
|
|
];
|
|
|
|
conf = readFile ./formatter-nvim.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = oil-nvim;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-06-10 21:52:57 +02:00
|
|
|
conf = readFile ./oil-nvim.lua;
|
|
|
|
dependencies = [
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = which-key-nvim; }
|
|
|
|
{ plugin = nvim-web-devicons; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = mini-nvim;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-06-10 21:52:57 +02:00
|
|
|
conf = readFile ./mini-nvim.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = trouble-nvim;
|
|
|
|
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)"; }
|
|
|
|
{ key = "<leader>xl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
|
|
|
{ key = "<leader>xq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
|
|
|
|
{ key = "<leader>xt"; cmd = "<cmd>TodoTrouble<cr>"; desc = "Todo (Trouble)"; }
|
|
|
|
{ key = "<leader>xT"; cmd = "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>"; desc = "Todo/Fix/Fixme (Trouble)"; }
|
|
|
|
{ key = "<leader>st"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
|
|
|
{
|
|
|
|
key = "[q";
|
2023-08-11 18:59:52 +02:00
|
|
|
func = /* lua */ ''function()
|
2023-06-10 21:52:57 +02:00
|
|
|
if require("trouble").is_open() then
|
|
|
|
require("trouble").previous({ skip_groups = true, jump = true })
|
|
|
|
else
|
|
|
|
vim.cmd.cprev()
|
|
|
|
end
|
|
|
|
end'';
|
|
|
|
desc = "Previous trouble/quickfix item";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "]q";
|
2023-08-11 18:59:52 +02:00
|
|
|
func = /* lua */ ''function()
|
2023-06-10 21:52:57 +02:00
|
|
|
if require("trouble").is_open() then
|
|
|
|
require("trouble").next({ skip_groups = true, jump = true })
|
|
|
|
else
|
|
|
|
vim.cmd.cnext()
|
|
|
|
end
|
|
|
|
end'';
|
|
|
|
desc = "Next trouble/quickfix item";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
conf = readFile ./trouble-nvim.lua;
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = which-key-nvim; }
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = nvim-web-devicons; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
2023-09-06 09:19:32 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-cmp;
|
|
|
|
conf = readFile ./nvim-cmp.lua;
|
|
|
|
event = [ "InsertEnter" ];
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = cmp-async-path; }
|
2023-09-06 17:45:31 +02:00
|
|
|
{ plugin = cmp-buffer; }
|
|
|
|
{ plugin = cmp-cmdline; }
|
2023-09-06 09:19:32 +02:00
|
|
|
{ plugin = cmp-nvim-lsp; }
|
|
|
|
{ plugin = cmp_luasnip; }
|
|
|
|
{
|
2023-09-06 17:45:31 +02:00
|
|
|
plugin = codeium-nvim;
|
|
|
|
conf = /* lua */ ''
|
|
|
|
require("codeium").setup({})
|
|
|
|
'';
|
2023-09-06 09:19:32 +02:00
|
|
|
}
|
|
|
|
{ plugin = friendly-snippets; }
|
2023-09-06 17:45:31 +02:00
|
|
|
{ plugin = lspkind-nvim; }
|
2023-09-06 09:19:32 +02:00
|
|
|
{ plugin = luasnip; }
|
|
|
|
];
|
|
|
|
}
|
2023-06-10 21:52:57 +02:00
|
|
|
{
|
|
|
|
plugin = todo-comments-nvim;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./todo-comments-nvim.lua;
|
2023-06-11 10:22:19 +02:00
|
|
|
dependencies = [{ plugin = plenary-nvim; }];
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = direnv-vim;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
2023-06-23 08:32:40 +02:00
|
|
|
plugin = nvim-treesitter;
|
2023-06-10 21:52:57 +02:00
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-06-23 08:32:40 +02:00
|
|
|
conf =
|
|
|
|
let
|
|
|
|
parserDir = pkgs.symlinkJoin {
|
|
|
|
name = "tresitter-grammars-all";
|
|
|
|
paths = lib.attrValues (lib.filterAttrs (_: builtins.isAttrs) nvim-treesitter-parsers);
|
|
|
|
};
|
|
|
|
in
|
|
|
|
readFile ./nvim-treesitter.lua + ''
|
|
|
|
vim.opt.runtimepath:append("${parserDir}")
|
|
|
|
|
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
|
|
parser_install_dir = "${parserDir}",
|
|
|
|
}
|
|
|
|
'';
|
2023-06-10 21:52:57 +02:00
|
|
|
dependencies = [
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = nvim-ts-context-commentstring; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-lspconfig;
|
2023-08-12 11:50:46 +02:00
|
|
|
event = [ "BufRead" "BufNewFile" ];
|
2023-06-10 21:52:57 +02:00
|
|
|
conf = readFile ./nvim-lspconfig.lua;
|
|
|
|
dependencies = [
|
|
|
|
{
|
|
|
|
plugin = null-ls-nvim;
|
|
|
|
conf = readFile ./null-ls-nvim.lua;
|
|
|
|
dependencies = [
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = which-key-nvim; }
|
|
|
|
{ plugin = plenary-nvim; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = which-key-nvim; }
|
|
|
|
{ plugin = lsp_lines-nvim; }
|
2023-06-10 21:52:57 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-ufo;
|
2023-08-12 11:50:46 +02:00
|
|
|
conf = readFile ./nvim-ufo.lua;
|
2023-06-10 21:52:57 +02:00
|
|
|
dependencies = [
|
2023-06-11 10:22:19 +02:00
|
|
|
{ plugin = promise-async; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
2023-08-12 08:07:33 +02:00
|
|
|
{
|
|
|
|
plugin = neodev-nvim;
|
2023-08-12 09:43:13 +02:00
|
|
|
conf = readFile ./neodev-nvim.lua;
|
2023-08-12 08:07:33 +02:00
|
|
|
}
|
2023-08-12 16:46:45 +02:00
|
|
|
{
|
|
|
|
plugin = inc-rename-nvim;
|
|
|
|
conf = /* lua */ ''
|
|
|
|
require("inc_rename").setup {
|
|
|
|
input_buffer_type = "dressing",
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
dependencies = [
|
|
|
|
{
|
|
|
|
plugin = dressing-nvim;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
2023-09-06 08:43:03 +02:00
|
|
|
{ plugin = actions-preview-nvim; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
2023-08-12 16:51:16 +02:00
|
|
|
{
|
|
|
|
plugin = statuscol-nvim;
|
|
|
|
event = [ "VeryLazy" ];
|
|
|
|
conf = readFile ./statuscol-nvim.lua;
|
|
|
|
}
|
2023-06-10 21:52:57 +02:00
|
|
|
{
|
|
|
|
plugin = vim-fugitive;
|
2023-08-11 17:39:02 +02:00
|
|
|
event = [ "VeryLazy" ];
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = vim-tmux-navigator;
|
2023-06-28 09:15:48 +02:00
|
|
|
event = [ "VeryLazy" ];
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = gitsigns-nvim;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./gitsigns-nvim.lua;
|
|
|
|
dependencies = [{ plugin = which-key-nvim; }];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-lastplace;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./nvim-lastplace.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-treesitter-textsubjects;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./nvim-treesitter-textsubjects.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = smartcolumn-nvim;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./smartcolumn-nvim.lua;
|
|
|
|
}
|
|
|
|
{
|
2023-07-15 12:45:11 +02:00
|
|
|
plugin = telescope-nvim;
|
2023-06-23 08:34:00 +02:00
|
|
|
cmd = [ "Telescope" ];
|
2023-07-25 16:00:51 +02:00
|
|
|
conf = builtins.readFile ./telescope.lua;
|
2023-06-10 21:52:57 +02:00
|
|
|
keys = [
|
|
|
|
{ key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; }
|
|
|
|
{ key = "<leader>fb"; cmd = "<cmd>Telescope buffers<cr>"; desc = "Find buffers"; }
|
|
|
|
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Find recent files"; }
|
|
|
|
{ key = "<leader>sl"; cmd = "<cmd>Telescope current_buffer_fuzzy_find<cr>"; desc = "Search lines"; }
|
|
|
|
{ key = "<leader>sg"; cmd = "<cmd>Telescope live_grep<cr>"; desc = "Live grep"; }
|
|
|
|
{ key = "<leader>sc"; cmd = "<cmd>Telescope command_history<cr>"; desc = "Command history"; }
|
|
|
|
{ key = "<leader>sC"; cmd = "<cmd>Telescope commands<cr>"; desc = "Commands"; }
|
|
|
|
{ key = "<leader>sd"; cmd = "<cmd>Telescope diagnostics<cr>"; desc = "Diagnostics"; }
|
|
|
|
{ key = "<leader>sh"; cmd = "<cmd>Telescope help_tags<cr>"; desc = "Help tags"; }
|
|
|
|
{ key = "<leader>sk"; cmd = "<cmd>Telescope keymaps<cr>"; desc = "Keymaps"; }
|
|
|
|
{ key = "<leader>ss"; cmd = "<cmd>Telescope lsp_document_symbols<cr>"; desc = "Symbols (Document)"; }
|
|
|
|
{ key = "<leader>sS"; cmd = "<cmd>Telescope lsp_workspace_symbols<cr>"; desc = "Symbols (Workspace)"; }
|
|
|
|
];
|
|
|
|
dependencies = [
|
2023-07-15 12:45:11 +02:00
|
|
|
{ plugin = plenary-nvim; }
|
|
|
|
{ plugin = which-key-nvim; }
|
2023-07-25 16:00:51 +02:00
|
|
|
{ plugin = telescope-fzf-native-nvim; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
2023-06-11 10:22:19 +02:00
|
|
|
{
|
|
|
|
plugin = vim-startuptime;
|
|
|
|
cmd = [ "StartupTime" ];
|
|
|
|
conf = readFile ./vim-startuptime.lua;
|
|
|
|
}
|
2023-06-25 11:15:08 +02:00
|
|
|
{
|
|
|
|
plugin = typst-vim;
|
|
|
|
ft = [ "typst" "typ" ];
|
|
|
|
}
|
2023-06-23 08:34:00 +02:00
|
|
|
{
|
|
|
|
plugin = comment-nvim;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-08-11 18:59:52 +02:00
|
|
|
conf = /* lua */ ''
|
2023-07-15 12:45:11 +02:00
|
|
|
require("Comment").setup()
|
|
|
|
'';
|
2023-06-23 08:34:00 +02:00
|
|
|
}
|
2023-07-15 12:29:13 +02:00
|
|
|
{
|
|
|
|
plugin = telekasten-nvim;
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = telescope-nvim; }
|
2023-07-23 12:27:18 +02:00
|
|
|
{ plugin = which-key-nvim; }
|
2023-07-15 12:29:13 +02:00
|
|
|
];
|
|
|
|
cmd = [ "Telekasten" ];
|
|
|
|
keys = [
|
|
|
|
{ key = "<leader>z"; cmd = "<cmd>Telekasten<cr>"; desc = "zettelkasten"; }
|
|
|
|
];
|
2023-07-23 12:27:18 +02:00
|
|
|
conf = builtins.readFile ./zettelkasten-nvim.lua;
|
2023-07-15 12:29:13 +02:00
|
|
|
}
|
2023-07-15 12:49:32 +02:00
|
|
|
{
|
|
|
|
plugin = markdown-preview-nvim;
|
2023-08-11 17:39:02 +02:00
|
|
|
ft = [ "md" ];
|
2023-07-15 12:49:32 +02:00
|
|
|
}
|
2023-07-25 16:15:18 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-surround;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-08-11 18:59:52 +02:00
|
|
|
conf = /* lua */ ''
|
2023-07-25 16:15:18 +02:00
|
|
|
require("nvim-surround").setup({})
|
|
|
|
'';
|
|
|
|
}
|
2023-07-29 17:01:53 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-treesitter-context;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-08-11 18:59:52 +02:00
|
|
|
conf = /* lua */ ''
|
2023-07-29 17:01:53 +02:00
|
|
|
require("treesitter-context").setup({})
|
|
|
|
'';
|
|
|
|
}
|
2023-08-11 17:39:19 +02:00
|
|
|
{
|
|
|
|
plugin = dressing-nvim;
|
|
|
|
event = [ "VeryLazy" ];
|
|
|
|
}
|
2023-08-11 18:59:52 +02:00
|
|
|
{
|
|
|
|
plugin = hmts-nvim;
|
|
|
|
ft = [ "nix" ];
|
|
|
|
}
|
2023-08-16 16:42:26 +02:00
|
|
|
{
|
|
|
|
plugin = zen-mode-nvim;
|
|
|
|
keys = [
|
|
|
|
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
|
|
|
|
];
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = twilight-nvim; }
|
|
|
|
];
|
|
|
|
}
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|