Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/applications/editors/vim/plugins/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ mapAliases (
surround = vim-surround;
sleuth = vim-sleuth;
solidity = vim-solidity;
ssr = ssr-nvim; # Added 2025-08-31
stylish-haskell = vim-stylish-haskell;
stylishHaskell = vim-stylish-haskell; # backwards compat, added 2014-10-18
suda-vim = vim-suda; # backwards compat, added 2024-05-16
Expand Down
31 changes: 31 additions & 0 deletions pkgs/applications/editors/vim/plugins/corePlugins.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
symlinkJoin,
}:
final: prev: {

corePlugins = symlinkJoin {
name = "core-vim-plugins";
paths = with final; [
# plugin managers
lazy-nvim
mini-deps
packer-nvim
vim-plug

# core dependencies
plenary-nvim

# popular plugins
mini-nvim
nvim-cmp
nvim-lspconfig
nvim-treesitter
vim-airline
vim-fugitive
vim-surround
];

meta.description = "Collection of popular vim plugins (for internal testing purposes)";
};

}
3 changes: 3 additions & 0 deletions pkgs/applications/editors/vim/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ let
inherit (neovimUtils) buildNeovimPlugin;
};

corePlugins = callPackage ./corePlugins.nix { };

# TL;DR
# * Add your plugin to ./vim-plugin-names
# * run ./update.py
Expand All @@ -66,6 +68,7 @@ lib.pipe initialPackages [
(extends luaPackagePlugins)
(extends nodePackagePlugins)
(extends nonGeneratedPlugins)
(extends corePlugins)
(extends overrides)
(extends aliases)
lib.makeExtensible
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ let

luarocksPackageNames = [
"fidget-nvim"
"fzf-lua"
"gitsigns-nvim"
"grug-far-nvim"
"haskell-tools-nvim"
"image-nvim"
"lsp-progress-nvim"
"lualine-nvim"
Expand All @@ -34,6 +36,8 @@ let
"plenary-nvim"
"rest-nvim"
"rocks-config-nvim"
"rocks-nvim"
"rustaceanvim"
"rtp-nvim"
"telescope-manix"
"telescope-nvim"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ notmuch }: notmuch.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
lib,
vimPlugins,
}:
lib.recurseIntoAttrs vimPlugins.nvim-treesitter.grammarPlugins
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ parinfer-rust }: parinfer-rust
93 changes: 27 additions & 66 deletions pkgs/applications/editors/vim/plugins/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
fetchFromGitHub,
fetchpatch,
fetchurl,
neovimUtils,
replaceVars,
symlinkJoin,
# Language dependencies
fetchYarnDeps,
mkYarnModules,
Expand All @@ -35,10 +33,8 @@
neovim-unwrapped,
nim1,
nodejs,
notmuch,
openscad,
openssh,
parinfer-rust,
ranger,
ripgrep,
sqlite,
Expand All @@ -64,7 +60,6 @@
codeium,
# command-t dependencies
getconf,
ruby,
# cornelis dependencies
cornelis,
# cpsm dependencies
Expand Down Expand Up @@ -108,7 +103,6 @@
# hurl dependencies
hurl,
# must be lua51Packages
luajitPackages,
aider-chat,
# typst-preview dependencies
tinymist,
Expand All @@ -131,42 +125,22 @@ self: super:
let
luaPackages = neovim-unwrapped.lua.pkgs;

# Ensure the vim plugin builders are not used in this file.
# If they are used, these stubs will throw.
buildVimPlugin = throw "New plugin definitions should be done outside `overrides.nix`";
buildNeoVimPlugin = throw "New plugin definitions should be done outside `overrides.nix`";
# Ensures new attributes are not added in this file.
assertNoAdditions =
overrides:
let
prevNames = lib.attrNames super;
definedNames = lib.attrNames overrides;
addedNames = lib.subtractLists prevNames definedNames;
in
lib.throwIfNot (addedNames == [ ])
"vimPlugins: the following attributes should not be defined in overrides.nix:${
lib.concatMapStrings (name: "\n- ${name}") addedNames
}"
overrides;
in
{
corePlugins = symlinkJoin {
name = "core-vim-plugins";
paths = with self; [
# plugin managers
lazy-nvim
mini-deps
packer-nvim
vim-plug

# core dependencies
plenary-nvim

# popular plugins
mini-nvim
nvim-cmp
nvim-lspconfig
nvim-treesitter
vim-airline
vim-fugitive
vim-surround
];

meta = {
description = "Collection of popular vim plugins (for internal testing purposes)";
};
};

#######################
# Regular overrides

assertNoAdditions {
advanced-git-search-nvim = super.advanced-git-search-nvim.overrideAttrs {
checkInputs = with self; [
snacks-nvim
Expand Down Expand Up @@ -1306,8 +1280,7 @@ in
dependencies = [ self.plenary-nvim ];
};

fzf-lua = neovimUtils.buildNeovimPlugin {
luaAttr = luaPackages.fzf-lua;
fzf-lua = super.fzf-lua.overrideAttrs {
runtimeDeps = [ fzf ];
nvimSkipModules = [
"fzf-lua.shell_helper"
Expand Down Expand Up @@ -1433,10 +1406,9 @@ in
dependencies = [ self.luasnip ];
};

haskell-tools-nvim = neovimUtils.buildNeovimPlugin {
haskell-tools-nvim = super.haskell-tools-nvim.overrideAttrs {
# Optional integrations
checkInputs = [ self.telescope-nvim ];
luaAttr = luaPackages.haskell-tools-nvim;
};

helm-ls-nvim = super.helm-ls-nvim.overrideAttrs {
Expand Down Expand Up @@ -2339,8 +2311,6 @@ in
NotebookNavigator-nvim = super.NotebookNavigator-nvim.overrideAttrs {
};

notmuch-vim = notmuch.vim;

nterm-nvim = super.nterm-nvim.overrideAttrs {
dependencies = [ self.aniseed ];
};
Expand Down Expand Up @@ -2699,8 +2669,6 @@ in
dependencies = [ self.nvim-treesitter ];
};

nvim-treesitter-parsers = lib.recurseIntoAttrs self.nvim-treesitter.grammarPlugins;

nvim-treesitter-pyfold = super.nvim-treesitter-pyfold.overrideAttrs {
dependencies = [ self.nvim-treesitter ];
};
Expand Down Expand Up @@ -2905,8 +2873,6 @@ in
dependencies = [ self.nui-nvim ];
};

inherit parinfer-rust;

parpar-nvim = super.parpar-nvim.overrideAttrs {
dependencies = with self; [
nvim-parinfer
Expand Down Expand Up @@ -3091,27 +3057,22 @@ in
dependencies = [ self.plenary-nvim ];
};

rocks-nvim =
(neovimUtils.buildNeovimPlugin {
luaAttr = luaPackages.rocks-nvim;
}).overrideAttrs
(oa: {
passthru = oa.passthru // {
initLua = ''
vim.g.rocks_nvim = {
luarocks_binary = "${neovim-unwrapped.lua.pkgs.luarocks_bootstrap}/bin/luarocks"
}
'';
};
rocks-nvim = super.rocks-nvim.overrideAttrs (oa: {
passthru = oa.passthru // {
initLua = ''
vim.g.rocks_nvim = {
luarocks_binary = "${neovim-unwrapped.lua.pkgs.luarocks_bootstrap}/bin/luarocks"
}
'';
};

});
});

rustaceanvim = neovimUtils.buildNeovimPlugin {
rustaceanvim = super.rustaceanvim.overrideAttrs {
checkInputs = [
# Optional integration
self.neotest
];
luaAttr = luaPackages.rustaceanvim;
};

rust-tools-nvim = super.rust-tools-nvim.overrideAttrs {
Expand Down Expand Up @@ -3252,7 +3213,7 @@ in
}
);

ssr = super.ssr-nvim.overrideAttrs {
ssr-nvim = super.ssr-nvim.overrideAttrs {
dependencies = [ self.nvim-treesitter ];
};

Expand Down
Loading