dotfiles/overlays/neovim-plugins.nix

45 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2022-11-27 19:29:45 +00:00
# Adopted from here: https://github.com/DieracDelta/vimconfig/blob/801b62dd56cfee59574639904a6c95b525725f66/plugins.nix
2023-02-21 01:45:56 +00:00
inputs: _final: prev:
2022-11-27 19:29:45 +00:00
let
# Use nixpkgs vimPlugin but with source directly from plugin author
2024-04-13 13:03:44 +00:00
withSrc =
pkg: src:
pkg.overrideAttrs (_: {
inherit src;
});
2022-11-27 19:29:45 +00:00
# Package plugin - for plugins not found in nixpkgs at all
2024-04-13 13:03:44 +00:00
plugin =
pname: src:
2023-10-08 15:17:55 +00:00
prev.vimUtils.buildVimPlugin {
inherit pname src;
version = "master";
};
2024-04-13 13:03:44 +00:00
in
{
2022-11-27 19:29:45 +00:00
vimPlugins = prev.vimPlugins // {
2024-04-13 13:03:44 +00:00
nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src;
cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp-src;
2024-04-13 13:03:44 +00:00
nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src;
telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src;
telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src;
toggleterm-nvim = withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src;
bufferline-nvim = withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src;
nvim-tree-lua = withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src;
fidget-nvim = withSrc prev.vimPlugins.fidget-nvim inputs.fidget-nvim-src;
nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src;
# Packaging plugins entirely with Nix
base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
tiny-inline-diagnostic-nvim = plugin "tiny-inline-diagnostic-nvim" inputs.tiny-inline-diagnostic-nvim-src;
snipe-nvim = plugin "snipe-nvim" inputs.snipe-nvim-src;
};
2022-11-27 19:29:45 +00:00
}