Skip to content

vimPlugins: include all source in lua-based plugins, updates#408700

Closed
dtomvan wants to merge 8 commits intoNixOS:masterfrom
dtomvan:dtomvan/push-wrultoorqvmw
Closed

vimPlugins: include all source in lua-based plugins, updates#408700
dtomvan wants to merge 8 commits intoNixOS:masterfrom
dtomvan:dtomvan/push-wrultoorqvmw

Conversation

@dtomvan
Copy link
Contributor

@dtomvan dtomvan commented May 19, 2025

May fix #407318

Not sure if this is the way...

  • Moved away from luaPackagePlugins (added warnOnInstantiate)
  • Moved away from buildNeovimPlugin for generated plugin definitions
  • Updated everything so the luarocks plugins get added to generated.nix

Note

Note that this doesn't mean that buildNeovimPlugin is deprecated/removed, just unused from this point for generated plugins, as it can create unwanted behavior according to linked issue

Tested by building vimPlugins.gitsigns-nvim. Output has more stuff in it, package name now no longer contains lua5.1, warning doesn't get thrown. Should most likely work in real neovim installations as they are as close to the original source now as possible.

TODO

nix-build -A neovim.passthru.tests --keep-going works, except for:

  • nvim-cmp and plenary.nvim's neovimRequireCheckHook now fail because it expects some spec files to exist which presumably only get built for the luarocks variation. We could keep those two as the only luaPackagePlugins in vimPlugins?
  • Make sure these plugins cannot get loaded by vim accidentally?

I just worked on this for a bit, until I thought it was good enough. I'd like a little bit of feedback on this. Maybe this isn't wanted or polished enough, but I thought this would be a way to make those vimPlugins a little more unified.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

dtomvan added 8 commits May 19, 2025 13:57
I copied all urls from (minus the `/archive/...`):
```ShellSession
$ nix repl
> :l .
> lib.map (p: p.src.url) (lib.attrValues (callPackage ./pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix { inherit (neovimUtils) buildNeovimPlugin; } {} {}))
```
`buildNeovimPlugin` ignores vim directories such as `plugin` which might
still be helpful

ref: NixOS#407318
Byproduct of running newer ruff
@github-actions github-actions bot added the 6.topic: vim Advanced text editor label May 19, 2025
@dtomvan dtomvan marked this pull request as draft May 19, 2025 12:26
@dtomvan dtomvan added 9.needs: reporter feedback This issue needs the person who filed it to respond 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels May 19, 2025
@dtomvan
Copy link
Contributor Author

dtomvan commented May 19, 2025

Outpaths fail, because vimPlugins.corePlugins throws a couple warnings which were introduced in this patch. The update caused 94 plugin updates, tagged manually.

@PerchunPak
Copy link
Member

#335931 (comment)

@PerchunPak PerchunPak closed this May 19, 2025
@dtomvan
Copy link
Contributor Author

dtomvan commented May 19, 2025

Ah, okay, thank you for the explanation. I guess bet on #344320 then? Or also too hacky?

In any case, I think reporter's bug still exists after that. Could the luarocks package filter get toned down a bit then?

@dtomvan dtomvan deleted the dtomvan/push-wrultoorqvmw branch May 19, 2025 12:51
@PerchunPak
Copy link
Member

I have no idea tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: vim Advanced text editor 8.has: clean-up This PR removes packages or removes other cruft 9.needs: reporter feedback This issue needs the person who filed it to respond 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vimPlugins.gitsigns-nvim: missing plugin directory

2 participants