Compare commits

...

35 commits

Author SHA1 Message Date
github-actions[bot]
202d8e92b3
chore(main): release 11.17.3 (#2077)
Some checks are pending
CI / ci (push) Waiting to run
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
🤖 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)
Some checks failed
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
CI / ci (push) Has been cancelled
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
Some checks failed
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
CI / ci (push) Has been cancelled
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)
Some checks failed
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
CI / ci (push) Has been cancelled
🤖 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
Some checks failed
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
CI / ci (push) Has been cancelled
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
Some checks are pending
CI / ci (push) Waiting to run
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
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
Some checks failed
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
CI / ci (push) Has been cancelled
2025-10-02 23:08:03 +02:00
Folke Lemaitre
a21b7bf2e7
test: LAZY_OFFLINE support for minit
Some checks are pending
CI / ci (push) Waiting to run
Community / community (push) Has been skipped
Docs / docs (push) Has been skipped
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
github-actions[bot]
6c3bda4aca
chore(main): release 11.17.1 (#1927)
🤖 I have created a release *beep* *boop*
---


##
[11.17.1](https://github.com/folke/lazy.nvim/compare/v11.17.0...v11.17.1)
(2025-02-25)


### Bug Fixes

* **bootstrap:** support for older Neovim versions
([1c9ba37](1c9ba37045))
* **meta:** rebuild dirty right after disable. See
[#1889](https://github.com/folke/lazy.nvim/issues/1889)
([d51cf69](d51cf69783))

---
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-02-25 20:19:57 +01:00
Folke Lemaitre
d51cf69783
fix(meta): rebuild dirty right after disable. See #1889 2025-02-25 20:18:25 +01:00
Folke Lemaitre
1c9ba37045
fix(bootstrap): support for older Neovim versions 2025-02-25 20:02:32 +01:00
github-actions[bot]
96a205c8ce
chore(main): release 11.17.0 (#1877)
🤖 I have created a release *beep* *boop*
---


##
[11.17.0](https://github.com/folke/lazy.nvim/compare/v11.16.2...v11.17.0)
(2025-02-24)


### Features

* **config,render:** allow customizing the debug icon
([#1863](https://github.com/folke/lazy.nvim/issues/1863))
([a9c660d](a9c660d6ef))
* **util:** pass lang to `vim.notify` so that snacks notifier can render
the ft. Closes [#1919](https://github.com/folke/lazy.nvim/issues/1919)
([c6a57a3](c6a57a3534))


### Bug Fixes

* **config:** add missing space on the default debug icon
([#1879](https://github.com/folke/lazy.nvim/issues/1879))
([4df5c4d](4df5c4d65a))
* **meta:** disable top-level specs before the rest. Closes
[#1889](https://github.com/folke/lazy.nvim/issues/1889)
([f81a3fb](f81a3fb7fe))
* **ui:** do not show virt_lines for messages
([#1904](https://github.com/folke/lazy.nvim/issues/1904))
([f15a939](f15a93907d))

---
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-02-25 19:14:41 +01:00
Salomon Popp
a8c6db5da7
style(types): add optional return value for LazyKeysSpec rhs (#1924)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

when `expr=true` the rhs function should return a string.

example

```lua
{
    keys = {
        {
            '<leader>j',
            function()
                return require('dial.map').inc_normal()
            end,
            expr = true,
            desc = 'Increment value',
        }
    }
}
```

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-02-24 07:20:35 +01:00
Folke Lemaitre
e5e9bf4821
test: fix tests 2025-02-15 23:09:58 +01:00
Folke Lemaitre
f81a3fb7fe
fix(meta): disable top-level specs before the rest. Closes #1889 2025-02-15 23:06:09 +01:00
github-actions[bot]
ac21a639c7 chore(build): auto-generate rockspec mappings 2025-02-15 07:25:07 +00:00
Folke Lemaitre
c6a57a3534
feat(util): pass lang to vim.notify so that snacks notifier can render the ft. Closes #1919 2025-02-15 08:19:49 +01:00
JINNOUCHI Yasushi
f15a93907d
fix(ui): do not show virt_lines for messages (#1904)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

https://github.com/neovim/neovim/pull/31959 has introduced virtual lines
for showing diagnostics. If this is enabled (default value), messages
from lazy.nvim, such as `update available` are shown as virtual lines in
addition to virtual texts.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

* ***before***
- <img width="592" alt="スクリーンショット 2025-01-27 16 42 27"
src="https://github.com/user-attachments/assets/6994ac84-4862-4532-81ee-80f4015181e5"
/>
* ***after***
- <img width="585" alt="スクリーンショット 2025-01-27 16 42 58"
src="https://github.com/user-attachments/assets/d19f63dc-fb6d-434f-89cf-a0bc49d31c5f"
/>
2025-02-06 07:53:12 +01:00
github-actions[bot]
7527af40dd chore(build): auto-generate rockspec mappings 2025-01-30 19:19:03 +00:00
Folke Lemaitre
5586fda88d
ci: remove debug 2025-01-30 20:14:57 +01:00
Folke Lemaitre
4f30c61b64
ci: check 2025-01-30 20:13:53 +01:00
github-actions[bot]
d8f26efd45 chore(build): auto-generate docs 2025-01-06 20:14:50 +00:00
Eduardo Bray
4df5c4d65a
fix(config): add missing space on the default debug icon (#1879)
## Description

Adds the missing space from a9c660d

## Screenshots

Current:


![imagen](https://github.com/user-attachments/assets/9a3a1a0c-43ad-49f3-8b39-b3250f53ec40)

After:


![imagen](https://github.com/user-attachments/assets/3b3d4dfd-3c03-4db9-8f61-d2bd4f9ed22d)
2025-01-06 21:14:06 +01:00
github-actions[bot]
72aa3a2624 chore(build): auto-generate docs 2025-01-05 05:41:31 +00:00
Shihua Zeng
a9c660d6ef
feat(config,render): allow customizing the debug icon (#1863)
## Description

lazy.nvim allows users to configure all icons except for the debug icon.
This PR enables user to configure the debug icon with `ui.icons.debug`

## Screenshots

Before:


![image](https://github.com/user-attachments/assets/42b02fd9-58e6-4ebc-a1a7-c5e91f07a11a)

After (with config `{ ui = { icons = { debug = ' ' } } }`):


![image](https://github.com/user-attachments/assets/3ade5392-a988-4a10-86fc-f52b41a690c5)
2025-01-05 06:40:44 +01:00
github-actions[bot]
7e6c863bc7
chore(main): release 11.16.2 (#1854)
🤖 I have created a release *beep* *boop*
---


##
[11.16.2](https://github.com/folke/lazy.nvim/compare/v11.16.1...v11.16.2)
(2024-12-13)


### Bug Fixes

* **meta:** when a plugin is both optional and disabled, then just
delete it from the list
([805b85c](805b85c2ea))

---
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>
2024-12-13 19:58:17 +01:00
Folke Lemaitre
805b85c2ea
fix(meta): when a plugin is both optional and disabled, then just delete it from the list 2024-12-13 19:56:52 +01:00
23 changed files with 842 additions and 417 deletions

View file

@ -1,3 +1,3 @@
{
".": "11.16.1"
".": "11.17.3"
}

3
.markdownlint-cli2.yaml Normal file
View file

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

View file

@ -1,5 +1,51 @@
# Changelog
## [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)
### Bug Fixes
* **bootstrap:** support for older Neovim versions ([1c9ba37](https://github.com/folke/lazy.nvim/commit/1c9ba3704564a2e34a22191bb89678680ffeb245))
* **meta:** rebuild dirty right after disable. See [#1889](https://github.com/folke/lazy.nvim/issues/1889) ([d51cf69](https://github.com/folke/lazy.nvim/commit/d51cf6978321d659e68a8bc38ee806bd2517a196))
## [11.17.0](https://github.com/folke/lazy.nvim/compare/v11.16.2...v11.17.0) (2025-02-24)
### Features
* **config,render:** allow customizing the debug icon ([#1863](https://github.com/folke/lazy.nvim/issues/1863)) ([a9c660d](https://github.com/folke/lazy.nvim/commit/a9c660d6ef1b396869d3d951760aa7a3dbfe575f))
* **util:** pass lang to `vim.notify` so that snacks notifier can render the ft. Closes [#1919](https://github.com/folke/lazy.nvim/issues/1919) ([c6a57a3](https://github.com/folke/lazy.nvim/commit/c6a57a3534d3494bcc5ff9b0586e141bdb0280eb))
### Bug Fixes
* **config:** add missing space on the default debug icon ([#1879](https://github.com/folke/lazy.nvim/issues/1879)) ([4df5c4d](https://github.com/folke/lazy.nvim/commit/4df5c4d65a3bbf801edd9ec55fb1ae55cfa72dd0))
* **meta:** disable top-level specs before the rest. Closes [#1889](https://github.com/folke/lazy.nvim/issues/1889) ([f81a3fb](https://github.com/folke/lazy.nvim/commit/f81a3fb7feaf460ec7c8c983682b4a693b18fdd4))
* **ui:** do not show virt_lines for messages ([#1904](https://github.com/folke/lazy.nvim/issues/1904)) ([f15a939](https://github.com/folke/lazy.nvim/commit/f15a93907ddad3d9139aea465ae18336d87f5ce6))
## [11.16.2](https://github.com/folke/lazy.nvim/compare/v11.16.1...v11.16.2) (2024-12-13)
### Bug Fixes
* **meta:** when a plugin is both optional and disabled, then just delete it from the list ([805b85c](https://github.com/folke/lazy.nvim/commit/805b85c2ea3bd6f9506ef22cbd6e3a39172b5b08))
## [11.16.1](https://github.com/folke/lazy.nvim/compare/v11.16.0...v11.16.1) (2024-12-09)

View file

@ -6,6 +6,7 @@
local M = {}
function M.setup()
local uv = vim.uv or vim.loop
if vim.env.LAZY_STDPATH then
local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
@ -13,12 +14,12 @@ function M.setup()
end
end
if vim.env.LAZY_PATH and not vim.uv.fs_stat(vim.env.LAZY_PATH) then
if vim.env.LAZY_PATH and not uv.fs_stat(vim.env.LAZY_PATH) then
vim.env.LAZY_PATH = nil
end
local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.env.LAZY_PATH and not (vim.uv or vim.loop).fs_stat(lazypath) then
if not vim.env.LAZY_PATH and not uv.fs_stat(lazypath) then
vim.api.nvim_echo({
{
"Cloning lazy.nvim\n\n",

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
@ -706,6 +706,7 @@ will be added to the plugins spec.
icons = {
cmd = " ",
config = "",
debug = "● ",
event = " ",
favorite = " ",
ft = " ",

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
@ -96,6 +96,7 @@ M.defaults = {
icons = {
cmd = "",
config = "",
debug = "",
event = "",
favorite = "",
ft = "",
@ -241,7 +242,7 @@ function M.hererocks()
return M.options.rocks.hererocks
end
M.version = "11.16.1" -- x-release-please-version
M.version = "11.17.3" -- x-release-please-version
M.ns = vim.api.nvim_create_namespace("lazy")

View file

@ -11,7 +11,7 @@ local Util = require("lazy.core.util")
---@class LazyKeysSpec: LazyKeysBase
---@field [1] string lhs
---@field [2]? string|fun()|false rhs
---@field [2]? string|fun():string?|false rhs
---@field mode? string|string[]
---@class LazyKeys: LazyKeysBase

View file

@ -179,6 +179,7 @@ function M:_rebuild(name)
local super = nil
plugin.url = nil
plugin._.dep = true
plugin._.top = true
plugin.optional = true
assert(#plugin._.frags > 0, "no fragments found for plugin " .. name)
@ -195,6 +196,7 @@ function M:_rebuild(name)
plugin._.dep = plugin._.dep and fragment.dep
plugin.optional = plugin.optional and (rawget(fragment.spec, "optional") == true)
plugin.url = fragment.url or plugin.url
plugin._.top = plugin._.top and fragment.pid == nil
-- dependencies
for _, dep in ipairs(fragment.deps or {}) do
@ -302,13 +304,26 @@ end
--- Removes plugins that are disabled.
function M:fix_disabled()
local changes = 0
for _, plugin in pairs(self.plugins) do
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
changes = changes + 1
self:disable(plugin)
local function check(top)
for _, plugin in pairs(self.plugins) do
if (plugin._.top or false) == top then
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
changes = changes + 1
if plugin.optional then
self:del(plugin.name)
else
self:disable(plugin)
end
self:rebuild()
end
end
end
end
self:rebuild()
-- disable top-level plugins first, since they may have non-top-level frags
-- that disable other plugins
check(true)
-- then disable non-top-level plugins
check(false)
return changes
end

View file

@ -240,7 +240,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

@ -374,6 +374,7 @@ function M.notify(msg, opts)
local lang = opts.lang or "markdown"
local n = opts.once and vim.notify_once or vim.notify
n(msg, opts.level or vim.log.levels.INFO, {
ft = lang,
on_open = function(win)
local ok = pcall(function()
vim.treesitter.language.add("markdown")

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

@ -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

@ -10,6 +10,7 @@
---@field dirty? boolean
---@field build? boolean
---@field frags? number[]
---@field top? boolean
---@field handlers? LazyPluginHandlers
---@field installed? boolean
---@field is_local? boolean

View file

@ -94,7 +94,7 @@ function M:update()
diag.lnum = diag.row - 1
return diag
end, self._diagnostics),
{ signs = false, virtual_text = true, underline = false }
{ signs = false, virtual_text = true, underline = false, virtual_lines = false }
)
end
@ -759,7 +759,7 @@ function M:debug()
---@type string[]
plugins = vim.tbl_values(plugins)
table.sort(plugins)
self:append("", "LazySpecial", { indent = 2 })
self:append(Config.options.ui.icons.debug, "LazySpecial", { indent = 2 })
if handler_type == "keys" then
for k, v in pairs(Config.plugins[plugins[1]]._.handlers.keys) do
if k == value then

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

@ -25,6 +25,7 @@ local function clean(plugins)
if plugin._.dep == false then
plugin._.dep = nil
end
plugin._.top = nil
return plugin
end, plugins)
end

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