Skip to content
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

feat: support luarocks/rocks.nvim #154

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Jul 28, 2024

Hey 👋

Summary

This PR is part of a push to get neovim plugins on luarocks.org.

See also:

With luarocks/rocks.nvim, it is the plugin authors' responsibility to declare dependencies (including tree-sitter parsers) and build instructions - not the user's.
Installing this plugin becomes as simple as :Rocks install neotest-go.nvim.

Things done:

  • Add a workflow that publishes tags to luarocks.org when a tag or release is pushed.

See also: this guide

Notes:

Important

Copy link
Owner

@fredrikaverpil fredrikaverpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrcjkb !

I'll read up on this subject and add the API key when I'm back from 🏖️🌴.

.github/workflows/luarocks.yml Outdated Show resolved Hide resolved
dependencies: |
neotest
plenary.nvim
tree-sitter-go
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... does this imply that this dependency should also be part of the current lazy.nvim instructions in the README?

I didn't quite understand if this was part of the upcoming changes to Neovim.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, luarocks tree-sitter parsers currently only work with rocks.nvim.
lazy.nvim users will probably still want to use nvim-treesitter to install parsers.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

One more question. Lazy.nvim recently started supporting rockspecs: https://lazy.folke.io/packages#rockspec
Isn't that what gets uploaded to luarocks?

Would it make sense for me to create one and then direct this GitHub action to read it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy.nvim can install from luarocks if there's a rockspec in the repo root, but it doesn't treat luarocks packages as first class citizens, so it won't be able to use the tree-sitter-go dependency.

The Github action doesn't yet support using scm rockspecs as a template. See:

Copy link
Owner

@fredrikaverpil fredrikaverpil Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for these insights! 💡

@fredrikaverpil
Copy link
Owner

I've now added the secrets.LUAROCKS_API_KEY as well as a PAT for release please (in #157). Let's try it?

@fredrikaverpil fredrikaverpil merged commit d040988 into fredrikaverpil:main Aug 1, 2024
9 checks passed
@mrcjkb mrcjkb deleted the luarocks branch August 2, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants