mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
plugins/lazy.nvim: new plugin manager (#1175)
This commit is contained in:
parent
ba5a0b84e1
commit
f6e79601ad
4 changed files with 298 additions and 1 deletions
72
tests/test-sources/plugins/pluginmanagers/lazy.nix
Normal file
72
tests/test-sources/plugins/pluginmanagers/lazy.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{pkgs, ...}: {
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.lazy.enable = true;
|
||||
};
|
||||
|
||||
test = {
|
||||
plugins.lazy = with pkgs.vimPlugins; {
|
||||
enable = true;
|
||||
|
||||
plugins = [
|
||||
vim-closer
|
||||
|
||||
# Load on specific commands
|
||||
{
|
||||
pkg = vim-dispatch;
|
||||
optional = true;
|
||||
cmd = ["Dispatch" "Make" "Focus" "Start"];
|
||||
}
|
||||
|
||||
# Load on an autocommand event
|
||||
{
|
||||
pkg = vim-matchup;
|
||||
event = "VimEnter";
|
||||
}
|
||||
|
||||
# Load on a combination of conditions: specific filetypes or commands
|
||||
{
|
||||
pkg = ale;
|
||||
name = "w0rp/ale";
|
||||
ft = ["sh" "zsh" "bash" "c" "cpp" "cmake" "html" "markdown" "racket" "vim" "tex"];
|
||||
cmd = "ALEEnable";
|
||||
}
|
||||
|
||||
# Plugins can have dependencies on other plugins
|
||||
{
|
||||
pkg = completion-nvim;
|
||||
optional = true;
|
||||
dependencies = [
|
||||
{
|
||||
pkg = vim-vsnip;
|
||||
optional = true;
|
||||
}
|
||||
{
|
||||
pkg = vim-vsnip-integ;
|
||||
optional = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
# Plugins can have post-install/update hooks
|
||||
{
|
||||
pkg = markdown-preview-nvim;
|
||||
cmd = "MarkdownPreview";
|
||||
}
|
||||
|
||||
# Post-install/update hook with neovim command
|
||||
{
|
||||
pkg = nvim-treesitter;
|
||||
opts = {ensure_installed = {};};
|
||||
}
|
||||
|
||||
# Use dependency and run lua function after load
|
||||
{
|
||||
pkg = gitsigns-nvim;
|
||||
dependencies = [plenary-nvim];
|
||||
config = ''function() require("gitsigns").setup() end'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue