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: add rockspec to avoid needs of extra plugins on Lazy >= v11 #185

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ Fully **optional:**

<summary>Lazy.nvim</summary>

> Since version v11.* of Lazy rockspec is supported, so no need of extra plugins `vhyrro/luarocks.nvim`

<details>
<summary><b>Lazy >= v11.*</b></summary>

```lua
{
"3rd/image.nvim",
config = function()
-- ...
end
}
```
</details>

<details>
<summary><b>Lazy < v11.x</b></summary>

**NOTE:** Don't forget to install the imageMagick system package, detailed [below](#installing-imagemagick)

It's recommended that you use [vhyrro/luarocks.nvim](https://github.com/vhyrro/luarocks.nvim) to
Expand All @@ -62,6 +80,7 @@ install luarocks for neovim while using lazy. But you can install manually as we
end
}
```
</details>

---

Expand Down
37 changes: 37 additions & 0 deletions image.nvim-scm-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local modrev, specrev = "scm", "-1"

local repo_url = "https://github.com/kevinm6/image.nvim"
local git_ref = "59d35492342f4afd74d74961cb9aafdb7caf29b9"

rockspec_format = "3.0"
package = "image.nvim"
version = modrev .. specrev

description = {
summary = "🖼️ Bringing images to Neovim.",
detailed = "",
labels = { "neovim", "neovim-plugin" },
homepage = repo_url,
license = "MIT",
}

dependencies = {
"lua >= 5.1",
"magick",
}

source = {
url = repo_url .. "/archive/" .. git_ref .. ".zip",
dir = "image.nvim-" .. "59d35492342f4afd74d74961cb9aafdb7caf29b9",
}

if modrev == "scm" or modrev == "dev" then source = {
url = repo_url:gsub("https", "git"),
} end

test_dependencies = {}

build = {
type = "builtin",
copy_directories = {},
}
Loading