Skip to content

Commit

Permalink
Merge pull request #185 from kevinm6/master
Browse files Browse the repository at this point in the history
feat: add rockspec to avoid needs of extra plugins on Lazy >= v11
  • Loading branch information
3rd committed Jun 27, 2024
2 parents bdd5506 + 94319cd commit 7d021c9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
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 = {},
}

0 comments on commit 7d021c9

Please sign in to comment.