196 lines
5.3 KiB
Nix
196 lines
5.3 KiB
Nix
{ pkgs, lib, inputs, ... }:
|
|
|
|
with builtins;
|
|
{
|
|
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
|
{
|
|
plugin = oil-nvim;
|
|
lazy = false;
|
|
opts = { };
|
|
dependencies = [{ plugin = nvim-web-devicons; }];
|
|
}
|
|
{
|
|
plugin = lualine-nvim;
|
|
opts = { };
|
|
dependencies = [{ plugin = nvim-web-devicons; }];
|
|
}
|
|
{
|
|
plugin = mini-nvim;
|
|
lazy = false;
|
|
conf = readFile ./lua/mini-nvim.lua;
|
|
}
|
|
{
|
|
plugin = nvim-cmp;
|
|
keys = [
|
|
{ key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; }
|
|
];
|
|
conf = readFile ./lua/nvim-cmp.lua;
|
|
event = [ "InsertEnter" ];
|
|
dependencies = [
|
|
{
|
|
plugin = nvim-autopairs;
|
|
opts = { };
|
|
}
|
|
{ plugin = cmp-async-path; }
|
|
{ plugin = cmp-buffer; }
|
|
{ plugin = cmp-cmdline; }
|
|
{ plugin = cmp-nvim-lsp; }
|
|
{ plugin = cmp_luasnip; }
|
|
{ plugin = cmp-spell; }
|
|
{ plugin = cmp-nvim-lsp-signature-help; }
|
|
{ plugin = friendly-snippets; }
|
|
{ plugin = lspkind-nvim; }
|
|
{
|
|
plugin = luasnip;
|
|
conf = readFile ./lua/luasnip.lua;
|
|
}
|
|
];
|
|
}
|
|
{
|
|
plugin = direnv-vim;
|
|
lazy = false;
|
|
}
|
|
{
|
|
plugin = pkgs.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
|
version = lib.my.mkVersionInput inputs.nvim-lspconfig;
|
|
src = inputs.nvim-lspconfig;
|
|
});
|
|
event = [ "BufRead" "BufNewFile" ];
|
|
conf = readFile ./lua/nvim-lspconfig.lua;
|
|
dependencies = [
|
|
{
|
|
# TODO: add all required tools to neovim or silence warnings
|
|
plugin = pkgs.vimPlugins.null-ls-nvim.overrideAttrs (_: {
|
|
version = lib.my.mkVersionInput inputs.none-ls-nvim;
|
|
src = inputs.none-ls-nvim;
|
|
});
|
|
conf = readFile ./lua/null-ls-nvim.lua;
|
|
dependencies = [
|
|
{ plugin = which-key-nvim; }
|
|
{ plugin = plenary-nvim; }
|
|
];
|
|
}
|
|
{ plugin = which-key-nvim; }
|
|
{ plugin = lsp_lines-nvim; }
|
|
{
|
|
plugin = inc-rename-nvim;
|
|
opts = {
|
|
input_buffer_type = "dressing";
|
|
};
|
|
dependencies = [
|
|
{ plugin = dressing-nvim; }
|
|
];
|
|
}
|
|
{
|
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
pname = "actions-preview-nvim";
|
|
version = lib.my.mkVersionInput inputs.actions-preview-nvim;
|
|
src = inputs.actions-preview-nvim;
|
|
};
|
|
}
|
|
];
|
|
}
|
|
{
|
|
plugin = vim-fugitive;
|
|
cmd = [
|
|
"G"
|
|
"Git"
|
|
"Ggrep"
|
|
"Glgrep"
|
|
"Gclog"
|
|
"Gllog"
|
|
"Gcd"
|
|
"Glcd"
|
|
"Gedit"
|
|
"Gsplit"
|
|
"Gvsplit"
|
|
"Gtabedit"
|
|
"Gpedit"
|
|
"Gdrop"
|
|
"Gread"
|
|
"Gwrite"
|
|
"Gwq"
|
|
"Gdiffsplit"
|
|
"Gvdiffsplit"
|
|
"GMove"
|
|
"GRename"
|
|
"GDelete"
|
|
"GBrowse"
|
|
];
|
|
keys = [
|
|
{ key = "<leader>gg"; cmd = "<cmd>Gedit :<cr>"; desc = "Open Status"; }
|
|
];
|
|
}
|
|
{
|
|
plugin = vim-tmux-navigator;
|
|
event = [ "VeryLazy" ];
|
|
}
|
|
{
|
|
plugin = nvim-lastplace;
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
opts = {
|
|
lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
|
lastplace_ignore_filetype = [ "gitcommit" "gitrebase" "svn" "hgcommit" ];
|
|
lastplace_open_folds = true;
|
|
};
|
|
}
|
|
{
|
|
plugin = telescope-nvim;
|
|
cmd = [ "Telescope" ];
|
|
conf = builtins.readFile ./lua/telescope.lua;
|
|
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>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" ];
|
|
}
|
|
{ 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" ];
|
|
}
|
|
{ key = "<leader>fh"; cmd = "<cmd>Telescope help_tags<cr>"; desc = "Help tags"; }
|
|
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; }
|
|
];
|
|
dependencies = [
|
|
{ plugin = plenary-nvim; }
|
|
{ plugin = telescope-fzf-native-nvim; }
|
|
];
|
|
}
|
|
{
|
|
plugin = vim-startuptime;
|
|
cmd = [ "StartupTime" ];
|
|
conf = readFile ./lua/vim-startuptime.lua;
|
|
}
|
|
{
|
|
plugin = typst-vim;
|
|
ft = [ "typst" "typ" ];
|
|
}
|
|
{
|
|
plugin = comment-nvim;
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
opts = { };
|
|
}
|
|
{
|
|
plugin = nvim-surround;
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
opts = { };
|
|
}
|
|
{
|
|
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;
|
|
}
|
|
{ plugin = plantuml-syntax; }
|
|
];
|
|
}
|