mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-13 10:25:49 +00:00
Compare commits
19 commits
Author | SHA1 | Date | |
---|---|---|---|
|
6c3bda4aca | ||
|
d51cf69783 | ||
|
1c9ba37045 | ||
|
96a205c8ce | ||
|
a8c6db5da7 | ||
|
e5e9bf4821 | ||
|
f81a3fb7fe | ||
|
ac21a639c7 | ||
|
c6a57a3534 | ||
|
f15a93907d | ||
|
7527af40dd | ||
|
5586fda88d | ||
|
4f30c61b64 | ||
|
d8f26efd45 | ||
|
4df5c4d65a | ||
|
72aa3a2624 | ||
|
a9c660d6ef | ||
|
7e6c863bc7 | ||
|
805b85c2ea |
12 changed files with 404 additions and 241 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
".": "11.16.1"
|
".": "11.17.1"
|
||||||
}
|
}
|
||||||
|
|
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -1,5 +1,35 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [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)
|
## [11.16.1](https://github.com/folke/lazy.nvim/compare/v11.16.0...v11.16.1) (2024-12-09)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
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
|
||||||
|
@ -13,12 +14,12 @@ function M.setup()
|
||||||
end
|
end
|
||||||
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
|
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 (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({
|
vim.api.nvim_echo({
|
||||||
{
|
{
|
||||||
"Cloning lazy.nvim\n\n",
|
"Cloning lazy.nvim\n\n",
|
||||||
|
|
|
@ -706,6 +706,7 @@ will be added to the plugin’s spec.
|
||||||
icons = {
|
icons = {
|
||||||
cmd = " ",
|
cmd = " ",
|
||||||
config = "",
|
config = "",
|
||||||
|
debug = "● ",
|
||||||
event = " ",
|
event = " ",
|
||||||
favorite = " ",
|
favorite = " ",
|
||||||
ft = " ",
|
ft = " ",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -96,6 +96,7 @@ M.defaults = {
|
||||||
icons = {
|
icons = {
|
||||||
cmd = " ",
|
cmd = " ",
|
||||||
config = "",
|
config = "",
|
||||||
|
debug = "● ",
|
||||||
event = " ",
|
event = " ",
|
||||||
favorite = " ",
|
favorite = " ",
|
||||||
ft = " ",
|
ft = " ",
|
||||||
|
@ -241,7 +242,7 @@ function M.hererocks()
|
||||||
return M.options.rocks.hererocks
|
return M.options.rocks.hererocks
|
||||||
end
|
end
|
||||||
|
|
||||||
M.version = "11.16.1" -- x-release-please-version
|
M.version = "11.17.1" -- 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()|false rhs
|
---@field [2]? string|fun():string?|false rhs
|
||||||
---@field mode? string|string[]
|
---@field mode? string|string[]
|
||||||
|
|
||||||
---@class LazyKeys: LazyKeysBase
|
---@class LazyKeys: LazyKeysBase
|
||||||
|
|
|
@ -179,6 +179,7 @@ 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)
|
||||||
|
@ -195,6 +196,7 @@ 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
|
||||||
|
@ -302,13 +304,26 @@ 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
|
||||||
for _, plugin in pairs(self.plugins) do
|
local function check(top)
|
||||||
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
|
for _, plugin in pairs(self.plugins) do
|
||||||
changes = changes + 1
|
if (plugin._.top or false) == top then
|
||||||
self:disable(plugin)
|
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
|
||||||
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
|
return changes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -374,6 +374,7 @@ 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")
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
---@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 }
|
{ signs = false, virtual_text = true, underline = false, virtual_lines = 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("● ", "LazySpecial", { indent = 2 })
|
self:append(Config.options.ui.icons.debug, "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
|
||||||
|
|
|
@ -25,6 +25,7 @@ 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue