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: added support for packages [WIP] #1530

Merged
merged 26 commits into from
Jun 24, 2024
Merged

feat: added support for packages [WIP] #1530

merged 26 commits into from
Jun 24, 2024

Conversation

folke
Copy link
Owner

@folke folke commented Jun 18, 2024

Lazy now automatically resolves specs from:

  • a plugin's lazy.lua file
  • a plugin's rockspec
  • a plugin's packspec (experimental, since the format is not quite there yet)

This PR also includes a big rewrite of how a final spec is resolved based on a plugin's spec fragments.
Should be a tiny bit faster, but more importantly, fixes some issues and is easier to maintain.

New docs website at https://lazy.folke.io/

Closes

Supersedes

Example

neorg's rockspec is automatically used to install deps

{
    "nvim-neorg/neorg",
    build = false, -- disable the build script that currently uses luarocks.nvim
    opts = {},
  }

@folke folke marked this pull request as draft June 18, 2024 19:57
This was referenced Jun 18, 2024
Copy link
Contributor

@max397574 max397574 left a comment

Choose a reason for hiding this comment

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

really excited about this since it will definitely allow simplifying dependency management a lot

lua/lazy/core/config.lua Show resolved Hide resolved
lua/lazy/manage/rocks.lua Outdated Show resolved Hide resolved
lua/lazy/core/config.lua Outdated Show resolved Hide resolved
@folke folke marked this pull request as ready for review June 23, 2024 19:08
@folke folke merged commit eb26e95 into main Jun 24, 2024
@max397574
Copy link
Contributor

max397574 commented Jun 24, 2024

trying this out rn
atm I think it's just used for neorg and neocomplete (a personal project of mine)
on startup lazy always tries to install things, flickers around for a bit and then shows an Too many rounds of missing plugins error
anything I can do to debug this?

@folke
Copy link
Owner Author

folke commented Jun 24, 2024

That's probably because you have a custom build step for those plugins.
This means the luarocks build won't run and will keep trying to build again.
Can you confirm this is what happens?

@max397574
Copy link
Contributor

set build to false explicitly

@folke
Copy link
Owner Author

folke commented Jun 24, 2024

You should remove that build = false. I've also just updated lazy to no longer trigger those new rounds

@max397574
Copy link
Contributor

seems to work now
just one last thing which is related to this
would be really nice if rocks would show up in :Lazy overview
should I open a separate feature request for this?

@folke
Copy link
Owner Author

folke commented Jun 24, 2024

Only plugins or things that are defined in your specs show up in :Lazy right now.
A plugin that has a rockspec, has a separate rockspec tree with its dependencies.
I'll see if I can add rocks to the details of a plugin

@mrcjkb
Copy link
Contributor

mrcjkb commented Jun 24, 2024

There's a luarocks --tree <tree> list --porcelain command that might be useful for that.

@folke
Copy link
Owner Author

folke commented Jun 24, 2024

Added:

image

@vhyrro
Copy link

vhyrro commented Jun 24, 2024

Tysm for all the work done here! This will make things endlessly more convenient for Neorg now :)

kevinm6 added a commit to kevinm6/image.nvim that referenced this pull request Jun 25, 2024
- since [Lazy v11](folke/lazy.nvim#1530)
supports rockspec is no longer required extra plugin like
`vhyrro/luarocks.nvim` to install rocks and use them into Neovim
kevinm6 added a commit to kevinm6/image.nvim that referenced this pull request Jun 25, 2024
- since [Lazy v11](folke/lazy.nvim#1530)
supports rockspec is no longer required extra plugin like
`vhyrro/luarocks.nvim` to install rocks and use them into Neovim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants