-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adopt a new format for pkgs/misc/vim-plugins/vim-plugin-names and maintainers/scripts/luarocks-packages.csv #136248
Comments
something like
|
and I don't think vim and luarocks need to use the same format. for vim plugins |
I've been using neovim for a while now and am really liking the Lua use. I'm starting to wonder though if neovim needs its own package infrastructure, separate from While directly using In that regard, might it be useful to adopt a |
I've hit #166007 and would like to change the format. I would vote for a csv file: Would also help me prototype #160484 that kinda works but I am looking for ways to integrate it more cleanly in the nixpks ecosystem. |
Toml is definitely more flexible, though csv is easier (computationally) to parse. That being said, considering the use case is more of for ease of maintenance and readability while maintaining efficient storage, not really making is computationally fast (that's what binary formats are for). I prefer the look of Toml to other formats myself, but given Nix has a built-in JSON parser (iirc), I'd be inclined to maybe recommend either testing to see if the build time is significantly different between those two, or writing in a format such as TOML that is also converted to JSON by the maintainer via a script (less maintainable, but possibly faster at build time) |
nix 2.7 also has builtins.fromTOML |
I've submitted #166941 to address this issue. I ended up using CSV since I liked having one line per plugin. The change should make it easier if we want to swap with another json or toml backend later |
Issue description
I am trying to improve the way neovim plugins are handled. Traditionnally vim plugins are written in vimscript which lacks a dependency management system and so vim plugins tended to have no dependencies. There is now a vibrant community writing lua plugins which is a language with better tooling, notably luarocks that allows to specify dependencies in a rockspec file, for instance https://github.com/lewis6991/gitsigns.nvim/blob/main/gitsigns.nvim-scm-1.rockspec#L17.
I've made substantial changes to our lua infrastructure so we can leverage the rockspec in git repos directly (bypassing luarocks.org) in #134336.
The format of maintainers/scripts/luarocks-packages.csv has grown into a less practical csv file with format
name,src,ref,server,version,luaversion,maintainers
One of the appeal of using csv was that one could comment lines but now that the updater uses the python csv reader, it's not straightforward anymore (the python updater should be changed), also #134336 (comment) mentioned it was not ideal.
These new neovim plugins tend to be more neovim plugins and so we may need to think where to register those packages, (in
pkgs/misc/vim-plugins/vim-plugin-names or in maintainers/scripts/luarocks-packages.csv ?).
Also pkgs/misc/vim-plugins/vim-plugin-names could use some additional fields like the
maintainers
one.Overall it would be nice if both files could share a similar format. Some kind of jsonc (with comment support) maybe.
The text was updated successfully, but these errors were encountered: