-
Notifications
You must be signed in to change notification settings - Fork 44
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 #78
feat: support luarocks/rocks.nvim #78
Conversation
with: | ||
version: ${{ env.LUAROCKS_VERSION }} | ||
dependencies: | | ||
tree-sitter-markdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: The tree-sitter-markdown
luarocks package has tree-sitter-markdown_inline
as a dependency, so there's no need to specify it here.
Thanks for the PR! I'm not very familiar with luarocks, but I get the general concept of moving more plugins into the repository. I'll take a closer look at this and come back to it in a few days after I get some familiarity. Thanks for putting this together! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for putting this together, I had a couple of clarifying questions just so I understand what's going on.
.github/workflows/luarocks.yml
Outdated
crate: tree-sitter-cli | ||
|
||
- name: LuaRocks Upload | ||
uses: nvim-neorocks/luarocks-tag-release@v5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat action :)
If we use @v7
do the labels get picked up, or is this a more general problem?
https://github.com/nvim-neorocks/luarocks-tag-release?tab=readme-ov-file#labels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, my bad. This should be using v7.
v5 tries to run busted tests if a .busted file is present. We moved that to a separate action, because it caused issues with this one.
The labels problem is a luarocks-site bug.
- name: Install C/C++ Compiler | ||
uses: rlalik/setup-cpp-compiler@master | ||
with: | ||
compiler: clang-latest | ||
|
||
- name: Install tree-sitter CLI | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: tree-sitter-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume both of these are needed for the tree-sitter-*
dependencies but I can't quite figure out why.
Like why does the environment that publishes the package need to have tree-sitter-cli
available?
Do the dependencies need to be built as part of the upload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
luarocks-tag-release tries to install the package from the generated rockspec, before trying to upload (which also installs and builds dependencies).
If installing fails, it cancels the upload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay, that makes sense, to make sure what you upload actually works. I also now get what the Tests packaging on PR
comment means. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, I've added the api secret to the repo, should be good to go.
Looks like its there: https://luarocks.org/modules/MeanderingProgrammer/markdown.nvim Added the |
Thanks 🙏 Edit: Just tried it out with rocks.nvim:
works like a charm! |
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 and build instructions - not the user's.
Installing this plugin becomes as simple as
:Rocks install markdown.nvim
.Things done:
See also: this guide
Notes:
Important
neovim
and/orvim
labels have to be added to the luarocks package manually (after the first upload), for this plugin to show up in https://luarocks.org/labels/neovim or https://luarocks.org/labels/vim, respectively.