Compare commits
No commits in common. "main" and "v11.16.2" have entirely different histories.
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
".": "11.17.5"
|
".": "11.16.2"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
|
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: folke/github/neovim@main
|
- uses: folke/github/neovim@main
|
||||||
- name: Rockspec Build
|
- name: Rockspec Build
|
||||||
id: rockspec-build
|
id: rockspec-build
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: rockspec-build
|
key: rockspec-build
|
||||||
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
nvim -l lua/lazy/build.lua
|
nvim -l lua/lazy/build.lua
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v7
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "chore(build): auto-generate rockspec mappings"
|
commit_message: "chore(build): auto-generate rockspec mappings"
|
||||||
commit_user_name: "github-actions[bot]"
|
commit_user_name: "github-actions[bot]"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: docs
|
ref: docs
|
||||||
- name: Generate Docs
|
- name: Generate Docs
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
config:
|
|
||||||
MD013: false
|
|
||||||
MD033: false
|
|
||||||
53
CHANGELOG.md
53
CHANGELOG.md
|
|
@ -1,58 +1,5 @@
|
||||||
# Changelog
|
# 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)
|
|
||||||
|
|
||||||
|
|
||||||
### 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)
|
## [11.16.2](https://github.com/folke/lazy.nvim/compare/v11.16.1...v11.16.2) (2024-12-13)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
local uv = vim.uv or vim.loop
|
|
||||||
if vim.env.LAZY_STDPATH then
|
if vim.env.LAZY_STDPATH then
|
||||||
local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "")
|
local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "")
|
||||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||||
|
|
@ -14,12 +13,12 @@ function M.setup()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.env.LAZY_PATH and not uv.fs_stat(vim.env.LAZY_PATH) then
|
if vim.env.LAZY_PATH and not vim.uv.fs_stat(vim.env.LAZY_PATH) then
|
||||||
vim.env.LAZY_PATH = nil
|
vim.env.LAZY_PATH = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.env.LAZY_PATH and not uv.fs_stat(lazypath) then
|
if not vim.env.LAZY_PATH and not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{
|
{
|
||||||
"Cloning lazy.nvim\n\n",
|
"Cloning lazy.nvim\n\n",
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,7 @@ will be added to the plugin’s spec.
|
||||||
rocks = {
|
rocks = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
root = vim.fn.stdpath("data") .. "/lazy-rocks",
|
root = vim.fn.stdpath("data") .. "/lazy-rocks",
|
||||||
server = "https://lumen-oss.github.io/rocks-binaries/",
|
server = "https://nvim-neorocks.github.io/rocks-binaries/",
|
||||||
-- use hererocks to install luarocks?
|
-- use hererocks to install luarocks?
|
||||||
-- set to `nil` to use hererocks when luarocks is not found
|
-- set to `nil` to use hererocks when luarocks is not found
|
||||||
-- set to `true` to always use hererocks
|
-- set to `true` to always use hererocks
|
||||||
|
|
@ -706,7 +706,6 @@ will be added to the plugin’s spec.
|
||||||
icons = {
|
icons = {
|
||||||
cmd = " ",
|
cmd = " ",
|
||||||
config = "",
|
config = "",
|
||||||
debug = "● ",
|
|
||||||
event = " ",
|
event = " ",
|
||||||
favorite = " ",
|
favorite = " ",
|
||||||
ft = " ",
|
ft = " ",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ local Util = require("lazy.util")
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.patterns = { "nvim", "treesitter", "tree-sitter", "cmp", "neo" }
|
M.patterns = { "nvim", "treesitter", "tree-sitter", "cmp", "neo" }
|
||||||
local manifest_file = "build/manifest.lua"
|
|
||||||
|
|
||||||
function M.fetch(url, file, prefix)
|
function M.fetch(url, file, prefix)
|
||||||
if not vim.uv.fs_stat(file) then
|
if not vim.uv.fs_stat(file) then
|
||||||
|
|
@ -20,46 +19,11 @@ function M.fetch(url, file, prefix)
|
||||||
end
|
end
|
||||||
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?
|
---@return RockManifest?
|
||||||
function M.fetch_manifest()
|
function M.fetch_manifest()
|
||||||
|
local manifest_file = "build/manifest.lua"
|
||||||
M.fetch("https://luarocks.org/manifest-5.1", manifest_file)
|
M.fetch("https://luarocks.org/manifest-5.1", manifest_file)
|
||||||
local ret = { repository = {} }
|
return Rocks.parse(manifest_file)
|
||||||
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
|
end
|
||||||
|
|
||||||
function M.fetch_rockspec(name, version, prefix)
|
function M.fetch_rockspec(name, version, prefix)
|
||||||
|
|
@ -73,7 +37,6 @@ function M.build()
|
||||||
local manifest = M.fetch_manifest() or {}
|
local manifest = M.fetch_manifest() or {}
|
||||||
---@type {name:string, version:string, url:string}[]
|
---@type {name:string, version:string, url:string}[]
|
||||||
local nvim_rocks = {}
|
local nvim_rocks = {}
|
||||||
print(vim.tbl_count(manifest.repository or {}) .. " rocks in manifest\n")
|
|
||||||
for rock, vv in pairs(manifest.repository or {}) do
|
for rock, vv in pairs(manifest.repository or {}) do
|
||||||
local matches = false
|
local matches = false
|
||||||
for _, pattern in ipairs(M.patterns) do
|
for _, pattern in ipairs(M.patterns) do
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -59,7 +59,7 @@ M.defaults = {
|
||||||
rocks = {
|
rocks = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
root = vim.fn.stdpath("data") .. "/lazy-rocks",
|
root = vim.fn.stdpath("data") .. "/lazy-rocks",
|
||||||
server = "https://lumen-oss.github.io/rocks-binaries/",
|
server = "https://nvim-neorocks.github.io/rocks-binaries/",
|
||||||
-- use hererocks to install luarocks?
|
-- use hererocks to install luarocks?
|
||||||
-- set to `nil` to use hererocks when luarocks is not found
|
-- set to `nil` to use hererocks when luarocks is not found
|
||||||
-- set to `true` to always use hererocks
|
-- set to `true` to always use hererocks
|
||||||
|
|
@ -96,7 +96,6 @@ M.defaults = {
|
||||||
icons = {
|
icons = {
|
||||||
cmd = " ",
|
cmd = " ",
|
||||||
config = "",
|
config = "",
|
||||||
debug = "● ",
|
|
||||||
event = " ",
|
event = " ",
|
||||||
favorite = " ",
|
favorite = " ",
|
||||||
ft = " ",
|
ft = " ",
|
||||||
|
|
@ -242,7 +241,7 @@ function M.hererocks()
|
||||||
return M.options.rocks.hererocks
|
return M.options.rocks.hererocks
|
||||||
end
|
end
|
||||||
|
|
||||||
M.version = "11.17.5" -- x-release-please-version
|
M.version = "11.16.2" -- x-release-please-version
|
||||||
|
|
||||||
M.ns = vim.api.nvim_create_namespace("lazy")
|
M.ns = vim.api.nvim_create_namespace("lazy")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ local Util = require("lazy.core.util")
|
||||||
|
|
||||||
---@class LazyKeysSpec: LazyKeysBase
|
---@class LazyKeysSpec: LazyKeysBase
|
||||||
---@field [1] string lhs
|
---@field [1] string lhs
|
||||||
---@field [2]? string|fun():string?|false rhs
|
---@field [2]? string|fun()|false rhs
|
||||||
---@field mode? string|string[]
|
---@field mode? string|string[]
|
||||||
|
|
||||||
---@class LazyKeys: LazyKeysBase
|
---@class LazyKeys: LazyKeysBase
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,6 @@ function M:_rebuild(name)
|
||||||
local super = nil
|
local super = nil
|
||||||
plugin.url = nil
|
plugin.url = nil
|
||||||
plugin._.dep = true
|
plugin._.dep = true
|
||||||
plugin._.top = true
|
|
||||||
plugin.optional = true
|
plugin.optional = true
|
||||||
|
|
||||||
assert(#plugin._.frags > 0, "no fragments found for plugin " .. name)
|
assert(#plugin._.frags > 0, "no fragments found for plugin " .. name)
|
||||||
|
|
@ -196,7 +195,6 @@ function M:_rebuild(name)
|
||||||
plugin._.dep = plugin._.dep and fragment.dep
|
plugin._.dep = plugin._.dep and fragment.dep
|
||||||
plugin.optional = plugin.optional and (rawget(fragment.spec, "optional") == true)
|
plugin.optional = plugin.optional and (rawget(fragment.spec, "optional") == true)
|
||||||
plugin.url = fragment.url or plugin.url
|
plugin.url = fragment.url or plugin.url
|
||||||
plugin._.top = plugin._.top and fragment.pid == nil
|
|
||||||
|
|
||||||
-- dependencies
|
-- dependencies
|
||||||
for _, dep in ipairs(fragment.deps or {}) do
|
for _, dep in ipairs(fragment.deps or {}) do
|
||||||
|
|
@ -304,9 +302,7 @@ end
|
||||||
--- Removes plugins that are disabled.
|
--- Removes plugins that are disabled.
|
||||||
function M:fix_disabled()
|
function M:fix_disabled()
|
||||||
local changes = 0
|
local changes = 0
|
||||||
local function check(top)
|
|
||||||
for _, plugin in pairs(self.plugins) do
|
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
|
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
|
||||||
changes = changes + 1
|
changes = changes + 1
|
||||||
if plugin.optional then
|
if plugin.optional then
|
||||||
|
|
@ -314,16 +310,9 @@ function M:fix_disabled()
|
||||||
else
|
else
|
||||||
self:disable(plugin)
|
self:disable(plugin)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
self:rebuild()
|
self:rebuild()
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- 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
|
return changes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,11 +156,7 @@ function Spec:import(spec)
|
||||||
load = function()
|
load = function()
|
||||||
local mod, err = loadfile(modpath)
|
local mod, err = loadfile(modpath)
|
||||||
if mod then
|
if mod then
|
||||||
local ret, foo = mod()
|
return mod()
|
||||||
if foo then
|
|
||||||
return nil, "Spec module returned more than one value. Expected a single value."
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
else
|
else
|
||||||
return nil, err
|
return nil, err
|
||||||
end
|
end
|
||||||
|
|
@ -244,7 +240,7 @@ function M.update_state()
|
||||||
if plugin.virtual then
|
if plugin.virtual then
|
||||||
plugin._.is_local = true
|
plugin._.is_local = true
|
||||||
plugin._.installed = true -- local plugins are managed by the user
|
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
|
plugin._.installed = installed[plugin.name] ~= nil
|
||||||
installed[plugin.name] = nil
|
installed[plugin.name] = nil
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,6 @@ function M.notify(msg, opts)
|
||||||
local lang = opts.lang or "markdown"
|
local lang = opts.lang or "markdown"
|
||||||
local n = opts.once and vim.notify_once or vim.notify
|
local n = opts.once and vim.notify_once or vim.notify
|
||||||
n(msg, opts.level or vim.log.levels.INFO, {
|
n(msg, opts.level or vim.log.levels.INFO, {
|
||||||
ft = lang,
|
|
||||||
on_open = function(win)
|
on_open = function(win)
|
||||||
local ok = pcall(function()
|
local ok = pcall(function()
|
||||||
vim.treesitter.language.add("markdown")
|
vim.treesitter.language.add("markdown")
|
||||||
|
|
|
||||||
|
|
@ -61,11 +61,7 @@ end
|
||||||
---@return string
|
---@return string
|
||||||
function M.extract(file, pattern)
|
function M.extract(file, pattern)
|
||||||
local init = Util.read_file(file)
|
local init = Util.read_file(file)
|
||||||
local ret = assert(init:match(pattern)) --[[@as string]]
|
return assert(init:match(pattern))
|
||||||
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
|
end
|
||||||
|
|
||||||
---@return ReadmeBlock
|
---@return ReadmeBlock
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ M.clean = {
|
||||||
run = function(self, opts)
|
run = function(self, opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
local dir = self.plugin.dir:gsub("/+$", "")
|
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
|
local rock_root = Config.options.rocks.root .. "/" .. self.plugin.name
|
||||||
if vim.uv.fs_stat(rock_root) then
|
if vim.uv.fs_stat(rock_root) then
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,11 @@ function M.setup(opts)
|
||||||
local args = {}
|
local args = {}
|
||||||
local is_busted = false
|
local is_busted = false
|
||||||
local is_minitest = 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
|
for _, a in ipairs(_G.arg) do
|
||||||
if a == "--busted" then
|
if a == "--busted" then
|
||||||
is_busted = true
|
is_busted = true
|
||||||
elseif a == "--minitest" then
|
elseif a == "--minitest" then
|
||||||
is_minitest = true
|
is_minitest = true
|
||||||
elseif a == "--offline" then
|
|
||||||
offline = true
|
|
||||||
else
|
else
|
||||||
table.insert(args, a)
|
table.insert(args, a)
|
||||||
end
|
end
|
||||||
|
|
@ -65,9 +62,7 @@ function M.setup(opts)
|
||||||
if vim.g.colors_name == nil then
|
if vim.g.colors_name == nil then
|
||||||
vim.cmd("colorscheme habamax")
|
vim.cmd("colorscheme habamax")
|
||||||
end
|
end
|
||||||
if not offline then
|
|
||||||
require("lazy").update():wait()
|
require("lazy").update():wait()
|
||||||
end
|
|
||||||
if vim.bo.filetype == "lazy" then
|
if vim.bo.filetype == "lazy" then
|
||||||
local errors = false
|
local errors = false
|
||||||
for _, plugin in pairs(require("lazy.core.config").spec.plugins) do
|
for _, plugin in pairs(require("lazy.core.config").spec.plugins) do
|
||||||
|
|
@ -155,7 +150,7 @@ function M.minitest.setup(opts)
|
||||||
opts = {
|
opts = {
|
||||||
collect = {
|
collect = {
|
||||||
find_files = function()
|
find_files = function()
|
||||||
return #_G.arg > 0 and _G.arg or vim.fn.globpath("tests", "**/*_spec.lua", true, true)
|
return vim.fn.globpath("tests", "**/*_spec.lua", true, true)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- script_path = "tests/minit.lua",
|
-- script_path = "tests/minit.lua",
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,6 @@ function M.update()
|
||||||
pkg.spec = { _raw = spec.code }
|
pkg.spec = { _raw = spec.code }
|
||||||
end
|
end
|
||||||
table.insert(ret.pkgs, pkg)
|
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
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -285,10 +285,7 @@ function M.get(plugin)
|
||||||
|
|
||||||
---@param dep string
|
---@param dep string
|
||||||
local rocks = vim.tbl_filter(function(dep)
|
local rocks = vim.tbl_filter(function(dep)
|
||||||
local name = dep:match("^%s*([^~><=%s]+)")
|
local name = dep:gsub("%s.*", "")
|
||||||
if not name then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
local url = Community.get_url(name)
|
local url = Community.get_url(name)
|
||||||
local spec = Community.get_spec(name)
|
local spec = Community.get_spec(name)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,10 @@ function M.cputime()
|
||||||
if M.C == nil then
|
if M.C == nil then
|
||||||
pcall(function()
|
pcall(function()
|
||||||
ffi.cdef([[
|
ffi.cdef([[
|
||||||
|
typedef long time_t;
|
||||||
typedef int clockid_t;
|
typedef int clockid_t;
|
||||||
typedef struct timespec {
|
typedef struct timespec {
|
||||||
int64_t tv_sec; /* Use fixed 64-bit type for portability */
|
time_t tv_sec; /* seconds */
|
||||||
long tv_nsec; /* nanoseconds */
|
long tv_nsec; /* nanoseconds */
|
||||||
} nanotime;
|
} nanotime;
|
||||||
int clock_gettime(clockid_t clk_id, struct timespec *tp);
|
int clock_gettime(clockid_t clk_id, struct timespec *tp);
|
||||||
|
|
@ -47,8 +48,7 @@ function M.cputime()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function real()
|
local function real()
|
||||||
-- Zero-initialize to handle 32-bit systems where only lower 32 bits are written
|
local pnano = assert(ffi.new("nanotime[?]", 1))
|
||||||
local pnano = ffi.new("nanotime[1]")
|
|
||||||
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
|
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
|
||||||
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
|
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
|
||||||
return tonumber(pnano[0].tv_sec) * 1e3 + tonumber(pnano[0].tv_nsec) / 1e6
|
return tonumber(pnano[0].tv_sec) * 1e3 + tonumber(pnano[0].tv_nsec) / 1e6
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
---@field dirty? boolean
|
---@field dirty? boolean
|
||||||
---@field build? boolean
|
---@field build? boolean
|
||||||
---@field frags? number[]
|
---@field frags? number[]
|
||||||
---@field top? boolean
|
|
||||||
---@field handlers? LazyPluginHandlers
|
---@field handlers? LazyPluginHandlers
|
||||||
---@field installed? boolean
|
---@field installed? boolean
|
||||||
---@field is_local? boolean
|
---@field is_local? boolean
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ function M:update()
|
||||||
diag.lnum = diag.row - 1
|
diag.lnum = diag.row - 1
|
||||||
return diag
|
return diag
|
||||||
end, self._diagnostics),
|
end, self._diagnostics),
|
||||||
{ signs = false, virtual_text = true, underline = false, virtual_lines = false }
|
{ signs = false, virtual_text = true, underline = false }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -759,7 +759,7 @@ function M:debug()
|
||||||
---@type string[]
|
---@type string[]
|
||||||
plugins = vim.tbl_values(plugins)
|
plugins = vim.tbl_values(plugins)
|
||||||
table.sort(plugins)
|
table.sort(plugins)
|
||||||
self:append(Config.options.ui.icons.debug, "LazySpecial", { indent = 2 })
|
self:append("● ", "LazySpecial", { indent = 2 })
|
||||||
if handler_type == "keys" then
|
if handler_type == "keys" then
|
||||||
for k, v in pairs(Config.plugins[plugins[1]]._.handlers.keys) do
|
for k, v in pairs(Config.plugins[plugins[1]]._.handlers.keys) do
|
||||||
if k == value then
|
if k == value then
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
nvim -l tests/minit.lua --minitest "$@"
|
nvim -l tests/minit.lua --minitest
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ local function clean(plugins)
|
||||||
if plugin._.dep == false then
|
if plugin._.dep == false then
|
||||||
plugin._.dep = nil
|
plugin._.dep = nil
|
||||||
end
|
end
|
||||||
plugin._.top = nil
|
|
||||||
return plugin
|
return plugin
|
||||||
end, plugins)
|
end, plugins)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
[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
|
||||||
Loading…
Reference in New Issue