2023-11-03 13:48:47 +01:00
|
|
|
{ pkgs, ... }:
|
2023-06-10 21:52:57 +02:00
|
|
|
|
|
|
|
with builtins;
|
|
|
|
{
|
2023-09-17 09:35:10 +02:00
|
|
|
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
2023-06-10 21:52:57 +02:00
|
|
|
{
|
|
|
|
plugin = oil-nvim;
|
2023-06-11 10:22:19 +02:00
|
|
|
lazy = false;
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = { };
|
2023-06-10 21:52:57 +02:00
|
|
|
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-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/mini-nvim.lua;
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = trouble-nvim;
|
2023-10-28 15:18:59 +02:00
|
|
|
cmd = [ "TodoTelescope" ];
|
2023-06-10 21:52:57 +02:00
|
|
|
keys = [
|
2023-10-28 15:18:59 +02:00
|
|
|
{ key = "<leader>cD"; cmd = "<cmd>TroubleToggle document_diagnostics<cr>"; desc = "Document Diagnostics (Trouble)"; }
|
|
|
|
{ key = "<leader>cW"; cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>"; desc = "Workspace Diagnostics (Trouble)"; }
|
|
|
|
{ key = "<leader>cl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
|
|
|
{ key = "<leader>cq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
|
2023-09-10 13:30:29 +02:00
|
|
|
{ key = "<leader>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
2023-06-10 21:52:57 +02:00
|
|
|
{
|
|
|
|
key = "[q";
|
2023-09-10 13:30:29 +02:00
|
|
|
func = /* lua */ ''
|
|
|
|
function()
|
|
|
|
if require("trouble").is_open() then
|
|
|
|
require("trouble").previous({ skip_groups = true, jump = true })
|
|
|
|
else
|
|
|
|
vim.cmd.cprev()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
'';
|
2023-06-10 21:52:57 +02:00
|
|
|
desc = "Previous trouble/quickfix item";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "]q";
|
2023-09-10 13:30:29 +02:00
|
|
|
func = /* lua */ ''
|
|
|
|
function()
|
|
|
|
if require("trouble").is_open() then
|
|
|
|
require("trouble").next({ skip_groups = true, jump = true })
|
|
|
|
else
|
|
|
|
vim.cmd.cnext()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
'';
|
2023-06-10 21:52:57 +02:00
|
|
|
desc = "Next trouble/quickfix item";
|
|
|
|
}
|
|
|
|
];
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = { };
|
2023-06-10 21:52:57 +02:00
|
|
|
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;
|
2023-10-26 09:47:21 +02:00
|
|
|
keys = [
|
|
|
|
{ key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; }
|
|
|
|
];
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/nvim-cmp.lua;
|
2023-09-06 09:19:32 +02:00
|
|
|
event = [ "InsertEnter" ];
|
|
|
|
dependencies = [
|
2023-09-07 08:39:43 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-autopairs;
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = { };
|
2023-09-07 08:39:43 +02:00
|
|
|
}
|
2023-09-06 09:19:32 +02:00
|
|
|
{ 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-17 09:36:22 +02:00
|
|
|
{
|
2023-10-01 21:15:49 +02:00
|
|
|
plugin = codeium-nvim;
|
2023-09-17 09:36:22 +02:00
|
|
|
opts = { };
|
|
|
|
}
|
2023-10-01 21:15:49 +02:00
|
|
|
{ plugin = friendly-snippets; }
|
|
|
|
{ plugin = lspkind-nvim; }
|
|
|
|
{ plugin = luasnip; }
|
2023-09-06 09:19:32 +02:00
|
|
|
];
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-lspconfig;
|
2023-08-12 11:50:46 +02:00
|
|
|
event = [ "BufRead" "BufNewFile" ];
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/nvim-lspconfig.lua;
|
2023-06-10 21:52:57 +02:00
|
|
|
dependencies = [
|
|
|
|
{
|
|
|
|
plugin = null-ls-nvim;
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/null-ls-nvim.lua;
|
2023-06-10 21:52:57 +02:00
|
|
|
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-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/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-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/neodev-nvim.lua;
|
2023-08-12 08:07:33 +02:00
|
|
|
}
|
2023-08-12 16:46:45 +02:00
|
|
|
{
|
|
|
|
plugin = inc-rename-nvim;
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = {
|
|
|
|
input_buffer_type = "dressing";
|
|
|
|
};
|
2023-08-12 16:46:45 +02:00
|
|
|
dependencies = [
|
2023-09-10 13:30:29 +02:00
|
|
|
{ plugin = dressing-nvim; }
|
2023-08-12 16:46:45 +02:00
|
|
|
];
|
|
|
|
}
|
2023-09-06 08:43:03 +02:00
|
|
|
{ plugin = actions-preview-nvim; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = vim-fugitive;
|
2023-09-07 08:02:32 +02:00
|
|
|
cmd = [
|
|
|
|
"G"
|
|
|
|
"Git"
|
|
|
|
"Ggrep"
|
|
|
|
"Glgrep"
|
|
|
|
"Gclog"
|
|
|
|
"Gllog"
|
|
|
|
"Gcd"
|
|
|
|
"Glcd"
|
|
|
|
"Gedit"
|
|
|
|
"Gsplit"
|
|
|
|
"Gvsplit"
|
|
|
|
"Gtabedit"
|
|
|
|
"Gpedit"
|
|
|
|
"Gdrop"
|
|
|
|
"Gread"
|
|
|
|
"Gwrite"
|
|
|
|
"Gwq"
|
|
|
|
"Gdiffsplit"
|
|
|
|
"Gvdiffsplit"
|
|
|
|
"GMove"
|
|
|
|
"GRename"
|
|
|
|
"GDelete"
|
|
|
|
"GBrowse"
|
|
|
|
];
|
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 = nvim-lastplace;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = {
|
|
|
|
lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
|
|
|
lastplace_ignore_filetype = [ "gitcommit" "gitrebase" "svn" "hgcommit" ];
|
|
|
|
lastplace_open_folds = true;
|
|
|
|
};
|
2023-06-10 21:52:57 +02:00
|
|
|
}
|
|
|
|
{
|
2023-07-15 12:45:11 +02:00
|
|
|
plugin = telescope-nvim;
|
2023-06-23 08:34:00 +02:00
|
|
|
cmd = [ "Telescope" ];
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = builtins.readFile ./lua/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"; }
|
2023-09-10 13:30:29 +02:00
|
|
|
{ key = "<leader>fl"; cmd = "<cmd>Telescope current_buffer_fuzzy_find<cr>"; desc = "Search lines"; }
|
|
|
|
{ key = "<leader>fg"; cmd = "<cmd>Telescope live_grep<cr>"; desc = "Live grep"; }
|
|
|
|
{ key = "<leader>fh"; cmd = "<cmd>Telescope help_tags<cr>"; desc = "Help tags"; }
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
dependencies = [
|
2023-07-15 12:45:11 +02:00
|
|
|
{ plugin = plenary-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" ];
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = readFile ./lua/vim-startuptime.lua;
|
2023-06-11 10:22:19 +02:00
|
|
|
}
|
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-09-10 13:30:29 +02:00
|
|
|
opts = { };
|
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-09-10 13:30:29 +02:00
|
|
|
{
|
|
|
|
plugin = markdown-preview-nvim;
|
|
|
|
ft = [ "md" ];
|
|
|
|
}
|
2023-07-15 12:29:13 +02:00
|
|
|
];
|
|
|
|
cmd = [ "Telekasten" ];
|
|
|
|
keys = [
|
2023-10-28 15:18:59 +02:00
|
|
|
{ key = "<leader>fz"; cmd = "<cmd>Telekasten<cr>"; desc = "Zettelkasten"; }
|
2023-07-15 12:29:13 +02:00
|
|
|
];
|
2023-09-10 13:30:29 +02:00
|
|
|
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
|
2023-07-15 12:49:32 +02:00
|
|
|
}
|
2023-07-25 16:15:18 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-surround;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
2023-09-10 13:30:29 +02:00
|
|
|
opts = { };
|
2023-08-11 18:59:52 +02:00
|
|
|
}
|
2023-08-16 16:42:26 +02:00
|
|
|
{
|
|
|
|
plugin = zen-mode-nvim;
|
|
|
|
keys = [
|
|
|
|
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
|
|
|
|
];
|
2023-09-07 09:09:12 +02:00
|
|
|
conf = /* lua */ ''
|
|
|
|
require("zen-mode").setup({
|
|
|
|
plugins = {
|
|
|
|
tmux = {
|
|
|
|
enabled = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
'';
|
2023-08-16 16:42:26 +02:00
|
|
|
dependencies = [
|
2023-09-07 09:09:12 +02:00
|
|
|
{
|
|
|
|
plugin = twilight-nvim;
|
|
|
|
conf = /* lua */ ''
|
|
|
|
require("twilight").setup({
|
|
|
|
context = 20,
|
|
|
|
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
|
|
|
"function",
|
|
|
|
"function_definition",
|
|
|
|
"if_statement",
|
|
|
|
"method",
|
|
|
|
"method_definition",
|
|
|
|
"table",
|
|
|
|
},
|
|
|
|
})
|
|
|
|
'';
|
|
|
|
}
|
2023-08-16 16:42:26 +02:00
|
|
|
];
|
|
|
|
}
|
2023-09-10 13:30:29 +02:00
|
|
|
{
|
|
|
|
plugin = refactoring-nvim;
|
|
|
|
keys = [
|
2023-10-28 15:18:59 +02:00
|
|
|
{
|
|
|
|
key = "<leader>cR";
|
|
|
|
cmd = "<cmd>lua require('telescope').extensions.refactoring.refactors()<cr>";
|
|
|
|
desc = "Refactor";
|
|
|
|
mode = [ "x" "n" ];
|
|
|
|
}
|
2023-09-10 13:30:29 +02:00
|
|
|
];
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = which-key-nvim; }
|
|
|
|
{ plugin = plenary-nvim; }
|
|
|
|
{ plugin = nvim-lspconfig; }
|
|
|
|
];
|
|
|
|
opts = { };
|
|
|
|
}
|
2023-09-10 13:35:13 +02:00
|
|
|
{
|
|
|
|
plugin = harpoon;
|
|
|
|
keys = [
|
|
|
|
{ key = "<leader>ha"; cmd = "<cmd>lua require('harpoon.mark').add_file()<cr>"; desc = "Add file"; }
|
|
|
|
{ key = "<leader>hh"; cmd = "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"; desc = "Harpoon"; }
|
2023-10-28 15:18:59 +02:00
|
|
|
{ key = "<leader>1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
|
|
|
|
{ key = "<leader>2"; cmd = "<cmd>lua require('harpoon.ui').nav_file(2)<cr>"; desc = "Harpoon file 2"; }
|
|
|
|
{ key = "<leader>3"; cmd = "<cmd>lua require('harpoon.ui').nav_file(3)<cr>"; desc = "Harpoon file 3"; }
|
|
|
|
{ key = "<leader>4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
|
2023-09-10 13:35:13 +02:00
|
|
|
];
|
|
|
|
opts = { };
|
2023-10-28 15:18:59 +02:00
|
|
|
init = /* lua */ ''
|
|
|
|
require("which-key").register({
|
|
|
|
["<leader>h"] = {
|
|
|
|
name = "harpoon",
|
|
|
|
},
|
|
|
|
})
|
|
|
|
'';
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = which-key-nvim; }
|
|
|
|
];
|
2023-09-10 13:35:13 +02:00
|
|
|
}
|
2023-09-27 10:38:27 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-puppeteer;
|
|
|
|
lazy = false; # NOTE: plugin lazy-loads itself.
|
|
|
|
}
|
2023-10-27 19:31:03 +02:00
|
|
|
{
|
|
|
|
plugin = neotest;
|
|
|
|
keys = [
|
|
|
|
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
|
|
|
|
];
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = plenary-nvim; }
|
|
|
|
{ plugin = FixCursorHold-nvim; }
|
|
|
|
|
|
|
|
# adapters
|
2023-10-28 15:18:59 +02:00
|
|
|
{ plugin = neotest-python; }
|
2023-10-27 19:31:03 +02:00
|
|
|
];
|
|
|
|
conf = readFile ./lua/neotest.lua;
|
|
|
|
}
|
2023-11-03 13:48:47 +01:00
|
|
|
{
|
|
|
|
plugin = conform-nvim;
|
|
|
|
keys = [
|
|
|
|
{ key = "="; cmd = "<cmd>lua require('conform').format()<cr>"; desc = "format buffer"; mode = [ "n" "v" ]; }
|
|
|
|
];
|
|
|
|
cmd = [ "ConformInfo" "Format" ];
|
|
|
|
conf = readFile ./lua/conform.lua;
|
|
|
|
}
|
2023-06-10 21:52:57 +02:00
|
|
|
];
|
|
|
|
}
|