Compare commits

...

24 Commits

Author SHA1 Message Date
github-actions[bot] 306a05526a chore(build): auto-generate rockspec mappings 2025-12-17 11:32:42 +00:00
dependabot[bot] 073727e794 build(deps): bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 12:30:26 +01:00
dependabot[bot] 0f7c7982f0 build(deps): bump stefanzweifel/git-auto-commit-action from 5 to 7
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 7.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v7)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 12:30:09 +01:00
dependabot[bot] 7930f2d06e build(deps): bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 12:29:02 +01:00
github-actions[bot] 85c7ff3711
chore(main): release 11.17.5 (#2087)
🤖 I have created a release *beep* *boop*
---


##
[11.17.5](https://github.com/folke/lazy.nvim/compare/v11.17.4...v11.17.5)
(2025-11-06)


### Bug Fixes

* **luarocks:** proper parsing of dependency name. Closes
[#2086](https://github.com/folke/lazy.nvim/issues/2086)
([5c09e6f](5c09e6fe71))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-06 10:26:21 +01:00
Folke Lemaitre 5c09e6fe71
fix(luarocks): proper parsing of dependency name. Closes #2086 2025-11-06 10:24:31 +01:00
github-actions[bot] e6a8824858
chore(main): release 11.17.4 (#2082)
🤖 I have created a release *beep* *boop*
---


##
[11.17.4](https://github.com/folke/lazy.nvim/compare/v11.17.3...v11.17.4)
(2025-11-04)


### Bug Fixes

* **plugin:** proper error message when a plugin spec returns more than
one value.
([dfdc85e](dfdc85e189))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-04 15:24:21 +01:00
Folke Lemaitre dfdc85e189
fix(plugin): proper error message when a plugin spec returns more than one value. 2025-11-04 15:22:26 +01:00
github-actions[bot] 202d8e92b3
chore(main): release 11.17.3 (#2077)
🤖 I have created a release *beep* *boop*
---


##
[11.17.3](https://github.com/folke/lazy.nvim/compare/v11.17.2...v11.17.3)
(2025-10-28)


### Bug Fixes

* **luarocks:** update to lumen-oss for binaries. Closes
[#2060](https://github.com/folke/lazy.nvim/issues/2060). Closes
[#2059](https://github.com/folke/lazy.nvim/issues/2059)
([e31789c](e31789c675))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-03 07:59:47 +01:00
github-actions[bot] f0f5bbb9e5
chore(update): update repository (#2079)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action

Co-authored-by: folke <292349+folke@users.noreply.github.com>
2025-10-28 16:14:18 +01:00
github-actions[bot] ed4dc336a7 chore(build): auto-generate docs 2025-10-26 14:15:13 +00:00
Folke Lemaitre e31789c675
fix(luarocks): update to lumen-oss for binaries. Closes #2060. Closes #2059 2025-10-26 15:14:18 +01:00
github-actions[bot] 5b15bc9f49 chore(build): auto-generate rockspec mappings 2025-10-26 13:59:51 +00:00
Folke Lemaitre 3c86e23658
ci: fixed luarocks manifest loading. It's now bigger than 65k entries and luajit doesn't want to load it anymore 2025-10-26 14:55:43 +01:00
github-actions[bot] db067881ff
chore(main): release 11.17.2 (#2064)
🤖 I have created a release *beep* *boop*
---


##
[11.17.2](https://github.com/folke/lazy.nvim/compare/v11.17.1...v11.17.2)
(2025-10-23)


### Bug Fixes

* **luarocks:** add plugin to lua path if it was already loaded before
we know its a luarock
([147f5a3](147f5a3f55))
* **plugin:** check that path is actually in root dir. Closes
[#2075](https://github.com/folke/lazy.nvim/issues/2075)
([16e5271](16e52715b7))
* **stats:** better support for different `time_t` sizes. See
[#2049](https://github.com/folke/lazy.nvim/issues/2049)
([1ea3c40](1ea3c40857))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-23 11:49:16 +02:00
Folke Lemaitre 16e52715b7
fix(plugin): check that path is actually in root dir. Closes #2075 2025-10-23 07:04:43 +02:00
Folke Lemaitre 1ea3c40857
fix(stats): better support for different `time_t` sizes. See #2049 2025-10-09 10:44:19 +02:00
Folke Lemaitre 9f559d0e9d
build: exclude stylua ignore comments from readme 2025-10-09 10:41:06 +02:00
Folke Lemaitre 4ded3ff73b
test: `--offline` for minit 2025-10-08 21:26:55 +02:00
Folke Lemaitre 46e59d838f
ci: update test scripts 2025-10-08 21:26:18 +02:00
Folke Lemaitre 59334064f8
test(minit): added support for passing tests to run to mini.test 2025-10-02 23:08:03 +02:00
Folke Lemaitre a21b7bf2e7
test: LAZY_OFFLINE support for minit 2025-10-02 18:41:41 +02:00
github-actions[bot] a1380a8461 chore(build): auto-generate rockspec mappings 2025-10-02 12:50:53 +00:00
Folke Lemaitre 147f5a3f55
fix(luarocks): add plugin to lua path if it was already loaded before we know its a luarock 2025-10-02 14:50:37 +02:00
19 changed files with 886 additions and 411 deletions

View File

@ -1,3 +1,3 @@
{
".": "11.17.1"
".": "11.17.5"
}

View File

@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: folke/github/neovim@main
- name: Rockspec Build
id: rockspec-build
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: build
key: rockspec-build
@ -22,7 +22,7 @@ jobs:
run: |
nvim -l lua/lazy/build.lua
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "chore(build): auto-generate rockspec mappings"
commit_user_name: "github-actions[bot]"

View File

@ -11,7 +11,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: docs
- name: Generate Docs

3
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,3 @@
config:
MD013: false
MD033: false

View File

@ -1,5 +1,35 @@
# Changelog
## [11.17.5](https://github.com/folke/lazy.nvim/compare/v11.17.4...v11.17.5) (2025-11-06)
### Bug Fixes
* **luarocks:** proper parsing of dependency name. Closes [#2086](https://github.com/folke/lazy.nvim/issues/2086) ([5c09e6f](https://github.com/folke/lazy.nvim/commit/5c09e6fe71f4bb930eeffe24d45762fa3ffada4e))
## [11.17.4](https://github.com/folke/lazy.nvim/compare/v11.17.3...v11.17.4) (2025-11-04)
### Bug Fixes
* **plugin:** proper error message when a plugin spec returns more than one value. ([dfdc85e](https://github.com/folke/lazy.nvim/commit/dfdc85e18930a3f1643e83c8ed0c514ca85e49fa))
## [11.17.3](https://github.com/folke/lazy.nvim/compare/v11.17.2...v11.17.3) (2025-10-28)
### Bug Fixes
* **luarocks:** update to lumen-oss for binaries. Closes [#2060](https://github.com/folke/lazy.nvim/issues/2060). Closes [#2059](https://github.com/folke/lazy.nvim/issues/2059) ([e31789c](https://github.com/folke/lazy.nvim/commit/e31789c675e2f591a20fc894b6713398eaa5dddd))
## [11.17.2](https://github.com/folke/lazy.nvim/compare/v11.17.1...v11.17.2) (2025-10-23)
### Bug Fixes
* **luarocks:** add plugin to lua path if it was already loaded before we know its a luarock ([147f5a3](https://github.com/folke/lazy.nvim/commit/147f5a3f55b5491bbc77a55ce846ef5eb575fa42))
* **plugin:** check that path is actually in root dir. Closes [#2075](https://github.com/folke/lazy.nvim/issues/2075) ([16e5271](https://github.com/folke/lazy.nvim/commit/16e52715b70b4d0fc6af3563ccc0ed9df82ae23e))
* **stats:** better support for different `time_t` sizes. See [#2049](https://github.com/folke/lazy.nvim/issues/2049) ([1ea3c40](https://github.com/folke/lazy.nvim/commit/1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1))
## [11.17.1](https://github.com/folke/lazy.nvim/compare/v11.17.0...v11.17.1) (2025-02-25)

View File

@ -669,7 +669,7 @@ will be added to the plugins spec.
rocks = {
enabled = true,
root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/",
server = "https://lumen-oss.github.io/rocks-binaries/",
-- use hererocks to install luarocks?
-- set to `nil` to use hererocks when luarocks is not found
-- set to `true` to always use hererocks

View File

@ -6,6 +6,7 @@ local Util = require("lazy.util")
local M = {}
M.patterns = { "nvim", "treesitter", "tree-sitter", "cmp", "neo" }
local manifest_file = "build/manifest.lua"
function M.fetch(url, file, prefix)
if not vim.uv.fs_stat(file) then
@ -19,11 +20,46 @@ function M.fetch(url, file, prefix)
end
end
function M.split()
local lines = vim.fn.readfile(manifest_file)
local id = 0
local files = {} ---@type string[]
while #lines > 0 do
id = id + 1
local part_file = "build/manifest-part-" .. id .. ".lua"
local idx = math.min(#lines, 30000)
while idx < #lines and not lines[idx]:match("^ },$") do
idx = idx + 1
end
local part_lines = vim.list_slice(lines, 1, idx)
if idx ~= #lines then
part_lines[#part_lines] = " }}"
end
vim.fn.writefile(part_lines, part_file)
files[#files + 1] = part_file
print("Wrote " .. part_file .. "\n")
lines = vim.list_slice(lines, idx + 1)
if #lines == 0 then
break
end
lines[1] = "repository = { " .. lines[1]
end
return files
end
---@return RockManifest?
function M.fetch_manifest()
local manifest_file = "build/manifest.lua"
M.fetch("https://luarocks.org/manifest-5.1", manifest_file)
return Rocks.parse(manifest_file)
local ret = { repository = {} }
for _, file in ipairs(M.split()) do
local part = Rocks.parse(file)
print(vim.tbl_count(part.repository or {}) .. " rocks in " .. file .. "\n")
for k, v in pairs(part.repository or {}) do
ret.repository[k] = v
end
end
return ret
end
function M.fetch_rockspec(name, version, prefix)
@ -37,6 +73,7 @@ function M.build()
local manifest = M.fetch_manifest() or {}
---@type {name:string, version:string, url:string}[]
local nvim_rocks = {}
print(vim.tbl_count(manifest.repository or {}) .. " rocks in manifest\n")
for rock, vv in pairs(manifest.repository or {}) do
local matches = false
for _, pattern in ipairs(M.patterns) do

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ M.defaults = {
rocks = {
enabled = true,
root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/",
server = "https://lumen-oss.github.io/rocks-binaries/",
-- use hererocks to install luarocks?
-- set to `nil` to use hererocks when luarocks is not found
-- set to `true` to always use hererocks
@ -242,7 +242,7 @@ function M.hererocks()
return M.options.rocks.hererocks
end
M.version = "11.17.1" -- x-release-please-version
M.version = "11.17.5" -- x-release-please-version
M.ns = vim.api.nvim_create_namespace("lazy")

View File

@ -156,7 +156,11 @@ function Spec:import(spec)
load = function()
local mod, err = loadfile(modpath)
if mod then
return mod()
local ret, foo = mod()
if foo then
return nil, "Spec module returned more than one value. Expected a single value."
end
return ret
else
return nil, err
end
@ -240,7 +244,7 @@ function M.update_state()
if plugin.virtual then
plugin._.is_local = true
plugin._.installed = true -- local plugins are managed by the user
elseif plugin.dir:find(Config.options.root, 1, true) == 1 then
elseif plugin.dir:find(Config.options.root .. "/", 1, true) == 1 then
plugin._.installed = installed[plugin.name] ~= nil
installed[plugin.name] = nil
else

View File

@ -61,7 +61,11 @@ end
---@return string
function M.extract(file, pattern)
local init = Util.read_file(file)
return assert(init:match(pattern))
local ret = assert(init:match(pattern)) --[[@as string]]
local lines = vim.tbl_filter(function(line)
return not line:find("^%s*%-%-%s*stylua%s*:%s*ignore%s*$")
end, vim.split(ret, "\n"))
return table.concat(lines, "\n")
end
---@return ReadmeBlock

View File

@ -25,7 +25,7 @@ M.clean = {
run = function(self, opts)
opts = opts or {}
local dir = self.plugin.dir:gsub("/+$", "")
assert(dir:find(Config.options.root, 1, true) == 1, self.plugin.dir .. " should be under packpath!")
assert(dir:find(Config.options.root .. "/", 1, true) == 1, self.plugin.dir .. " should be under packpath!")
local rock_root = Config.options.rocks.root .. "/" .. self.plugin.name
if vim.uv.fs_stat(rock_root) then

View File

@ -33,11 +33,14 @@ function M.setup(opts)
local args = {}
local is_busted = false
local is_minitest = false
local offline = vim.env.LAZY_OFFLINE == "1" or vim.env.LAZY_OFFLINE == "true"
for _, a in ipairs(_G.arg) do
if a == "--busted" then
is_busted = true
elseif a == "--minitest" then
is_minitest = true
elseif a == "--offline" then
offline = true
else
table.insert(args, a)
end
@ -62,7 +65,9 @@ function M.setup(opts)
if vim.g.colors_name == nil then
vim.cmd("colorscheme habamax")
end
require("lazy").update():wait()
if not offline then
require("lazy").update():wait()
end
if vim.bo.filetype == "lazy" then
local errors = false
for _, plugin in pairs(require("lazy.core.config").spec.plugins) do
@ -150,7 +155,7 @@ function M.minitest.setup(opts)
opts = {
collect = {
find_files = function()
return vim.fn.globpath("tests", "**/*_spec.lua", true, true)
return #_G.arg > 0 and _G.arg or vim.fn.globpath("tests", "**/*_spec.lua", true, true)
end,
},
-- script_path = "tests/minit.lua",

View File

@ -63,6 +63,9 @@ function M.update()
pkg.spec = { _raw = spec.code }
end
table.insert(ret.pkgs, pkg)
if not plugin._.pkg and plugin._.loaded and pkg.source == "rockspec" then
require("lazy.core.loader").add_to_luapath(plugin)
end
break
end
end

View File

@ -285,7 +285,10 @@ function M.get(plugin)
---@param dep string
local rocks = vim.tbl_filter(function(dep)
local name = dep:gsub("%s.*", "")
local name = dep:match("^%s*([^~><=%s]+)")
if not name then
return false
end
local url = Community.get_url(name)
local spec = Community.get_spec(name)

View File

@ -35,11 +35,10 @@ function M.cputime()
if M.C == nil then
pcall(function()
ffi.cdef([[
typedef long time_t;
typedef int clockid_t;
typedef struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
int64_t tv_sec; /* Use fixed 64-bit type for portability */
long tv_nsec; /* nanoseconds */
} nanotime;
int clock_gettime(clockid_t clk_id, struct timespec *tp);
]])
@ -48,7 +47,8 @@ function M.cputime()
end
local function real()
local pnano = assert(ffi.new("nanotime[?]", 1))
-- Zero-initialize to handle 32-bit systems where only lower 32 bits are written
local pnano = ffi.new("nanotime[1]")
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
return tonumber(pnano[0].tv_sec) * 1e3 + tonumber(pnano[0].tv_nsec) / 1e6

View File

@ -1,3 +1,3 @@
#!/bin/env bash
#!/usr/bin/env bash
nvim -l tests/minit.lua --minitest
nvim -l tests/minit.lua --minitest "$@"

View File

@ -1,21 +0,0 @@
[selene]
base = "lua51"
name = "vim"
[vim]
any = true
[jit]
any = true
[assert]
any = true
[describe]
any = true
[it]
any = true
[before_each.args]
any = true

19
vim.yml Normal file
View File

@ -0,0 +1,19 @@
base: lua51
lua_versions:
- luajit
globals:
Snacks:
any: true
vim:
any: true
jit:
any: true
assert:
any: true
describe:
any: true
it:
any: true
before_each:
any: true