dotfiles/modules/programs/nvim/plugins/coding.nix

215 lines
6.3 KiB
Nix
Raw Normal View History

2024-02-12 10:10:32 +01:00
{ pkgs, lib, inputs, ... }:
2023-06-10 21:52:57 +02:00
2024-06-17 09:59:39 +02:00
let
inherit (builtins) readFile;
in
2023-06-10 21:52:57 +02:00
{
2024-06-17 09:59:39 +02:00
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
2023-06-10 21:52:57 +02:00
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.oil-nvim;
lazy = false;
2023-09-10 13:30:29 +02:00
opts = { };
2024-06-17 09:59:39 +02:00
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
2024-04-21 11:21:46 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.lualine-nvim;
2024-04-21 11:21:46 +02:00
opts = { };
2024-06-17 09:59:39 +02:00
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
2023-06-10 21:52:57 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.mini-nvim;
lazy = false;
2023-09-10 13:30:29 +02:00
conf = readFile ./lua/mini-nvim.lua;
2023-06-10 21:52:57 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.nvim-cmp;
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;
event = [ "InsertEnter" ];
dependencies = [
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.nvim-autopairs;
2023-09-10 13:30:29 +02:00
opts = { };
}
2024-06-17 09:59:39 +02:00
{ plugin = pkgs.vimPlugins.cmp-async-path; }
{ plugin = pkgs.vimPlugins.cmp-buffer; }
{ plugin = pkgs.vimPlugins.cmp-cmdline; }
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
{ plugin = pkgs.vimPlugins.cmp_luasnip; }
{ plugin = pkgs.vimPlugins.cmp-spell; }
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp-signature-help; }
2024-02-10 18:22:09 +01:00
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.copilot-cmp;
opts = { };
dependencies = [
{
plugin = pkgs.vimPlugins.copilot-lua;
opts = {
suggestion = { enabled = false; };
panel = { enabled = false; };
};
conf = /* lua */ ''
require("copilot").setup(opts)
vim.cmd("Copilot disable")
'';
}
];
}
{ plugin = pkgs.vimPlugins.friendly-snippets; }
{ plugin = pkgs.vimPlugins.lspkind-nvim; }
{
plugin = pkgs.vimPlugins.luasnip;
2024-02-10 18:22:09 +01:00
conf = readFile ./lua/luasnip.lua;
}
];
}
2023-06-10 21:52:57 +02:00
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.direnv-vim;
lazy = false;
2023-06-10 21:52:57 +02:00
}
{
2024-02-16 11:02:46 +01:00
plugin = pkgs.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
version = lib.my.mkVersionInput inputs.nvim-lspconfig;
src = inputs.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 = [
{
2024-04-21 11:21:46 +02:00
# TODO: add all required tools to neovim or silence warnings
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.none-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 = [
2024-06-17 09:59:39 +02:00
{
plugin = pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-shellcheck.nvim";
version = lib.my.mkVersionInput inputs.none-ls-shellcheck-nvim;
src = inputs.none-ls-shellcheck-nvim;
};
}
2023-06-10 21:52:57 +02:00
];
}
2024-06-17 09:59:39 +02:00
{ plugin = pkgs.vimPlugins.lsp_lines-nvim; }
2023-08-12 16:46:45 +02:00
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.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 = [
2024-06-17 09:59:39 +02:00
{ plugin = pkgs.vimPlugins.dressing-nvim; }
2023-08-12 16:46:45 +02:00
];
}
2024-02-12 10:10:32 +01:00
{
plugin = pkgs.vimUtils.buildVimPlugin {
pname = "actions-preview-nvim";
version = lib.my.mkVersionInput inputs.actions-preview-nvim;
src = inputs.actions-preview-nvim;
};
}
2023-06-10 21:52:57 +02:00
];
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.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"
];
2024-04-21 12:00:38 +02:00
keys = [
{ key = "<leader>gg"; cmd = "<cmd>Gedit :<cr>"; desc = "Open Status"; }
];
2023-06-10 21:52:57 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.vim-tmux-navigator;
event = [ "VeryLazy" ];
2023-06-10 21:52:57 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.nvim-lastplace;
2023-06-10 21:52:57 +02:00
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
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.telescope-nvim;
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>fl";
cmd = "y<ESC>:Telescope current_buffer_fuzzy_find default_text=<c-r>0<CR>";
desc = "Search lines (selection)";
mode = [ "v" ];
}
2023-09-10 13:30:29 +02:00
{ key = "<leader>fg"; cmd = "<cmd>Telescope live_grep<cr>"; desc = "Live grep"; }
{
key = "<leader>fg";
cmd = "y<ESC>:Telescope live_grep default_text=<c-r>0<CR>";
desc = "Live grep (selection)";
mode = [ "v" ];
}
2023-09-10 13:30:29 +02:00
{ key = "<leader>fh"; cmd = "<cmd>Telescope help_tags<cr>"; desc = "Help tags"; }
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; }
2023-06-10 21:52:57 +02:00
];
dependencies = [
2024-06-17 09:59:39 +02:00
{ plugin = pkgs.vimPlugins.plenary-nvim; }
{ plugin = pkgs.vimPlugins.telescope-fzf-native-nvim; }
2023-06-10 21:52:57 +02:00
];
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.vim-startuptime;
cmd = [ "StartupTime" ];
2023-09-10 13:30:29 +02:00
conf = readFile ./lua/vim-startuptime.lua;
}
2023-06-25 11:15:08 +02:00
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.typst-vim;
2023-06-25 11:15:08 +02:00
ft = [ "typst" "typ" ];
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.comment-nvim;
event = [ "BufReadPost" "BufNewFile" ];
2023-09-10 13:30:29 +02:00
opts = { };
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.nvim-surround;
event = [ "BufReadPost" "BufNewFile" ];
2023-09-10 13:30:29 +02:00
opts = { };
2023-08-11 18:59:52 +02:00
}
{
2024-06-17 09:59:39 +02:00
plugin = pkgs.vimPlugins.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
];
}