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
2 changes: 2 additions & 0 deletions pkgs/applications/editors/vim/plugins/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ mapAliases (
feline-nvim = throw "feline.nvim has been removed: upstream deleted repository. Consider using lualine"; # Added 2025-02-09
fugitive = vim-fugitive;
floating-nvim = throw "floating.nvim has been removed: abandoned by upstream. Use popup-nvim or nui-nvim"; # Added 2024-11-26
fzfWrapper = fzf-wrapper;
ghc-mod-vim = ghcmod-vim;
ghcmod = ghcmod-vim;
gleam-vim = throw "gleam.vim has been removed: its code was merged into vim."; # Added 2025-06-10
Expand All @@ -94,6 +95,7 @@ mapAliases (
ipython = vim-ipython;
latex-live-preview = vim-latex-live-preview;
maktaba = vim-maktaba;
minsnip-nvim = throw "the upstream repository got deleted"; # added 2025-08-30
multiple-cursors = vim-multiple-cursors;
necoGhc = neco-ghc; # backwards compat, added 2014-10-18
neocomplete = neocomplete-vim;
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/editors/vim/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ let
# If additional modifications to the build process are required,
# add to ./overrides.nix.
overrides = callPackage ./overrides.nix {
inherit buildVimPlugin;
inherit llvmPackages;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
vimUtils,
ethersync,
}:
vimUtils.buildVimPlugin rec {
inherit (ethersync)
pname
version
src
meta
;

sourceRoot = "${src.name}/nvim-plugin";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
vimUtils,
fzf,
}:
# Mainly used as a dependency for fzf-vim. Wraps the fzf program as a vim
# plugin, since part of the fzf vim plugin is included in the main fzf
# program.
vimUtils.buildVimPlugin {
inherit (fzf) src version;
pname = "fzf";
postInstall = ''
ln -s ${fzf}/bin/fzf $target/bin/fzf
'';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
vimUtils,
hurl,
}:
vimUtils.buildVimPlugin {
pname = "hurl";
inherit (hurl) version;

# https://hurl.dev/
src = "${hurl.src}/contrib/vim";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
lib,
vimUtils,
meson,
}:
vimUtils.buildVimPlugin {
inherit (meson) pname version src;
preInstall = "cd data/syntax-highlighting/vim";
meta.maintainers = with lib.maintainers; [ vcunat ];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
vimUtils,
phpactor,
}:
vimUtils.buildVimPlugin {
inherit (phpactor)
pname
src
meta
version
;
postPatch = ''
substituteInPlace plugin/phpactor.vim \
--replace-fail "g:phpactorpath = expand('<sfile>:p:h') . '/..'" "g:phpactorpath = '${phpactor}'"
'';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
vimUtils,
skim,
}:
vimUtils.buildVimPlugin {
pname = "skim";
inherit (skim) version;
src = skim.vim;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
vimUtils,
statix,
}:
vimUtils.buildVimPlugin rec {
inherit (statix) pname src meta;
version = "0.1.0";
postPatch = ''
# check that version is up to date
grep 'pname = "statix-vim"' -A 1 flake.nix \
| grep -F 'version = "${version}"'

cd vim-plugin
substituteInPlace ftplugin/nix.vim --replace-fail statix ${statix}/bin/statix
substituteInPlace plugin/statix.vim --replace-fail statix ${statix}/bin/statix
'';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
vimUtils,
taskwarrior2,
}:
vimUtils.buildVimPlugin {
inherit (taskwarrior2) version pname;
src = "${taskwarrior2.src}/scripts/vim";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
vimUtils,
taskwarrior3,
}:
vimUtils.buildVimPlugin {
inherit (taskwarrior3) version pname;
src = "${taskwarrior3.src}/scripts/vim";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
lib,
vimUtils,
tup,
}:
let
# Based on the comment at the top of https://github.com/gittup/tup/blob/master/contrib/syntax/tup.vim
ftdetect = builtins.toFile "tup.vim" ''
au BufNewFile,BufRead Tupfile,*.tup setf tup
'';
in
vimUtils.buildVimPlugin {
inherit (tup) pname version src;
preInstall = ''
mkdir -p vim-plugin/syntax vim-plugin/ftdetect
cp contrib/syntax/tup.vim vim-plugin/syntax/tup.vim
cp "${ftdetect}" vim-plugin/ftdetect/tup.vim
cd vim-plugin
'';
meta.maintainers = with lib.maintainers; [ enderger ];
}
128 changes: 6 additions & 122 deletions pkgs/applications/editors/vim/plugins/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
stdenv,
# nixpkgs functions
buildGoModule,
buildVimPlugin,
callPackage,
fetchFromGitHub,
fetchpatch,
Expand Down Expand Up @@ -33,27 +32,20 @@
languagetool,
libgit2,
llvmPackages,
meson,
neovim-unwrapped,
nim1,
nodejs,
notmuch,
openscad,
openssh,
parinfer-rust,
phpactor,
ranger,
ripgrep,
skim,
sqlite,
sshfs,
statix,
stylish-haskell,
tabnine,
taskwarrior2,
taskwarrior3,
tmux,
tup,
typescript,
typescript-language-server,
vim,
Expand Down Expand Up @@ -134,12 +126,15 @@
# search-and-replace.nvim dependencies
fd,
sad,
# ethersync vim plugin
ethersync,
}:
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`";
in
{
corePlugins = symlinkJoin {
Expand Down Expand Up @@ -1160,17 +1155,6 @@ in
'';
};

ethersync = buildVimPlugin rec {
inherit (ethersync)
pname
version
src
meta
;

sourceRoot = "${src.name}/nvim-plugin";
};

executor-nvim = super.executor-nvim.overrideAttrs {
dependencies = [ self.nui-nvim ];
};
Expand Down Expand Up @@ -1334,18 +1318,7 @@ in
};

fzf-vim = super.fzf-vim.overrideAttrs {
dependencies = [ self.fzfWrapper ];
};

# Mainly used as a dependency for fzf-vim. Wraps the fzf program as a vim
# plugin, since part of the fzf vim plugin is included in the main fzf
# program.
fzfWrapper = buildVimPlugin {
inherit (fzf) src version;
pname = "fzf";
postInstall = ''
ln -s ${fzf}/bin/fzf $target/bin/fzf
'';
dependencies = [ self.fzf-wrapper ];
};

gen-nvim = super.gen-nvim.overrideAttrs {
Expand Down Expand Up @@ -1499,15 +1472,6 @@ in
dependencies = [ self.nui-nvim ];
};

# https://hurl.dev/
hurl = buildVimPlugin {
pname = "hurl";
version = hurl.version;
# dontUnpack = true;

src = "${hurl.src}/contrib/vim";
};

hurl-nvim = super.hurl-nvim.overrideAttrs {
dependencies = with self; [
nui-nvim
Expand Down Expand Up @@ -1949,12 +1913,6 @@ in
checkInputs = [ self.lualine-nvim ];
};

meson = buildVimPlugin {
inherit (meson) pname version src;
preInstall = "cd data/syntax-highlighting/vim";
meta.maintainers = with lib.maintainers; [ vcunat ];
};

mind-nvim = super.mind-nvim.overrideAttrs {
dependencies = [ self.plenary-nvim ];
};
Expand All @@ -1978,18 +1936,6 @@ in
vimCommandCheck = "MinimapToggle";
};

minsnip-nvim = buildVimPlugin {
pname = "minsnip.nvim";
version = "2022-01-04";
src = fetchFromGitHub {
owner = "jose-elias-alvarez";
repo = "minsnip.nvim";
rev = "6ae2f3247b3a2acde540ccef2e843fdfcdfebcee";
sha256 = "1db5az5civ2bnqg7v3g937mn150ys52258c3glpvdvyyasxb4iih";
};
meta.homepage = "https://github.com/jose-elias-alvarez/minsnip.nvim/";
};

minuet-ai-nvim = super.minuet-ai-nvim.overrideAttrs {
checkInputs = [
# optional cmp integration
Expand Down Expand Up @@ -3021,19 +2967,6 @@ in
];
};

phpactor = buildVimPlugin {
inherit (phpactor)
pname
src
meta
version
;
postPatch = ''
substituteInPlace plugin/phpactor.vim \
--replace-fail "g:phpactorpath = expand('<sfile>:p:h') . '/..'" "g:phpactorpath = '${phpactor}'"
'';
};

plantuml-nvim = super.plantuml-nvim.overrideAttrs {
dependencies = [ self.LibDeflate-nvim ];
};
Expand Down Expand Up @@ -3211,12 +3144,6 @@ in
];
};

skim = buildVimPlugin {
pname = "skim";
inherit (skim) version;
src = skim.vim;
};

skim-vim = super.skim-vim.overrideAttrs {
dependencies = [ self.skim ];
};
Expand Down Expand Up @@ -3333,20 +3260,6 @@ in
dependencies = [ self.plenary-nvim ];
};

statix = buildVimPlugin rec {
inherit (statix) pname src meta;
version = "0.1.0";
postPatch = ''
# check that version is up to date
grep 'pname = "statix-vim"' -A 1 flake.nix \
| grep -F 'version = "${version}"'

cd vim-plugin
substituteInPlace ftplugin/nix.vim --replace-fail statix ${statix}/bin/statix
substituteInPlace plugin/statix.vim --replace-fail statix ${statix}/bin/statix
'';
};

stylish-nvim = super.stylish-nvim.overrideAttrs {
postPatch = ''
substituteInPlace lua/stylish/common/mouse_hover_handler.lua --replace-fail xdotool ${xdotool}/bin/xdotool
Expand Down Expand Up @@ -3420,17 +3333,6 @@ in
maintainers = with lib.maintainers; [ fredeb ];
};
});

taskwarrior2 = buildVimPlugin {
inherit (taskwarrior2) version pname;
src = "${taskwarrior2.src}/scripts/vim";
};

taskwarrior3 = buildVimPlugin {
inherit (taskwarrior3) version pname;
src = "${taskwarrior3.src}/scripts/vim";
};

telekasten-nvim = super.telekasten-nvim.overrideAttrs {
dependencies = with self; [
plenary-nvim
Expand Down Expand Up @@ -3688,24 +3590,6 @@ in
dependencies = [ self.nvim-treesitter ];
};

tup =
let
# Based on the comment at the top of https://github.com/gittup/tup/blob/master/contrib/syntax/tup.vim
ftdetect = builtins.toFile "tup.vim" ''
au BufNewFile,BufRead Tupfile,*.tup setf tup
'';
in
buildVimPlugin {
inherit (tup) pname version src;
preInstall = ''
mkdir -p vim-plugin/syntax vim-plugin/ftdetect
cp contrib/syntax/tup.vim vim-plugin/syntax/tup.vim
cp "${ftdetect}" vim-plugin/ftdetect/tup.vim
cd vim-plugin
'';
meta.maintainers = with lib.maintainers; [ enderger ];
};

typescript-nvim = super.typescript-nvim.overrideAttrs {
checkInputs = [
# Optional null-ls integration
Expand Down
Loading