diff --git a/pkgs/applications/editors/vim/plugins/aliases.nix b/pkgs/applications/editors/vim/plugins/aliases.nix index 1adb63ed5d232..660fb8db03c10 100644 --- a/pkgs/applications/editors/vim/plugins/aliases.nix +++ b/pkgs/applications/editors/vim/plugins/aliases.nix @@ -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 @@ -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; diff --git a/pkgs/applications/editors/vim/plugins/default.nix b/pkgs/applications/editors/vim/plugins/default.nix index 7291299013159..0bf9f74f2edea 100644 --- a/pkgs/applications/editors/vim/plugins/default.nix +++ b/pkgs/applications/editors/vim/plugins/default.nix @@ -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; }; diff --git a/pkgs/applications/editors/vim/plugins/non-generated/ethersync/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/ethersync/default.nix new file mode 100644 index 0000000000000..8e6f58e1a105c --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/ethersync/default.nix @@ -0,0 +1,14 @@ +{ + vimUtils, + ethersync, +}: +vimUtils.buildVimPlugin rec { + inherit (ethersync) + pname + version + src + meta + ; + + sourceRoot = "${src.name}/nvim-plugin"; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/fzf-wrapper/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/fzf-wrapper/default.nix new file mode 100644 index 0000000000000..c22afcf7e9ae8 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/fzf-wrapper/default.nix @@ -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 + ''; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/hurl/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/hurl/default.nix new file mode 100644 index 0000000000000..7bb376ea1f188 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/hurl/default.nix @@ -0,0 +1,11 @@ +{ + vimUtils, + hurl, +}: +vimUtils.buildVimPlugin { + pname = "hurl"; + inherit (hurl) version; + + # https://hurl.dev/ + src = "${hurl.src}/contrib/vim"; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/meson/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/meson/default.nix new file mode 100644 index 0000000000000..53efe4a192001 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/meson/default.nix @@ -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 ]; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/phpactor/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/phpactor/default.nix new file mode 100644 index 0000000000000..107d6ca9c353b --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/phpactor/default.nix @@ -0,0 +1,16 @@ +{ + vimUtils, + phpactor, +}: +vimUtils.buildVimPlugin { + inherit (phpactor) + pname + src + meta + version + ; + postPatch = '' + substituteInPlace plugin/phpactor.vim \ + --replace-fail "g:phpactorpath = expand(':p:h') . '/..'" "g:phpactorpath = '${phpactor}'" + ''; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/skim/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/skim/default.nix new file mode 100644 index 0000000000000..5fb2fcc5af572 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/skim/default.nix @@ -0,0 +1,9 @@ +{ + vimUtils, + skim, +}: +vimUtils.buildVimPlugin { + pname = "skim"; + inherit (skim) version; + src = skim.vim; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/statix/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/statix/default.nix new file mode 100644 index 0000000000000..62dd5e9b9bc08 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/statix/default.nix @@ -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 + ''; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior2/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior2/default.nix new file mode 100644 index 0000000000000..0c9deecec1c0a --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior2/default.nix @@ -0,0 +1,8 @@ +{ + vimUtils, + taskwarrior2, +}: +vimUtils.buildVimPlugin { + inherit (taskwarrior2) version pname; + src = "${taskwarrior2.src}/scripts/vim"; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior3/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior3/default.nix new file mode 100644 index 0000000000000..0abec7239e73e --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/taskwarrior3/default.nix @@ -0,0 +1,8 @@ +{ + vimUtils, + taskwarrior3, +}: +vimUtils.buildVimPlugin { + inherit (taskwarrior3) version pname; + src = "${taskwarrior3.src}/scripts/vim"; +} diff --git a/pkgs/applications/editors/vim/plugins/non-generated/tup/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/tup/default.nix new file mode 100644 index 0000000000000..6a92e835a6422 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/non-generated/tup/default.nix @@ -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 ]; +} diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 4942fbca8e09d..6baecc1ec162b 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -3,7 +3,6 @@ stdenv, # nixpkgs functions buildGoModule, - buildVimPlugin, callPackage, fetchFromGitHub, fetchpatch, @@ -33,7 +32,6 @@ languagetool, libgit2, llvmPackages, - meson, neovim-unwrapped, nim1, nodejs, @@ -41,19 +39,13 @@ openscad, openssh, parinfer-rust, - phpactor, ranger, ripgrep, - skim, sqlite, sshfs, - statix, stylish-haskell, tabnine, - taskwarrior2, - taskwarrior3, tmux, - tup, typescript, typescript-language-server, vim, @@ -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 { @@ -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 ]; }; @@ -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 { @@ -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 @@ -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 ]; }; @@ -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 @@ -3021,19 +2967,6 @@ in ]; }; - phpactor = buildVimPlugin { - inherit (phpactor) - pname - src - meta - version - ; - postPatch = '' - substituteInPlace plugin/phpactor.vim \ - --replace-fail "g:phpactorpath = expand(':p:h') . '/..'" "g:phpactorpath = '${phpactor}'" - ''; - }; - plantuml-nvim = super.plantuml-nvim.overrideAttrs { dependencies = [ self.LibDeflate-nvim ]; }; @@ -3211,12 +3144,6 @@ in ]; }; - skim = buildVimPlugin { - pname = "skim"; - inherit (skim) version; - src = skim.vim; - }; - skim-vim = super.skim-vim.overrideAttrs { dependencies = [ self.skim ]; }; @@ -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 @@ -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 @@ -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