From 37729140751577e87318c137d90d0e6bb00ceff1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Jun 2024 14:12:57 +0200 Subject: [PATCH 001/148] fix(ui): when closing details, jump to plugin header. Closes #1338 --- lua/lazy/view/init.lua | 12 +++++++++++- lua/lazy/view/render.lua | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index b27a17e..6ff3c81 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -96,7 +96,17 @@ function M.create() name = plugin.name, kind = plugin._.kind, } - self.state.plugin = not vim.deep_equal(self.state.plugin, selected) and selected or nil + + local open = not vim.deep_equal(self.state.plugin, selected) + + if not open then + local row = self.render:get_row(selected) + if row then + vim.api.nvim_win_set_cursor(self.view.win, { row, 8 }) + end + end + + self.state.plugin = open and selected or nil self:update() end end) diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index b7bd884..c128147 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -122,6 +122,15 @@ function M:get_plugin(row) end end +---@param selected {name:string, kind?: LazyPluginKind} +function M:get_row(selected) + for _, loc in ipairs(self.locations) do + if loc.kind == selected.kind and loc.name == selected.name then + return loc.from + end + end +end + function M:title() self:nl() local modes = vim.tbl_filter(function(c) From 5e3c112cb32c9cb6e8622aab4446358e039def7c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Jun 2024 14:22:53 +0200 Subject: [PATCH 002/148] feat(ui): use [[ & ]] to navigate between plugins. Fixes #1463 --- lua/lazy/view/config.lua | 2 ++ lua/lazy/view/init.lua | 22 ++++++++++++++++++++++ lua/lazy/view/render.lua | 10 +++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/config.lua b/lua/lazy/view/config.lua index e834573..d65f03c 100644 --- a/lua/lazy/view/config.lua +++ b/lua/lazy/view/config.lua @@ -34,6 +34,8 @@ M.keys = { profile_sort = "", profile_filter = "", abort = "", + next = "]]", + prev = "[[", } ---@type table diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index 6ff3c81..468ac8a 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -111,6 +111,28 @@ function M.create() end end) + self:on_key(ViewConfig.keys.next, function() + local cursor = vim.api.nvim_win_get_cursor(self.view.win) + for l = 1, #self.render.locations, 1 do + local loc = self.render.locations[l] + if loc.from > cursor[1] then + vim.api.nvim_win_set_cursor(self.view.win, { loc.from, 8 }) + return + end + end + end) + + self:on_key(ViewConfig.keys.prev, function() + local cursor = vim.api.nvim_win_get_cursor(self.view.win) + for l = #self.render.locations, 1, -1 do + local loc = self.render.locations[l] + if loc.from < cursor[1] then + vim.api.nvim_win_set_cursor(self.view.win, { loc.from, 8 }) + return + end + end + end) + self:on_key(ViewConfig.keys.profile_sort, function() if self.state.mode == "profile" then self.state.profile.sort_time_taken = not self.state.profile.sort_time_taken diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index c128147..e1eec6c 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -201,7 +201,15 @@ function M:help() :nl() self:append("or the plugin was just updated. Otherwise the plugin webpage will open."):nl():nl() - self:append("Use "):append("", "LazySpecial"):append(" on a commit or plugin to open the diff view"):nl() + self:append("Use "):append("", "LazySpecial"):append(" on a commit or plugin to open the diff view"):nl():nl() + self + :append("Use ") + :append("<]]>", "LazySpecial") + :append(" and ") + :append("<[[>", "LazySpecial") + :append(" to navigate between plugins") + :nl() + :nl() self:nl() self:append("Keyboard Shortcuts", "LazyH2"):nl() From 0507e19289539396313503f6eb6b02bbe8a5e483 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2024 17:01:41 +0200 Subject: [PATCH 003/148] chore(main): release 11.9.0 (#1587) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a30099e..9918aa5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.8.2" + ".": "11.9.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe0915..d8fe701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [11.9.0](https://github.com/folke/lazy.nvim/compare/v11.8.2...v11.9.0) (2024-06-29) + + +### Features + +* **ui:** use [[ & ]] to navigate between plugins. Fixes [#1463](https://github.com/folke/lazy.nvim/issues/1463) ([5e3c112](https://github.com/folke/lazy.nvim/commit/5e3c112cb32c9cb6e8622aab4446358e039def7c)) + + +### Bug Fixes + +* **ui:** when closing details, jump to plugin header. Closes [#1338](https://github.com/folke/lazy.nvim/issues/1338) ([3772914](https://github.com/folke/lazy.nvim/commit/37729140751577e87318c137d90d0e6bb00ceff1)) + ## [11.8.2](https://github.com/folke/lazy.nvim/compare/v11.8.1...v11.8.2) (2024-06-29) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 4dc2419..9319999 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.8.2" -- x-release-please-version +M.version = "11.9.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From c7ed87f9ca03ea412134d6a6ea55b43232eb6b0c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 30 Jun 2024 08:48:03 +0200 Subject: [PATCH 004/148] perf: automatically suspend the scheduler when all threads are waiting (#1591) * perf: automatically suspend the scheduler when all threads are waiting * ci: fix ci * test: cleanup --- .github/workflows/ci.yml | 4 +- lua/lazy/async.lua | 85 ++++++++++++++++++++++------------- lua/lazy/manage/runner.lua | 39 +++++++++------- lua/lazy/manage/task/git.lua | 1 + tests/core/init_spec.lua | 1 - tests/core/plugin_spec.lua | 2 - tests/handlers/keys_spec.lua | 1 - tests/manage/process_spec.lua | 1 - tests/manage/task_spec.lua | 1 - 9 files changed, 81 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 029531d..1a2ed40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: ./tests/run docs: runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} needs: tests env: GH_TOKEN: ${{ github.token }} @@ -40,6 +41,7 @@ jobs: run: gh workflow run "Deploy to Github Pages" --ref docs community: runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} steps: - uses: actions/checkout@v4 - name: Install Neovim @@ -70,7 +72,7 @@ jobs: commit_author: "github-actions[bot] " release: name: release - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} needs: - tests - docs diff --git a/lua/lazy/async.lua b/lua/lazy/async.lua index 58145a6..7848b7d 100644 --- a/lua/lazy/async.lua +++ b/lua/lazy/async.lua @@ -1,11 +1,14 @@ +local Util = require("lazy.core.util") + local M = {} ---@type Async[] -M._queue = {} -M._executor = assert(vim.loop.new_timer()) +M._active = {} +---@type Async[] +M._suspended = {} +M._executor = assert(vim.loop.new_check()) -M.TIMER = 10 -M.BUDGET = 100 +M.BUDGET = 10 ---@type table M._threads = setmetatable({}, { __mode = "k" }) @@ -42,11 +45,6 @@ function Async:init(fn) return M.add(self) end -function Async:restart() - assert(not self:running(), "Cannot restart a running async") - self:init(self._fn) -end - ---@param event AsyncEvent ---@param cb async fun(res:any, async:Async) function Async:on(event, cb) @@ -77,27 +75,41 @@ function Async:sleep(ms) end ---@async -function Async:suspend() +---@param yield? boolean +function Async:suspend(yield) self._suspended = true - if coroutine.running() == self._co then + if coroutine.running() == self._co and yield ~= false then coroutine.yield() end end function Async:resume() self._suspended = false + M._run() end -function Async:wait() +---@async +---@param yield? boolean +function Async:wake(yield) local async = M.running() + assert(async, "Not in an async context") + self:on("done", function() + async:resume() + end) + async:suspend(yield) +end + +---@async +function Async:wait() if coroutine.running() == self._co then error("Cannot wait on self") end - while self:running() do - if async then - coroutine.yield() - else + local async = M.running() + if async then + self:wake() + else + while self:running() do vim.wait(10) end end @@ -121,35 +133,44 @@ function Async:step() end function M.step() - local budget = M.BUDGET * 1e6 local start = vim.uv.hrtime() - local count = #M._queue - local i = 0 - while #M._queue > 0 and vim.uv.hrtime() - start < budget do - ---@type Async - local state = table.remove(M._queue, 1) - if state:step() then - table.insert(M._queue, state) - end - i = i + 1 - if i >= count then + for _ = 1, #M._active do + if vim.uv.hrtime() - start > M.BUDGET * 1e6 then break end + local state = table.remove(M._active, 1) + if state:step() then + if state._suspended then + table.insert(M._suspended, state) + else + table.insert(M._active, state) + end + end end - if #M._queue == 0 then + for _ = 1, #M._suspended do + local state = table.remove(M._suspended, 1) + table.insert(state._suspended and M._suspended or M._active, state) + end + + -- print("step", #M._active, #M._suspended) + if #M._active == 0 then return M._executor:stop() end end ---@param async Async function M.add(async) - table.insert(M._queue, async) - if not M._executor:is_active() then - M._executor:start(1, M.TIMER, vim.schedule_wrap(M.step)) - end + table.insert(M._active, async) + M._run() return async end +function M._run() + if not M._executor:is_active() then + M._executor:start(vim.schedule_wrap(M.step)) + end +end + function M.running() local co = coroutine.running() if co then diff --git a/lua/lazy/manage/runner.lua b/lua/lazy/manage/runner.lua index c5f5c75..d551ce5 100644 --- a/lua/lazy/manage/runner.lua +++ b/lua/lazy/manage/runner.lua @@ -78,6 +78,7 @@ function Runner:_start() ---@type number? local wait_step = nil + ---@async ---@param resume? boolean local function continue(resume) active = 0 @@ -114,22 +115,30 @@ function Runner:_start() end local s = state[name] local plugin = self:plugin(name) - if s.step == #self._pipeline then - -- done - s.task = nil - plugin._.working = false - elseif s.step < #self._pipeline then - -- next - s.step = s.step + 1 - local step = self._pipeline[s.step] - if step.task == "wait" then + while s.step <= #self._pipeline do + if s.step == #self._pipeline then + -- done + s.task = nil plugin._.working = false - waiting = waiting + 1 - wait_step = s.step - else - s.task = self:queue(plugin, step) - plugin._.working = true - active = active + 1 + break + elseif s.step < #self._pipeline then + -- next + s.step = s.step + 1 + local step = self._pipeline[s.step] + if step.task == "wait" then + plugin._.working = false + waiting = waiting + 1 + wait_step = s.step + break + else + s.task = self:queue(plugin, step) + plugin._.working = true + if s.task then + active = active + 1 + s.task:wake(false) + break + end + end end end end diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 4bd7134..774df16 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -21,6 +21,7 @@ M.log = { ---@async ---@param opts {args?: string[], updated?:boolean, check?:boolean} run = function(self, opts) + -- self:spawn({ "sleep", "5" }) local args = { "log", "--pretty=format:%h %s (%cr)", diff --git a/tests/core/init_spec.lua b/tests/core/init_spec.lua index 4970871..356f8e4 100644 --- a/tests/core/init_spec.lua +++ b/tests/core/init_spec.lua @@ -1,4 +1,3 @@ ----@module 'luassert' local Util = require("lazy.core.util") describe("init", function() diff --git a/tests/core/plugin_spec.lua b/tests/core/plugin_spec.lua index d810339..166dc2a 100644 --- a/tests/core/plugin_spec.lua +++ b/tests/core/plugin_spec.lua @@ -1,5 +1,3 @@ ----@module 'luassert' - local Config = require("lazy.core.config") local Handler = require("lazy.core.handler") local Plugin = require("lazy.core.plugin") diff --git a/tests/handlers/keys_spec.lua b/tests/handlers/keys_spec.lua index d6a9df4..6254db8 100644 --- a/tests/handlers/keys_spec.lua +++ b/tests/handlers/keys_spec.lua @@ -1,4 +1,3 @@ ----@module 'luassert' local Keys = require("lazy.core.handler.keys") describe("keys", function() diff --git a/tests/manage/process_spec.lua b/tests/manage/process_spec.lua index 0fbbe89..03b653e 100644 --- a/tests/manage/process_spec.lua +++ b/tests/manage/process_spec.lua @@ -1,4 +1,3 @@ ----@module 'luassert' local Async = require("lazy.async") local Process = require("lazy.manage.process") diff --git a/tests/manage/task_spec.lua b/tests/manage/task_spec.lua index e161fa2..fdd9c35 100644 --- a/tests/manage/task_spec.lua +++ b/tests/manage/task_spec.lua @@ -1,4 +1,3 @@ ----@module 'luassert' --# selene:allow(incorrect_standard_library_use) local Task = require("lazy.manage.task") From 2f4ac035bcc66292250de7134d73007b147f64e8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 30 Jun 2024 09:13:04 +0200 Subject: [PATCH 005/148] perf: suspend when tasks are active --- lua/lazy/async.lua | 19 ++++++++++++++++++- lua/lazy/manage/runner.lua | 4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lua/lazy/async.lua b/lua/lazy/async.lua index 7848b7d..5cbdb1b 100644 --- a/lua/lazy/async.lua +++ b/lua/lazy/async.lua @@ -152,12 +152,29 @@ function M.step() table.insert(state._suspended and M._suspended or M._active, state) end - -- print("step", #M._active, #M._suspended) + -- M.debug() if #M._active == 0 then return M._executor:stop() end end +function M.debug() + local lines = { + "- active: " .. #M._active, + "- suspended: " .. #M._suspended, + } + for _, async in ipairs(M._active) do + local info = debug.getinfo(async._fn) + local file = vim.fn.fnamemodify(info.short_src:sub(1), ":~:.") + table.insert(lines, ("%s:%d"):format(file, info.linedefined)) + if #lines > 10 then + break + end + end + local msg = table.concat(lines, "\n") + M._notif = vim.notify(msg, nil, { replace = M._notif }) +end + ---@param async Async function M.add(async) table.insert(M._active, async) diff --git a/lua/lazy/manage/runner.lua b/lua/lazy/manage/runner.lua index d551ce5..81dcde0 100644 --- a/lua/lazy/manage/runner.lua +++ b/lua/lazy/manage/runner.lua @@ -153,7 +153,9 @@ function Runner:_start() end continue(true) end - coroutine.yield() + if active > 0 then + self._running:suspend() + end end end From c882227f1fdc4580d14212df8f814a0772951e3d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:47:41 +0200 Subject: [PATCH 006/148] chore(main): release 11.9.1 (#1592) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 9918aa5..67fa05d 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.9.0" + ".": "11.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d8fe701..01bbc13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [11.9.1](https://github.com/folke/lazy.nvim/compare/v11.9.0...v11.9.1) (2024-06-30) + + +### Performance Improvements + +* automatically suspend the scheduler when all threads are waiting ([#1591](https://github.com/folke/lazy.nvim/issues/1591)) ([c7ed87f](https://github.com/folke/lazy.nvim/commit/c7ed87f9ca03ea412134d6a6ea55b43232eb6b0c)) +* suspend when tasks are active ([2f4ac03](https://github.com/folke/lazy.nvim/commit/2f4ac035bcc66292250de7134d73007b147f64e8)) + ## [11.9.0](https://github.com/folke/lazy.nvim/compare/v11.8.2...v11.9.0) (2024-06-29) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 9319999..c51f680 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.9.0" -- x-release-please-version +M.version = "11.9.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 1fad61712bd3937dda925775a7736b8efbcbf1a7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 30 Jun 2024 13:35:11 +0200 Subject: [PATCH 007/148] fix(async): make asyncs abortable --- lua/lazy/async.lua | 21 +++++++++++++++++---- lua/lazy/core/util.lua | 4 ++++ lua/lazy/manage/process.lua | 2 +- lua/lazy/view/float.lua | 3 ++- lua/lazy/view/init.lua | 1 + tests/manage/runner_spec.lua | 3 ++- tests/manage/task_spec.lua | 3 ++- 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lua/lazy/async.lua b/lua/lazy/async.lua index 5cbdb1b..7a865b3 100644 --- a/lua/lazy/async.lua +++ b/lua/lazy/async.lua @@ -79,7 +79,7 @@ end function Async:suspend(yield) self._suspended = true if coroutine.running() == self._co and yield ~= false then - coroutine.yield() + M.yield() end end @@ -132,12 +132,25 @@ function Async:step() return self:running() end +function M.abort() + for _, async in ipairs(M._active) do + coroutine.resume(async._co, "abort") + end +end + +function M.yield() + if coroutine.yield() == "abort" then + error("aborted", 2) + end +end + function M.step() local start = vim.uv.hrtime() for _ = 1, #M._active do - if vim.uv.hrtime() - start > M.BUDGET * 1e6 then + if Util.exiting() or vim.uv.hrtime() - start > M.BUDGET * 1e6 then break end + local state = table.remove(M._active, 1) if state:step() then if state._suspended then @@ -153,7 +166,7 @@ function M.step() end -- M.debug() - if #M._active == 0 then + if #M._active == 0 or Util.exiting() then return M._executor:stop() end end @@ -183,7 +196,7 @@ function M.add(async) end function M._run() - if not M._executor:is_active() then + if not Util.exiting() and not M._executor:is_active() then M._executor:start(vim.schedule_wrap(M.step)) end end diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index f42cf6a..34ca1d6 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -29,6 +29,10 @@ function M.track(data, time) end end +function M.exiting() + return vim.v.exiting ~= vim.NIL +end + ---@generic T ---@param list T[] ---@param fn fun(v: T):boolean? diff --git a/lua/lazy/manage/process.lua b/lua/lazy/manage/process.lua index c4a4baf..0a67a14 100644 --- a/lua/lazy/manage/process.lua +++ b/lua/lazy/manage/process.lua @@ -93,7 +93,7 @@ function Process:_run() end) self:suspend() while not (self.handle:is_closing() and stdout:is_closing() and stderr:is_closing()) do - coroutine.yield() + Async.yield() end else self.data = "Failed to spawn process " .. self.cmd .. " " .. vim.inspect(self.opts) diff --git a/lua/lazy/view/float.lua b/lua/lazy/view/float.lua index d57b384..3a59069 100644 --- a/lua/lazy/view/float.lua +++ b/lua/lazy/view/float.lua @@ -252,7 +252,7 @@ end ---@param fn fun(self?) ---@param desc? string ---@param mode? string[] -function M:on_key(key, fn, desc,mode) +function M:on_key(key, fn, desc, mode) vim.keymap.set(mode or "n", key, function() fn(self) end, { @@ -295,6 +295,7 @@ function M:close(opts) vim.diagnostic.reset(Config.ns, buf) vim.api.nvim_buf_delete(buf, { force = true }) end + vim.cmd.redraw() end) end diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index 468ac8a..313d3ad 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -83,6 +83,7 @@ function M.create() vim.keymap.set("n", ViewConfig.keys.abort, function() require("lazy.manage.process").abort() + require("lazy.async").abort() return ViewConfig.keys.abort end, { silent = true, buffer = self.buf, expr = true }) diff --git a/tests/manage/runner_spec.lua b/tests/manage/runner_spec.lua index 925aaf1..a2507c9 100644 --- a/tests/manage/runner_spec.lua +++ b/tests/manage/runner_spec.lua @@ -1,3 +1,4 @@ +local Async = require("lazy.async") local Runner = require("lazy.manage.runner") describe("runner", function() @@ -33,7 +34,7 @@ describe("runner", function() ---@async ---@param task LazyTask run = function(task) - coroutine.yield() + Async.yield() table.insert(runs, { plugin = task.plugin.name, task = task.name }) end, } diff --git a/tests/manage/task_spec.lua b/tests/manage/task_spec.lua index fdd9c35..f41eb80 100644 --- a/tests/manage/task_spec.lua +++ b/tests/manage/task_spec.lua @@ -1,4 +1,5 @@ --# selene:allow(incorrect_standard_library_use) +local Async = require("lazy.async") local Task = require("lazy.manage.task") describe("task", function() @@ -42,7 +43,7 @@ describe("task", function() local running = true ---@async local task = Task.new(plugin, "test", function() - coroutine.yield() + Async.yield() running = false end, opts) assert(task:running()) From a9d7ade203b3f3ee3058c082c62afdf8e4bcb416 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 1 Jul 2024 07:07:49 +0200 Subject: [PATCH 008/148] perf(plugin): minor optim to resolve imports a bit faster --- lua/lazy/core/plugin.lua | 5 ++++- lua/lazy/core/util.lua | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 26b3f6e..f9bd04f 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -150,8 +150,11 @@ function Spec:import(spec) local modspecs = {} if type(import) == "string" then - Util.lsmod(import, function(modname) + Util.lsmod(import, function(modname, modpath) modspecs[#modspecs + 1] = modname + package.preload[modname] = function() + return loadfile(modpath)() + end end) table.sort(modspecs) else diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 34ca1d6..185527b 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -287,7 +287,7 @@ function M.find_root(modname) local ret = require("lazy.core.cache").find(modname, { rtp = true, paths = paths, - patterns = { "", ".lua" }, + patterns = { ".lua", "" }, })[1] if not ret and cached then @@ -295,25 +295,27 @@ function M.find_root(modname) ret = require("lazy.core.cache").find(modname, { rtp = false, paths = paths, - patterns = { "", ".lua" }, + patterns = { ".lua", "" }, })[1] end if ret then - local root = ret.modpath:gsub("/init%.lua$", ""):gsub("%.lua$", "") - return root + return ret.modpath:gsub("%.lua$", ""), ret.modpath end end ---@param modname string ---@param fn fun(modname:string, modpath:string) function M.lsmod(modname, fn) - local root = M.find_root(modname) + local root, match = M.find_root(modname) if not root then return end - if vim.uv.fs_stat(root .. ".lua") then - fn(modname, root .. ".lua") + if match:sub(-4) == ".lua" then + fn(modname, match) + if not vim.uv.fs_stat(root) then + return + end end M.ls(root, function(path, name, type) From d0921f5b9b3d2c5e09618da55a018228edcc4d16 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 2 Jul 2024 13:42:53 +0200 Subject: [PATCH 009/148] fix(health): check for errors when executing commands. Closes #1599 --- lua/lazy/health.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/lazy/health.lua b/lua/lazy/health.lua index b3bf6f2..9e2a869 100644 --- a/lua/lazy/health.lua +++ b/lua/lazy/health.lua @@ -37,13 +37,17 @@ function M.have(cmd, opts) for _, c in ipairs(cmd) do if vim.fn.executable(c) == 1 then local version = vim.fn.system(c .. " " .. opts.version) or "" - version = vim.trim(vim.split(version, "\n")[1]) - version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "") - if opts.version_pattern and not version:find(opts.version_pattern, 1, true) then - opts.warn(("`%s` version `%s` needed, but found `%s`"):format(c, opts.version_pattern, version)) + if vim.v.shell_error ~= 0 then + opts.error(("failed to get version of {%s}\n%s"):format(c, version)) else - found = ("{%s} `%s`"):format(c, version) - break + version = vim.trim(vim.split(version, "\n")[1]) + version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "") + if opts.version_pattern and not version:find(opts.version_pattern, 1, true) then + opts.warn(("`%s` version `%s` needed, but found `%s`"):format(c, opts.version_pattern, version)) + else + found = ("{%s} `%s`"):format(c, version) + break + end end end end From 36c85945ee4ba7553132bfc07280817c8f578e18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 08:20:37 +0000 Subject: [PATCH 010/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index eae1268..ccf4829 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -157,7 +157,16 @@ STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) @@ -196,7 +205,16 @@ SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) From cea5920abb202753004440f94ec39bcf2927e02e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:11:21 +0200 Subject: [PATCH 011/148] chore(main): release 11.9.2 (#1595) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 67fa05d..cd35eb4 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.9.1" + ".": "11.9.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 01bbc13..84044cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [11.9.2](https://github.com/folke/lazy.nvim/compare/v11.9.1...v11.9.2) (2024-07-02) + + +### Bug Fixes + +* **async:** make asyncs abortable ([1fad617](https://github.com/folke/lazy.nvim/commit/1fad61712bd3937dda925775a7736b8efbcbf1a7)) +* **health:** check for errors when executing commands. Closes [#1599](https://github.com/folke/lazy.nvim/issues/1599) ([d0921f5](https://github.com/folke/lazy.nvim/commit/d0921f5b9b3d2c5e09618da55a018228edcc4d16)) + + +### Performance Improvements + +* **plugin:** minor optim to resolve imports a bit faster ([a9d7ade](https://github.com/folke/lazy.nvim/commit/a9d7ade203b3f3ee3058c082c62afdf8e4bcb416)) + ## [11.9.1](https://github.com/folke/lazy.nvim/compare/v11.9.0...v11.9.1) (2024-06-30) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index c51f680..b7f5c14 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.9.1" -- x-release-please-version +M.version = "11.9.2" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 0f2786bcc91347188627534471ee75c3f6f16b2d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 15:17:02 +0200 Subject: [PATCH 012/148] feat(profiling): merge VeryLazy stats and show startuptime in profile view --- lua/lazy/core/handler/event.lua | 8 ++++++-- lua/lazy/core/util.lua | 2 ++ lua/lazy/stats.lua | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/handler/event.lua b/lua/lazy/core/handler/event.lua index aff4572..a34e0c5 100644 --- a/lua/lazy/core/handler/event.lua +++ b/lua/lazy/core/handler/event.lua @@ -75,7 +75,9 @@ function M:_add(event) end -- HACK: work-around for https://github.com/neovim/neovim/issues/25526 done = true - Util.track({ [self.type] = event.id }) + if event.id ~= "VeryLazy" then + Util.track({ [self.type] = event.id }) + end local state = M.get_state(ev.event, ev.buf, ev.data) @@ -86,7 +88,9 @@ function M:_add(event) for _, s in ipairs(state) do M.trigger(s) end - Util.track() + if event.id ~= "VeryLazy" then + Util.track() + end end, }) end diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 185527b..6d7c3b8 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -171,7 +171,9 @@ function M.very_lazy() return end vim.g.did_very_lazy = true + M.track({ event = "VeryLazy" }) vim.api.nvim_exec_autocmds("User", { pattern = "VeryLazy", modeline = false }) + M.track() end) end diff --git a/lua/lazy/stats.lua b/lua/lazy/stats.lua index 36865db..015a2be 100644 --- a/lua/lazy/stats.lua +++ b/lua/lazy/stats.lua @@ -21,6 +21,7 @@ M.C = nil function M.on_ui_enter() M._stats.startuptime = M.track("UIEnter") + require("lazy.core.util").track({ start = "startuptime" }, M._stats.startuptime * 1e6) vim.api.nvim_exec_autocmds("User", { pattern = "LazyVimStarted", modeline = false }) end From 6fdd904ee45b66d933c5d2f72bcec337e13744f8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 15:19:41 +0200 Subject: [PATCH 013/148] fix(config): determine headless only during startup. Fixes #1608 --- lua/lazy/core/config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index b7f5c14..f77a29d 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -253,8 +253,9 @@ M.mapleader = nil ---@type string M.maplocalleader = nil +local headless = #vim.api.nvim_list_uis() == 0 function M.headless() - return #vim.api.nvim_list_uis() == 0 + return headless end ---@param opts? LazyConfig From 923e1aa7a49d945afa4c03da4f8ff052cd6d14a6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 16:16:39 +0200 Subject: [PATCH 014/148] fix(plugin): local spec name --- lua/lazy/core/plugin.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index f9bd04f..d121fdf 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -275,15 +275,6 @@ function M.update_rocks_state() end end ----@param path string -function M.local_spec(path) - local file = vim.secure.read(path) - if file then - return loadstring(file)() - end - return {} -end - ---@return LazySpecImport? function M.find_local_spec() if not Config.options.local_spec then @@ -298,7 +289,7 @@ function M.find_local_spec() import = function() local data = vim.secure.read(file) if data then - return loadstring(data)() + return loadstring(data, M.LOCAL_SPEC)() end return {} end, From a17ad27435eb710e5e942b60a717d2a6af98c38e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 17:53:45 +0200 Subject: [PATCH 015/148] build: better minit --- bootstrap.lua | 19 ++++------ lua/lazy/minit.lua | 65 +++++++++++++++++++++++++++------ tests/{busted.lua => minit.lua} | 7 ++-- tests/run | 2 +- 4 files changed, 67 insertions(+), 26 deletions(-) rename tests/{busted.lua => minit.lua} (59%) diff --git a/bootstrap.lua b/bootstrap.lua index e39db4d..dfafd59 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -13,6 +13,10 @@ function M.setup() end end + if vim.env.LAZY_PATH and not vim.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 vim.api.nvim_echo({ @@ -26,19 +30,12 @@ function M.setup() pcall(vim.fn.system, { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) if not ok or vim.v.shell_error ~= 0 then vim.api.nvim_echo({ - { - "Failed to clone lazy.nvim\n", - "ErrorMsg", - }, - { - vim.trim(out or ""), - "WarningMsg", - }, - { "\nPress any key to exit", "MoreMsg" }, + { "Failed to clone lazy.nvim\n", "ErrorMsg" }, + { vim.trim(out or ""), "WarningMsg" }, + { "\nPress any key to exit...", "MoreMsg" }, }, true, {}) - vim.fn.getchar() - vim.cmd([[quit]]) + os.exit(1) end end vim.opt.rtp:prepend(lazypath) diff --git a/lua/lazy/minit.lua b/lua/lazy/minit.lua index 7da2b2a..3874a18 100644 --- a/lua/lazy/minit.lua +++ b/lua/lazy/minit.lua @@ -20,11 +20,27 @@ function M.extend(defaults, opts) return vim.tbl_deep_extend("force", defaults, opts, { spec = spec }) end +---@param opts LazyConfig function M.setup(opts) opts = M.extend({ change_detection = { enabled = false }, }, opts) + local args = {} + local is_busted = false + for _, a in ipairs(_G.arg) do + if a == "--busted" then + is_busted = true + else + table.insert(args, a) + end + end + _G.arg = args + + if is_busted then + opts = M.busted.setup(opts) + end + -- set stdpaths to use .tests if vim.env.LAZY_STDPATH then local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p") @@ -48,6 +64,10 @@ function M.setup(opts) vim.cmd.close() end end + + if is_busted then + M.busted.run() + end end function M.repro(opts) @@ -68,18 +88,9 @@ function M.repro(opts) M.setup(opts) end ----@param opts LazyConfig -function M.busted(opts) - opts = M.extend({ - spec = { - "lunarmodules/busted", - { dir = vim.fn.fnamemodify(".", ":p") }, - }, - rocks = { hererocks = true }, - }, opts) - - M.setup(opts) +M.busted = {} +function M.busted.run() local Config = require("lazy.core.config") -- disable termnial output for the tests Config.options.headless = {} @@ -93,4 +104,36 @@ function M.busted(opts) }) or os.exit(1) end +---@param opts LazyConfig +function M.busted.setup(opts) + local args = table.concat(_G.arg, " ") + local json = args:find("--output[ =]json") + + return M.extend({ + spec = { + "lunarmodules/busted", + { dir = vim.uv.cwd() }, + }, + headless = { + process = not json, + log = not json, + task = not json, + }, + rocks = { hererocks = true }, + }, opts) +end + +---@param opts LazyConfig +function M.busted.init(opts) + opts = M.busted.setup(opts) + M.setup(opts) + M.busted.run() +end + +setmetatable(M.busted, { + __call = function(_, opts) + M.busted.init(opts) + end, +}) + return M diff --git a/tests/busted.lua b/tests/minit.lua similarity index 59% rename from tests/busted.lua rename to tests/minit.lua index 7292d3e..e62be39 100755 --- a/tests/busted.lua +++ b/tests/minit.lua @@ -5,7 +5,8 @@ vim.env.LAZY_STDPATH = ".tests" vim.opt.rtp:prepend(".") -- Setup lazy.nvim -require("lazy.minit").busted({ - spec = {}, - stdpath = ".tests", +require("lazy.minit").setup({ + spec = { + { dir = vim.uv.cwd() }, + }, }) diff --git a/tests/run b/tests/run index 7872f5a..f1399de 100755 --- a/tests/run +++ b/tests/run @@ -1,3 +1,3 @@ #!/bin/sh -nvim -l tests/busted.lua tests -o utfTerminal "$@" +nvim -l tests/minit.lua --busted tests -o utfTerminal "$@" From 1225f1dc60342d82b9de031406c66516c3dfc564 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 18:00:59 +0200 Subject: [PATCH 016/148] ci: dont enable local specs for minit --- lua/lazy/minit.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazy/minit.lua b/lua/lazy/minit.lua index 3874a18..838ac36 100644 --- a/lua/lazy/minit.lua +++ b/lua/lazy/minit.lua @@ -23,6 +23,7 @@ end ---@param opts LazyConfig function M.setup(opts) opts = M.extend({ + local_spec = false, change_detection = { enabled = false }, }, opts) From 851b12034d1eb77acda84537805740923af3fab4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 4 Jul 2024 18:05:36 +0200 Subject: [PATCH 017/148] ci: use main for bootstrap --- bootstrap.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bootstrap.lua b/bootstrap.lua index dfafd59..16d9f1d 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -26,8 +26,13 @@ function M.setup() }, }, true, {}) local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local ok, out = - pcall(vim.fn.system, { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + local ok, out = pcall(vim.fn.system, { + "git", + "clone", + "--filter=blob:none", + lazyrepo, + lazypath, + }) if not ok or vim.v.shell_error ~= 0 then vim.api.nvim_echo({ { "Failed to clone lazy.nvim\n", "ErrorMsg" }, From 407e65c7924989c1efed6bbc89e6287e2d140f02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 21:01:57 +0200 Subject: [PATCH 018/148] chore(main): release 11.10.0 (#1609) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index cd35eb4..d58642f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.9.2" + ".": "11.10.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 84044cd..a6ad34e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [11.10.0](https://github.com/folke/lazy.nvim/compare/v11.9.2...v11.10.0) (2024-07-04) + + +### Features + +* **profiling:** merge VeryLazy stats and show startuptime in profile view ([0f2786b](https://github.com/folke/lazy.nvim/commit/0f2786bcc91347188627534471ee75c3f6f16b2d)) + + +### Bug Fixes + +* **config:** determine headless only during startup. Fixes [#1608](https://github.com/folke/lazy.nvim/issues/1608) ([6fdd904](https://github.com/folke/lazy.nvim/commit/6fdd904ee45b66d933c5d2f72bcec337e13744f8)) +* **plugin:** local spec name ([923e1aa](https://github.com/folke/lazy.nvim/commit/923e1aa7a49d945afa4c03da4f8ff052cd6d14a6)) + ## [11.9.2](https://github.com/folke/lazy.nvim/compare/v11.9.1...v11.9.2) (2024-07-02) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index f77a29d..28e942c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.9.2" -- x-release-please-version +M.version = "11.10.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From baac5517770abd6eee63d11cf4791ef5bf5702e8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 5 Jul 2024 09:01:01 +0200 Subject: [PATCH 019/148] fix(lockfile): keep cond=false and enabed=false in lockfile. Fixes #1535. Fixes #1606 --- lua/lazy/manage/lock.lua | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/lua/lazy/manage/lock.lua b/lua/lazy/manage/lock.lua index c7ceb4e..a1b4c74 100644 --- a/lua/lazy/manage/lock.lua +++ b/lua/lazy/manage/lock.lua @@ -3,43 +3,43 @@ local Git = require("lazy.manage.git") local M = {} ----@type table +---@alias LazyLockfile table +---@type LazyLockfile M.lock = {} M._loaded = false function M.update() + M.load() vim.fn.mkdir(vim.fn.fnamemodify(Config.options.lockfile, ":p:h"), "p") local f = assert(io.open(Config.options.lockfile, "wb")) f:write("{\n") - M.lock = {} - ---@param plugin LazyPlugin - local plugins = vim.tbl_filter(function(plugin) - return not plugin._.is_local and plugin._.installed - end, Config.plugins) + -- keep disabled and cond plugins + for name in pairs(M.lock) do + if not (Config.spec.disabled[name] or Config.spec.ignore_installed[name]) then + M.lock[name] = nil + end + end + + for _, plugin in pairs(Config.plugins) do + if not plugin._.is_local and plugin._.installed then + local info = assert(Git.info(plugin.dir)) + M.lock[plugin.name] = { + branch = info.branch or assert(Git.get_branch(plugin)), + commit = assert(info.commit, "commit is nil"), + } + end + end - ---@param plugin LazyPlugin ---@type string[] - local names = vim.tbl_map(function(plugin) - return plugin.name - end, plugins) + local names = vim.tbl_keys(M.lock) table.sort(names) for n, name in ipairs(names) do - local plugin = Config.plugins[name] - if not plugin._.is_local and plugin._.installed then - local info = assert(Git.info(plugin.dir)) - if not info.branch then - info.branch = assert(Git.get_branch(plugin)) - end - info.commit = info.commit - -- f:write(([[ [%q] = { branch = %q, commit = %q },]]):format(name, info.branch, info.commit) .. "\n") - f:write(([[ %q: { "branch": %q, "commit": %q }]]):format(name, info.branch, info.commit)) - if n ~= #names then - f:write(",\n") - end - ---@diagnostic disable-next-line: assign-type-mismatch - M.lock[plugin.name] = info + local info = M.lock[name] + f:write(([[ %q: { "branch": %q, "commit": %q }]]):format(name, info.branch, info.commit)) + if n ~= #names then + f:write(",\n") end end f:write("\n}") @@ -47,6 +47,9 @@ function M.update() end function M.load() + if M._loaded then + return + end M.lock = {} M._loaded = true local f = io.open(Config.options.lockfile, "r") @@ -64,9 +67,7 @@ end ---@param plugin LazyPlugin ---@return {commit:string, branch:string} function M.get(plugin) - if not M._loaded then - M.load() - end + M.load() return M.lock[plugin.name] end From a1d23e80badccc407d6b289d1c366ff2888812b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 07:31:34 +0000 Subject: [PATCH 020/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index ccf4829..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -291,23 +291,25 @@ SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - --------------------------------------------------------------------------------------------------- + -------------------------------------------------------------------------------------------------- Property Type Description - ---------- ----------------------------- ---------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during startup + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup - opts table or opts should be a table (will be merged with parent specs), - fun(LazyPlugin, opts:table) return a table (replaces parent specs) or should change a - table. The table will be passed to the Plugin.config() - function. Setting this value will imply Plugin.config() + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is set. - Lazy uses several heuristics to determine the plugin’s - MAIN module automatically based on the plugin’s name. See - also opts. To use the default implementation without opts - set config to true. + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). main string? You can specify the main module to use for config() and opts(), in case it can not be determined automatically. @@ -316,7 +318,12 @@ SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. false or a list of build See Building for more information. commands - --------------------------------------------------------------------------------------------------- + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* @@ -1241,6 +1248,8 @@ BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* >lua { "nvim-lua/plenary.nvim", lazy = true } < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. - Only use `dependencies` if a plugin needs the dep to be installed **AND** loaded. Lua plugins/libraries are automatically loaded when they are `require()`d, so they don’t need to be in `dependencies`. From 53661bb38c2b9b9eab84355b549c07b94f334d01 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 5 Jul 2024 16:00:54 +0200 Subject: [PATCH 021/148] ci: update --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/dependabot.yml | 9 +-- .github/workflows/ci.yml | 99 +++------------------------ .github/workflows/community.yml | 30 ++++++++ .github/workflows/docs.yml | 20 ++++++ .github/workflows/labeler.yml | 8 +++ .github/workflows/pr.yml | 18 +++++ .github/workflows/stale.yml | 10 +++ .gitignore | 13 ++-- tests/run => scripts/test | 2 +- 10 files changed, 105 insertions(+), 105 deletions(-) create mode 100644 .github/workflows/community.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/pr.yml create mode 100644 .github/workflows/stale.yml rename tests/run => scripts/test (78%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4a77601..7f1e1ed 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -75,6 +75,7 @@ body: -- install plugins local plugins = { "folke/tokyonight.nvim", + -- add any other plugins here } require("lazy").setup(plugins, { diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0d08e26..5ace460 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,6 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - version: 2 updates: - - package-ecosystem: "github-actions" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "github-actions" + directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a2ed40..b88337a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,96 +1,15 @@ name: CI + on: push: + branches: [main, master] pull_request: jobs: - tests: - strategy: - matrix: - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Install Neovim - shell: bash - run: | - mkdir -p /tmp/nvim - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage - cd /tmp/nvim - chmod a+x ./nvim.appimage - ./nvim.appimage --appimage-extract - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH - - name: Run Tests - run: | - nvim --version - [ ! -d tests ] && exit 0 - ./tests/run - docs: - runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} - needs: tests - env: - GH_TOKEN: ${{ github.token }} - steps: - - uses: actions/checkout@v4 - with: - ref: docs - - name: Generate Docs - shell: bash - run: gh workflow run "Deploy to Github Pages" --ref docs - community: - runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} - steps: - - uses: actions/checkout@v4 - - name: Install Neovim - shell: bash - run: | - mkdir -p /tmp/nvim - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage - cd /tmp/nvim - chmod a+x ./nvim.appimage - ./nvim.appimage --appimage-extract - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH - - name: Rockspec Build - id: rockspec-build - uses: actions/cache@v4 - with: - path: build - key: rockspec-build - - name: Generate Rockspec - if: steps.rockspec-build.cache-hit != 'true' - run: | - nvim -l lua/lazy/build.lua - - name: Push changes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "chore(build): auto-generate rockspec mappings" - commit_user_name: "github-actions[bot]" - commit_user_email: "github-actions[bot]@users.noreply.github.com" - commit_author: "github-actions[bot] " - release: - name: release - if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} - needs: - - tests - - docs - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - config-file: .github/release-please-config.json - manifest-file: .github/.release-please-manifest.json - - uses: actions/checkout@v4 - - name: tag stable versions - if: ${{ steps.release.outputs.release_created }} - run: | - git config user.name github-actions[bot] - git config user.email github-actions[bot]@users.noreply.github.com - git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" - git tag -d stable || true - git push origin :stable || true - git tag -a stable -m "Last Stable Release" - git push origin stable + ci: + uses: folke/github/.github/workflows/ci.yml@main + secrets: inherit + with: + plugin: lazy.nvim + repo: folke/lazy.nvim + tests: true diff --git a/.github/workflows/community.yml b/.github/workflows/community.yml new file mode 100644 index 0000000..85d3248 --- /dev/null +++ b/.github/workflows/community.yml @@ -0,0 +1,30 @@ +name: Community +on: + push: + branches: + - main + +jobs: + community: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} + steps: + - uses: actions/checkout@v4 + - uses: folke/github/neovim@main + - name: Rockspec Build + id: rockspec-build + uses: actions/cache@v4 + with: + path: build + key: rockspec-build + - name: Generate Rockspec + if: steps.rockspec-build.cache-hit != 'true' + run: | + nvim -l lua/lazy/build.lua + - name: Push changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore(build): auto-generate rockspec mappings" + commit_user_name: "github-actions[bot]" + commit_user_email: "github-actions[bot]@users.noreply.github.com" + commit_author: "github-actions[bot] " diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..ee5e7c9 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,20 @@ +name: Docs +on: + push: + branches: + - main + +jobs: + docs: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} + needs: tests + env: + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v4 + with: + ref: docs + - name: Generate Docs + shell: bash + run: gh workflow run "Deploy to Github Pages" --ref docs diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..0908727 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,8 @@ +name: "PR Labeler" +on: + - pull_request_target + +jobs: + labeler: + uses: folke/github/.github/workflows/labeler.yml@main + secrets: inherit diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..6d9df36 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,18 @@ +name: PR Title + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + - ready_for_review + +permissions: + pull-requests: read + +jobs: + pr-title: + uses: folke/github/.github/workflows/pr.yml@main + secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..a0c704b --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,10 @@ +name: Stale Issues & PRs + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + ci: + uses: folke/github/.github/workflows/stale.yml@main + secrets: inherit diff --git a/.gitignore b/.gitignore index 7217496..2b0bb7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ -tt.* -.tests -doc/tags -debug -.repro -foo.* *.log -data +.repro +.tests build +debug +doc/tags +foo.* +tt.* diff --git a/tests/run b/scripts/test similarity index 78% rename from tests/run rename to scripts/test index f1399de..4baf621 100755 --- a/tests/run +++ b/scripts/test @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/env bash nvim -l tests/minit.lua --busted tests -o utfTerminal "$@" From 6186b3de3e1be15f3dc95fcf7c5ec121b69cbc52 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 5 Jul 2024 16:03:08 +0200 Subject: [PATCH 022/148] ci: add generated files to .styluaignore --- .styluaignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .styluaignore diff --git a/.styluaignore b/.styluaignore new file mode 100644 index 0000000..0ad920d --- /dev/null +++ b/.styluaignore @@ -0,0 +1 @@ +lua/lazy/community/_generated.lua From 61c7156b57191b8c90fb168dc22506b9482d52be Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 5 Jul 2024 14:04:23 +0000 Subject: [PATCH 023/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..89fb0a4 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 05 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From d0c00e697a8202dae764d2cc5d9392cf50639515 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 5 Jul 2024 16:04:28 +0200 Subject: [PATCH 024/148] ci: remove tests dep --- .github/workflows/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee5e7c9..4b0363f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,7 +8,6 @@ jobs: docs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }} - needs: tests env: GH_TOKEN: ${{ github.token }} steps: From 40e08f2b8a7ce27f20c339767ecdfa78e5250cc4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 14:05:18 +0000 Subject: [PATCH 025/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 89fb0a4..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 05 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 6ca23c15f64e88e3ba26be9795343c4c7f2ee851 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:13:11 +0200 Subject: [PATCH 026/148] chore(main): release 11.10.1 (#1612) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d58642f..e6cb8da 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.10.0" + ".": "11.10.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ad34e..97a2b89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.10.1](https://github.com/folke/lazy.nvim/compare/v11.10.0...v11.10.1) (2024-07-05) + + +### Bug Fixes + +* **lockfile:** keep cond=false and enabed=false in lockfile. Fixes [#1535](https://github.com/folke/lazy.nvim/issues/1535). Fixes [#1606](https://github.com/folke/lazy.nvim/issues/1606) ([baac551](https://github.com/folke/lazy.nvim/commit/baac5517770abd6eee63d11cf4791ef5bf5702e8)) + ## [11.10.0](https://github.com/folke/lazy.nvim/compare/v11.9.2...v11.10.0) (2024-07-04) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 28e942c..3bcb5ae 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.10.0" -- x-release-please-version +M.version = "11.10.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 11e802dbaa5d33a3c49cae73708aa160c3601b6e Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 5 Jul 2024 14:13:53 +0000 Subject: [PATCH 027/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..89fb0a4 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 05 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 894cd193e9ffc05dcb75ff0093c1b72880d5d9c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 14:13:57 +0000 Subject: [PATCH 028/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 89fb0a4..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 05 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 538f060e42d60dedf058d478cc410c6b193bf188 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 5 Jul 2024 19:02:48 +0200 Subject: [PATCH 029/148] ci: update --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - .github/ISSUE_TEMPLATE/config.yml | 5 +++++ .github/PULL_REQUEST_TEMPLATE.md | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7f1e1ed..4a77601 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -75,7 +75,6 @@ body: -- install plugins local plugins = { "folke/tokyonight.nvim", - -- add any other plugins here } require("lazy").setup(plugins, { diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..d6851ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question or start a discussion + url: https://github.com/folke/lazy.nvim/discussions + about: Use Github discussions instead diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..c064b8c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +## What is this PR for? + + + +## Does this PR fix an existing issue? + + + From 94b6b6703129bb659220720515655d2eaf36cbc3 Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 5 Jul 2024 17:03:29 +0000 Subject: [PATCH 030/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..89fb0a4 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 05 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From d901d2166fef0304e360316e7a04316f11ab62d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 17:03:38 +0000 Subject: [PATCH 031/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 89fb0a4..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 05 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From c3a9cec06b62c7fbd896644c13840f18fcc79e67 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 11:45:24 +0200 Subject: [PATCH 032/148] ci: update --- .github/workflows/update.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..2177a50 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,12 @@ +name: Update Repo + +on: + workflow_dispatch: + schedule: + # Run every hour + - cron: "0 * * * *" + +jobs: + ci: + uses: folke/github/.github/workflows/update.yml@main + secrets: inherit From e3154ff0b7055f1bcded818d52cb518cac899ee8 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 6 Jul 2024 09:48:26 +0000 Subject: [PATCH 033/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..cb18dda 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 06 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From c060de160a3cebb658969852d843915bc73a11ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:00:16 +0200 Subject: [PATCH 034/148] chore(update): update repository (#1616) 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> --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d6851ed..8dba2f4 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - - name: Ask a question or start a discussion + - name: Ask a question url: https://github.com/folke/lazy.nvim/discussions about: Use Github discussions instead From 16ccd54360651ad2b27ee0117365f7a33577ea3c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jul 2024 13:01:02 +0000 Subject: [PATCH 035/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index cb18dda..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 06 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 49a35d3c8c7f9cfe6eede9d351953c8ef17fcd35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jul 2024 18:05:10 +0200 Subject: [PATCH 036/148] chore(update): update repository (#1618) 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> --- .github/PULL_REQUEST_TEMPLATE.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c064b8c..3f7c92e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,16 @@ -## What is this PR for? +## Description -## Does this PR fix an existing issue? +## Related Issue(s) +## Screenshots + + + From 1e7745a4a078b7e58ae673ca5a374e4439f443d1 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 6 Jul 2024 16:05:47 +0000 Subject: [PATCH 037/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..cb18dda 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 06 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 0ff7e83c17c6eef181116954761ee8ed84db88a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jul 2024 16:05:52 +0000 Subject: [PATCH 038/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index cb18dda..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 06 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From e6035dc59bcd71c395b1a39f15e418acc94e789a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:18:28 +0200 Subject: [PATCH 039/148] ci: update --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b88337a..60f92cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,4 +12,3 @@ jobs: with: plugin: lazy.nvim repo: folke/lazy.nvim - tests: true From 23ea80b6a3230070989a730f6ba921a75d7d7057 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:19:48 +0200 Subject: [PATCH 040/148] ci: update --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2b0bb7a..61ab828 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build debug doc/tags foo.* +node_modules tt.* From 55b46b3993df75b015b8e294a8e5a244e8df415b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:45:30 +0200 Subject: [PATCH 041/148] ci: update --- .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 61ab828..771c835 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ *.log -.repro -.tests -build -debug -doc/tags +/.repro +/.tests +/build +/debug +/doc/tags foo.* node_modules tt.* From 933f0b596c7372daf534373ae9a11e98744b8636 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 6 Jul 2024 21:46:26 +0000 Subject: [PATCH 042/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..cb18dda 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 06 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 81d2bfffdc8c84a40d25cae7fd4800178c19a138 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 7 Jul 2024 08:42:19 +0200 Subject: [PATCH 043/148] fix(git): only check for new commits for local plugins. Closes #1512 --- lua/lazy/manage/git.lua | 8 ++++++++ lua/lazy/manage/task/git.lua | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/lazy/manage/git.lua b/lua/lazy/manage/git.lua index a365824..201e4e7 100644 --- a/lua/lazy/manage/git.lua +++ b/lua/lazy/manage/git.lua @@ -148,6 +148,14 @@ function M.get_target(plugin) return { branch = branch, commit = M.get_commit(plugin.dir, branch, true) } end +---@param plugin LazyPlugin +---@return GitInfo? +function M.get_local_target(plugin) + local info = M.info(plugin.dir) + local branch = assert(info and info.branch or M.get_branch(plugin)) + return { branch = branch, commit = M.get_commit(plugin.dir, branch, true) } +end + function M.ref(repo, ...) local ref = table.concat({ ... }, "/") diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 774df16..8e0ef48 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -36,7 +36,7 @@ M.log = { table.insert(args, self.plugin._.updated.from .. ".." .. (self.plugin._.updated.to or "HEAD")) elseif opts.check then local info = assert(Git.info(self.plugin.dir)) - local target = assert(Git.get_target(self.plugin)) + local target = assert(self.plugin._.is_local and Git.get_local_target(self.plugin) or Git.get_target(self.plugin)) if not target.commit then for k, v in pairs(target) do error(k .. " '" .. v .. "' not found") From 23aeb224edf9c8da9e5613af0218f5a5380283d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 06:43:02 +0000 Subject: [PATCH 044/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index cb18dda..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 06 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 89b264ac1d3c9752b22d4e61d16dc408a75d2a16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:44:37 +0200 Subject: [PATCH 045/148] chore(main): release 11.10.2 (#1621) :robot: I have created a release *beep* *boop* --- ## [11.10.2](https://github.com/folke/lazy.nvim/compare/v11.10.1...v11.10.2) (2024-07-07) ### Bug Fixes * **git:** only check for new commits for local plugins. Closes [#1512](https://github.com/folke/lazy.nvim/issues/1512) ([81d2bff](https://github.com/folke/lazy.nvim/commit/81d2bfffdc8c84a40d25cae7fd4800178c19a138)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index e6cb8da..9441643 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.10.1" + ".": "11.10.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a2b89..b265fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.10.2](https://github.com/folke/lazy.nvim/compare/v11.10.1...v11.10.2) (2024-07-07) + + +### Bug Fixes + +* **git:** only check for new commits for local plugins. Closes [#1512](https://github.com/folke/lazy.nvim/issues/1512) ([81d2bff](https://github.com/folke/lazy.nvim/commit/81d2bfffdc8c84a40d25cae7fd4800178c19a138)) + ## [11.10.1](https://github.com/folke/lazy.nvim/compare/v11.10.0...v11.10.1) (2024-07-05) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 3bcb5ae..f1eff9c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.10.1" -- x-release-please-version +M.version = "11.10.2" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 083f3dfb5e5ef7e53fccd0d7d71c32aae7d93a16 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 7 Jul 2024 06:45:23 +0000 Subject: [PATCH 046/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..b3fad77 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 07 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 25026d23822bf95b1f7a1ad2a8541a190c8f7b30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 06:45:25 +0000 Subject: [PATCH 047/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index b3fad77..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 07 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From c771cf4928d1a1428ac7461658ab2916ed48adf5 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 7 Jul 2024 06:46:59 +0000 Subject: [PATCH 048/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..b3fad77 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 07 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 72c0dc9462ab3bf1a68198afabc1eb4e2940d299 Mon Sep 17 00:00:00 2001 From: Andre Toerien Date: Sun, 7 Jul 2024 17:13:49 +0200 Subject: [PATCH 049/148] fix(git): local plugin fixes (#1624) ## Description As I described in https://github.com/folke/lazy.nvim/pull/1512#issuecomment-2212474372, this makes it so that local plugins will only show as needing updates if the local branch is behind the upstream branch. This is done by checking the output of the `git log` command, and only setting `plugin._.updates` if the output is not empty. This seems to solve my issue where local plugins with unpushed changes always show as needing updates, but if there's a easier/better way of doing it then please feel free to edit/close this. Or if you don't agree that the current behaviour is a bug, then that's also fine - it's not a big deal and I can easily just ignore the "updates available" notice. I also came across a minor issue where the plugin diff view (press `d`) compares the wrong commits for local plugins, because [lua/lazy/view/init.lua](https://github.com/folke/lazy.nvim/blob/c771cf4928d1a1428ac7461658ab2916ed48adf5/lua/lazy/view/init.lua#L268) always uses `get_target`. I fixed this by moving `get_local_target` into `get_target` - I think this is simpler and more straightforward than the alternative of adding a ternary everywhere `get_target` is called. This second bugfix is a very small change, so I've just included it here, but I'm happy to make a second PR if you'd like. ## Related Issue(s) Related PR: #1512 --- lua/lazy/manage/checker.lua | 4 +++- lua/lazy/manage/git.lua | 15 ++++++--------- lua/lazy/manage/task/git.lua | 30 +++++++++++++++++++++--------- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/lua/lazy/manage/checker.lua b/lua/lazy/manage/checker.lua index 8e03d9e..6efc5a7 100644 --- a/lua/lazy/manage/checker.lua +++ b/lua/lazy/manage/checker.lua @@ -35,7 +35,9 @@ end function M.fast_check(opts) opts = opts or {} for _, plugin in pairs(Config.plugins) do - if not plugin.pin and not plugin.dev and plugin._.installed then + -- don't check local plugins here, since we mark them as needing updates + -- only if local is behind upstream (if the git log task gives no output) + if plugin._.installed and not (plugin.pin or plugin._.is_local) then plugin._.updates = nil local info = Git.info(plugin.dir) local ok, target = pcall(Git.get_target, plugin) diff --git a/lua/lazy/manage/git.lua b/lua/lazy/manage/git.lua index 201e4e7..ef68cc7 100644 --- a/lua/lazy/manage/git.lua +++ b/lua/lazy/manage/git.lua @@ -116,6 +116,12 @@ end ---@param plugin LazyPlugin ---@return GitInfo? function M.get_target(plugin) + if plugin._.is_local then + local info = M.info(plugin.dir) + local branch = assert(info and info.branch or M.get_branch(plugin)) + return { branch = branch, commit = M.get_commit(plugin.dir, branch, true) } + end + local branch = assert(M.get_branch(plugin)) if plugin.commit then @@ -144,15 +150,6 @@ function M.get_target(plugin) } end end - ---@diagnostic disable-next-line: return-type-mismatch - return { branch = branch, commit = M.get_commit(plugin.dir, branch, true) } -end - ----@param plugin LazyPlugin ----@return GitInfo? -function M.get_local_target(plugin) - local info = M.info(plugin.dir) - local branch = assert(info and info.branch or M.get_branch(plugin)) return { branch = branch, commit = M.get_commit(plugin.dir, branch, true) } end diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 8e0ef48..9425fec 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -32,11 +32,13 @@ M.log = { "--no-show-signature", } + local info, target + if opts.updated then table.insert(args, self.plugin._.updated.from .. ".." .. (self.plugin._.updated.to or "HEAD")) elseif opts.check then - local info = assert(Git.info(self.plugin.dir)) - local target = assert(self.plugin._.is_local and Git.get_local_target(self.plugin) or Git.get_target(self.plugin)) + info = assert(Git.info(self.plugin.dir)) + target = assert(Git.get_target(self.plugin)) if not target.commit then for k, v in pairs(target) do error(k .. " '" .. v .. "' not found") @@ -44,15 +46,17 @@ M.log = { error("no target commit found") end assert(target.commit, self.plugin.name .. " " .. target.branch) - if Git.eq(info, target) then - if Config.options.checker.check_pinned then - local last_commit = Git.get_commit(self.plugin.dir, target.branch, true) - if not Git.eq(info, { commit = last_commit }) then - self.plugin._.outdated = true + if not self.plugin._.is_local then + if Git.eq(info, target) then + if Config.options.checker.check_pinned then + local last_commit = Git.get_commit(self.plugin.dir, target.branch, true) + if not Git.eq(info, { commit = last_commit }) then + self.plugin._.outdated = true + end end + else + self.plugin._.updates = { from = info, to = target } end - else - self.plugin._.updates = { from = info, to = target } end table.insert(args, info.commit .. ".." .. target.commit) else @@ -63,6 +67,14 @@ M.log = { args = args, cwd = self.plugin.dir, }) + + -- for local plugins, mark as needing updates only if local is + -- behind upstream, i.e. if git log gave no output + if opts.check and self.plugin._.is_local then + if not vim.tbl_isempty(self:get_log()) then + self.plugin._.updates = { from = info, to = target } + end + end end, } From 93c9a3f872153247cef14f095d2d037b7c93704f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 15:14:44 +0000 Subject: [PATCH 050/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index b3fad77..73bd0ae 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 07 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during. Mostly useful + for setting vim.g.* configuration used by Vim plugins + startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 436d09af7d3d9e1ff39dc2cf51be800a7ab45be9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 15:15:37 +0000 Subject: [PATCH 051/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 73bd0ae..c2c9695 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -294,9 +294,9 @@ SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* -------------------------------------------------------------------------------------------------- Property Type Description ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during. Mostly useful - for setting vim.g.* configuration used by Vim plugins - startup + init fun(LazyPlugin) init functions are always executed during startup. Mostly + useful for setting vim.g.* configuration used by Vim + plugins startup opts table or opts should be a table (will be merged with parent fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should From a6daaf68a2805ac9180b835f09de5ca5d5cf8993 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 21:25:12 +0200 Subject: [PATCH 052/148] chore(main): release 11.10.3 (#1625) :robot: I have created a release *beep* *boop* --- ## [11.10.3](https://github.com/folke/lazy.nvim/compare/v11.10.2...v11.10.3) (2024-07-07) ### Bug Fixes * **git:** local plugin fixes ([#1624](https://github.com/folke/lazy.nvim/issues/1624)) ([72c0dc9](https://github.com/folke/lazy.nvim/commit/72c0dc9462ab3bf1a68198afabc1eb4e2940d299)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 9441643..5d18bbe 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.10.2" + ".": "11.10.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b265fe9..b09ee5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.10.3](https://github.com/folke/lazy.nvim/compare/v11.10.2...v11.10.3) (2024-07-07) + + +### Bug Fixes + +* **git:** local plugin fixes ([#1624](https://github.com/folke/lazy.nvim/issues/1624)) ([72c0dc9](https://github.com/folke/lazy.nvim/commit/72c0dc9462ab3bf1a68198afabc1eb4e2940d299)) + ## [11.10.2](https://github.com/folke/lazy.nvim/compare/v11.10.1...v11.10.2) (2024-07-07) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index f1eff9c..083db1c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.10.2" -- x-release-please-version +M.version = "11.10.3" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 44cd12fa2709a4de644b1d7c2773d5c59df07a66 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 7 Jul 2024 19:26:10 +0000 Subject: [PATCH 053/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index c2c9695..b3fad77 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 07 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during startup. Mostly - useful for setting vim.g.* configuration used by Vim - plugins startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 2dfccd7b948beb26d8bcff7f9113a3a5c85cbc4a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 8 Jul 2024 07:28:02 +0200 Subject: [PATCH 054/148] fix(ui): don't treat suspended as headless. Closes #1626 --- lua/lazy/core/config.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 083db1c..233b1fc 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -253,9 +253,10 @@ M.mapleader = nil ---@type string M.maplocalleader = nil -local headless = #vim.api.nvim_list_uis() == 0 +M.suspended = false + function M.headless() - return headless + return not M.suspended and #vim.api.nvim_list_uis() == 0 end ---@param opts? LazyConfig @@ -338,6 +339,12 @@ function M.setup(opts) end end, }) + + vim.api.nvim_create_autocmd({ "VimSuspend", "VimResume" }, { + callback = function(ev) + M.suspended = ev.event == "VimSuspend" + end, + }) end, }) end From 0002bfbd9ffba015f65955027799adba2634d220 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 8 Jul 2024 05:28:57 +0000 Subject: [PATCH 055/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index b3fad77..c2c9695 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 07 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during startup. Mostly + useful for setting vim.g.* configuration used by Vim + plugins startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From f0324defdd43be8aa14aaf3a794ff3d5581f36ba Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 8 Jul 2024 07:45:43 +0200 Subject: [PATCH 056/148] fix(rocks): try building anyway even when prerequisits have not been met. (will likely fail) --- lua/lazy/manage/task/fs.lua | 11 +++++-- lua/lazy/pkg/rockspec.lua | 57 +++++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/lua/lazy/manage/task/fs.lua b/lua/lazy/manage/task/fs.lua index 3401c29..41a18a8 100644 --- a/lua/lazy/manage/task/fs.lua +++ b/lua/lazy/manage/task/fs.lua @@ -21,16 +21,23 @@ M.clean = { skip = function(plugin) return plugin._.is_local end, - run = function(self) + ---@param opts? {rocks_only?:boolean} + 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!") - rm(dir) local rock_root = Config.options.rocks.root .. "/" .. self.plugin.name if vim.uv.fs_stat(rock_root) then rm(rock_root) end + if opts.rocks_only then + return + end + + rm(dir) + self.plugin._.installed = false end, } diff --git a/lua/lazy/pkg/rockspec.lua b/lua/lazy/pkg/rockspec.lua index e1d2c6e..19d580d 100644 --- a/lua/lazy/pkg/rockspec.lua +++ b/lua/lazy/pkg/rockspec.lua @@ -78,25 +78,23 @@ function M.check(opts) else ok = Health.have(M.python, opts) ok = Health.have(M.hererocks.bin("luarocks")) and ok - ok = Health.have( + Health.have( M.hererocks.bin("lua"), vim.tbl_extend("force", opts, { version = "-v", version_pattern = "5.1", }) - ) and ok + ) end else ok = Health.have("luarocks", opts) - ok = ( - Health.have( - { "lua5.1", "lua", "lua-5.1" }, - vim.tbl_extend("force", opts, { - version = "-v", - version_pattern = "5.1", - }) - ) - ) and ok + Health.have( + { "lua5.1", "lua", "lua-5.1" }, + vim.tbl_extend("force", opts, { + version = "-v", + version_pattern = "5.1", + }) + ) end return ok end @@ -104,17 +102,17 @@ end ---@async ---@param task LazyTask function M.build(task) - if - not M.check({ - error = function(msg) - task:error(msg:gsub("[{}]", "`")) - end, - warn = function(msg) - task:warn(msg) - end, - ok = function(msg) end, - }) - then + M.check({ + error = function(msg) + task:error(msg:gsub("[{}]", "`")) + end, + warn = function(msg) + task:warn(msg) + end, + ok = function(msg) end, + }) + + if task:has_warnings() then task:log({ "", "This plugin requires `luarocks`. Try one of the following:", @@ -123,7 +121,11 @@ function M.build(task) or " - enable `hererocks` with `opts.rocks.hererocks = true`", " - disable `luarocks` support completely with `opts.rocks.enabled = false`", }) - return + task:warn("\nWill try building anyway, but will likely fail...") + + task:warn("\n" .. string.rep("-", 80) .. "\n") + + task:set_level(vim.log.levels.WARN) end if task.plugin.name == "hererocks" then @@ -187,11 +189,13 @@ function M.build(task) return end - task:warn("Failed installing " .. rockspec.package .. " with `luarocks`.\nTrying to build from source.") + task:warn("Failed installing " .. rockspec.package .. " with `luarocks`.") + task:warn("\n" .. string.rep("-", 80) .. "\n") + task:warn("Trying to build from source.") -- install failed, so try building from source task:set_level() -- reset level - task:spawn(luarocks, { + ok = task:spawn(luarocks, { args = { "--tree", root, @@ -206,6 +210,9 @@ function M.build(task) cwd = task.plugin.dir, env = env, }) + if not ok then + require("lazy.manage.task.fs").clean.run(task, { rocks_only = true }) + end end ---@param rockspec RockSpec From a4c473cc2d30717a211f1bef4f99b0b6f9914efa Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 8 Jul 2024 05:46:33 +0000 Subject: [PATCH 057/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index c2c9695..476bdf7 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 08 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during startup. Mostly - useful for setting vim.g.* configuration used by Vim - plugins startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From f918318d21956b0874a65ab35ce3d94d9057aabf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:52:50 +0200 Subject: [PATCH 058/148] chore(main): release 11.10.4 (#1628) :robot: I have created a release *beep* *boop* --- ## [11.10.4](https://github.com/folke/lazy.nvim/compare/v11.10.3...v11.10.4) (2024-07-08) ### Bug Fixes * **rocks:** try building anyway even when prerequisits have not been met. (will likely fail) ([f0324de](https://github.com/folke/lazy.nvim/commit/f0324defdd43be8aa14aaf3a794ff3d5581f36ba)) * **ui:** don't treat suspended as headless. Closes [#1626](https://github.com/folke/lazy.nvim/issues/1626) ([2dfccd7](https://github.com/folke/lazy.nvim/commit/2dfccd7b948beb26d8bcff7f9113a3a5c85cbc4a)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 5d18bbe..a2f63d1 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.10.3" + ".": "11.10.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b09ee5d..3ed551f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [11.10.4](https://github.com/folke/lazy.nvim/compare/v11.10.3...v11.10.4) (2024-07-08) + + +### Bug Fixes + +* **rocks:** try building anyway even when prerequisits have not been met. (will likely fail) ([f0324de](https://github.com/folke/lazy.nvim/commit/f0324defdd43be8aa14aaf3a794ff3d5581f36ba)) +* **ui:** don't treat suspended as headless. Closes [#1626](https://github.com/folke/lazy.nvim/issues/1626) ([2dfccd7](https://github.com/folke/lazy.nvim/commit/2dfccd7b948beb26d8bcff7f9113a3a5c85cbc4a)) + ## [11.10.3](https://github.com/folke/lazy.nvim/compare/v11.10.2...v11.10.3) (2024-07-07) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 233b1fc..c50b9c5 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.10.3" -- x-release-please-version +M.version = "11.10.4" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 1870238cf9c579c5d7eb8ea8b296f10b81978d34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 8 Jul 2024 05:53:40 +0000 Subject: [PATCH 059/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 476bdf7..c2c9695 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 08 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during startup. Mostly + useful for setting vim.g.* configuration used by Vim + plugins startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From fadebdc76b71a1d3658a88a025c6c8fb4749e0f8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 9 Jul 2024 15:02:18 +0200 Subject: [PATCH 060/148] fix(minit): add tests to package.path when running busted (helpers.lua etc) --- lua/lazy/minit.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazy/minit.lua b/lua/lazy/minit.lua index 838ac36..6300730 100644 --- a/lua/lazy/minit.lua +++ b/lua/lazy/minit.lua @@ -99,6 +99,7 @@ function M.busted.run() if not require("lazy.core.config").headless() then return vim.notify("busted can only run in headless mode. Please run with `nvim -l`", vim.log.levels.WARN) end + package.path = package.path .. ";" .. vim.uv.cwd() .. "/tests/?.lua" -- run busted return pcall(require("busted.runner"), { standalone = false, From 159036c5762a97246689299e61311fc88523a8fa Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 9 Jul 2024 13:03:11 +0000 Subject: [PATCH 061/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 ++------------------------------------------- 1 file changed, 46 insertions(+), 1352 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index c2c9695..f2ef56a 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,130 +1,61 @@ -*lazy.nvim.txt* A modern plugin manager for Neovim +*lazy.nvim.txt* For Neovim Last change: 2024 July 09 ============================================================================== Table of Contents *lazy.nvim-table-of-contents* -1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| - - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| -2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| - - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| - - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| -3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| - - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| - - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| -4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| - - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| - - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| - - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| - - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| - - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| - - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| - - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| - - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| - - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| -5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| - - Lazy |lazy.nvim-πŸ“¦-packages-lazy| - - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| - - Packspec |lazy.nvim-πŸ“¦-packages-packspec| -6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| - - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| -7. πŸš€ Usage |lazy.nvim-πŸš€-usage| - - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| - - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| - - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| - - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| - - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| - - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| - - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| - - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| -8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| - - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| - - Building |lazy.nvim-πŸ”₯-developers-building| - - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| -9. Links |lazy.nvim-links| - -============================================================================== -1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* + - Features |lazy.nvim-features| + - Requirements |lazy.nvim-requirements| + - Getting Started |lazy.nvim-getting-started| +1. Links |lazy.nvim-links| +Install +Β· +Configure +Β· +Docs + + + + + + + + + + + + + + -11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* - -- **New Website**: There’s a whole new website with a fresh look and improved - documentation. Check it out at . The GitHub `README.md` - has been updated to point to the new website. The `vimdoc` contains all the - information that is available on the website. -- **Spec Resolution & Merging**: the code that resolves a final spec from a - plugin’s fragments has been rewritten. This should be a tiny bit faster, but - more importantly, fixes some issues and is easier to maintain. -- Packages can now specify their dependencies - and configuration using one of: - - **Lazy**: `lazy.lua` file - - **Rockspec**: luarocks `*-scm-1.rockspec` file - - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - Related _lazy.nvim_ options: - >lua - { - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", -- will only be used when rocks.enabled is true - "packspec", - }, - }, - rocks = { - enabled = true, - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - } - < -- Installing neorg is now as simple as: - >lua - { "nvim-neorg/neorg", opts = {} } - < -- Packages are not limited to just Neovim plugins. You can install any - **luarocks** package, like: - >lua - { "https://github.com/lubyk/yaml" } - < - Luarocks packages without a `/lua` directory are never lazy-loaded, since - it’s just a library. -- `build` functions or `*.lua` build files (like `build.lua`) now run - asynchronously. You can use `coroutine.yield(status_msg)` to show progress. - Yielding will also schedule the next `resume` to run in the next tick, so you - can do long-running tasks without blocking Neovim. -============================================================================== -2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* +FEATURES *lazy.nvim-features* -- πŸ“¦ Manage all your Neovim plugins with a powerful UI -- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- πŸ’Ύ Partial clones instead of shallow clones -- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- πŸ’ͺ Async execution for improved performance -- πŸ› οΈ No need to manually compile plugins -- πŸ§ͺ Correct sequencing of dependencies -- πŸ“ Configurable in multiple files -- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- πŸ’» Dev options and patterns for using local plugins -- πŸ“Š Profiling tools to optimize performance -- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins -- πŸ”Ž Automatically check for updates -- πŸ“‹ Commit, branch, tag, version, and full Semver support -- πŸ“ˆ Statusline component to see the number of pending updates -- 🎨 Automatically lazy-loads colorschemes +- Manage all your Neovim plugins with a powerful UI +- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- Partial clones instead of shallow clones +- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- Async execution for improved performance +- No need to manually compile plugins +- Correct sequencing of dependencies +- Configurable in multiple files +- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- Dev options and patterns for using local plugins +- Profiling tools to optimize performance +- Lockfile `lazy-lock.json` to keep track of installed plugins +- Automatically check for updates +- Commit, branch, tag, version, and full Semver support +- Statusline component to see the number of pending updates +- Automatically lazy-loads colorschemes -⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* +REQUIREMENTS *lazy.nvim-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -133,1251 +64,14 @@ Table of Contents *lazy.nvim-table-of-contents* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -============================================================================== -3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* - -There are multiple ways to install **lazy.nvim**. The **Structured Setup** is -the recommended way, but you can also use the **Single File Setup** if you -prefer to keep everything in your `init.lua`. - -Please refer to the Configuration section for an overview of -all available options. - - - - -STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* - ->lua - require("config.lazy") -< - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< - -You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each -file should return a table with the plugins you want to install. - -For more info see Structuring Your Plugins - - -SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* - ->lua - -- Bootstrap lazy.nvim - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end - end - vim.opt.rtp:prepend(lazypath) - - -- Make sure to setup `mapleader` and `maplocalleader` before - -- loading lazy.nvim so that mappings are correct. - -- This is also a good place to setup other settings (vim.opt) - vim.g.mapleader = " " - vim.g.maplocalleader = "\\" - - -- Setup lazy.nvim - require("lazy").setup({ - -- highlight-start - spec = { - -- add your plugins here - }, - -- highlight-end - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - }) -< +GETTING STARTED *lazy.nvim-getting-started* +Check the documentation website for more information. ============================================================================== -4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* - - -SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* - - ----------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------- - [1] string? Short plugin url. Will be expanded using - config.git.url_format. Can also be a url or dir. - - dir string? A directory pointing to a local plugin - - url string? A custom git url where the plugin is hosted - - name string? A custom name for the plugin used for the local plugin - directory and as the display name - - dev boolean? When true, a local plugin directory will be used instead. See - config.dev - ----------------------------------------------------------------------------------- -A valid spec should define one of `[1]`, `dir` or `url`. - - -SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* - - -------------------------------------------------------------------------------------------------- - Property Type Description - -------------- ------------------------- --------------------------------------------------------- - dependencies LazySpec[] A list of plugin names or plugin specs that should be - loaded when the plugin loads. Dependencies are always - lazy-loaded unless specified otherwise. When specifying a - name, make sure the plugin spec has been defined - somewhere else. - - enabled boolean? or fun():boolean When false, or if the function returns false, then this - plugin will not be included in the spec - - cond boolean? or Behaves the same as enabled, but won’t uninstall the - fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable - some plugins in vscode, or firenvim for example. - - priority number? Only useful for start plugins (lazy=false) to force - loading certain plugins first. Default priority is 50. - It’s recommended to set this to a high number for - colorschemes. - -------------------------------------------------------------------------------------------------- - -SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* - - -------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ----------------------------- --------------------------------------------------------- - init fun(LazyPlugin) init functions are always executed during startup. Mostly - useful for setting vim.g.* configuration used by Vim - plugins startup - - opts table or opts should be a table (will be merged with parent - fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should - change a table. The table will be passed to the - Plugin.config() function. Setting this value will imply - Plugin.config() - - config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default - or true implementation will automatically run - require(MAIN).setup(opts) if opts or config = true is - set. Lazy uses several heuristics to determine the - plugin’s MAIN module automatically based on the plugin’s - name. (opts is the recommended way to configure plugins). - - main string? You can specify the main module to use for config() and - opts(), in case it can not be determined automatically. - See config() - - build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. - false or a list of build See Building for more information. - commands - -------------------------------------------------------------------------------------------------- -Always use `opts` instead of `config` when possible. `config` is almost never -needed. - - - - -SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* - - -------------------------------------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------------------------------------------------------------- ---------------------------------------- - lazy boolean? When true, the plugin will only be - loaded when needed. Lazy-loaded plugins - are automatically loaded when their Lua - modules are required, or when one of the - lazy-loading handlers triggers - - event string? or string[] or Lazy-load on event. Events can be - fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern - {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua - - cmd string? or string[] or Lazy-load on command - fun(self:LazyPlugin, cmd:string[]):string[] - - ft string? or string[] or Lazy-load on filetype - fun(self:LazyPlugin, ft:string[]):string[] - - keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping - fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] - -------------------------------------------------------------------------------------------------------------------- -Refer to the Lazy Loading <./lazy_loading.md> section for more information. - - -SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* - - ------------------------------------------------------------------------------ - Property Type Description - ------------ -------------------- -------------------------------------------- - branch string? Branch of the repository - - tag string? Tag of the repository - - commit string? Commit of the repository - - version string? or false to Version to use from the repository. Full - override the default Semver ranges are supported - - pin boolean? When true, this plugin will not be included - in updates - - submodules boolean? When false, git submodules will not be - fetched. Defaults to true - ------------------------------------------------------------------------------ -Refer to the Versioning <./versioning.md> section for more information. - - -SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* - - ---------------------------------------------------------------------------------------- - Property Type Description - ---------- ---------- ------------------------------------------------------------------ - optional boolean? When a spec is tagged optional, it will only be included in the - final spec, when the same plugin has been specified at least once - somewhere else without optional. This is mainly useful for Neovim - distros, to allow setting options on plugins that may/may not be - part of the user’s plugins. - - specs LazySpec A list of plugin specs defined in the scope of the plugin. This is - mainly useful for Neovim distros, to allow setting options on - plugins that may/may not be part of the user’s plugins. When the - plugin is disabled, none of the scoped specs will be included in - the final spec. Similar to dependencies without the automatic - loading of the specs. - - module false? Do not automatically load this Lua module when it’s required - somewhere - - import string? Import the given spec module. - ---------------------------------------------------------------------------------------- - -EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* - ->lua - return { - -- the colorscheme should be available when starting Neovim - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - - -- I have a separate config.mappings file where I require which-key. - -- With lazy the plugin will be automatically loaded when it is required somewhere - { "folke/which-key.nvim", lazy = true }, - - { - "nvim-neorg/neorg", - -- lazy-load on filetype - ft = "norg", - -- options for neorg. This will automatically call `require("neorg").setup(opts)` - opts = { - load = { - ["core.defaults"] = {}, - }, - }, - }, - - { - "dstein64/vim-startuptime", - -- lazy-load on a command - cmd = "StartupTime", - -- init is called during startup. Configuration for vim plugins typically should be set in an init function - init = function() - vim.g.startuptime_tries = 10 - end, - }, - - { - "hrsh7th/nvim-cmp", - -- load cmp on InsertEnter - event = "InsertEnter", - -- these dependencies will only be loaded when cmp loads - -- dependencies are always lazy-loaded unless specified otherwise - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - }, - config = function() - -- ... - end, - }, - - -- if some code requires a module from an unloaded plugin, it will be automatically loaded. - -- So for api plugins like devicons, we can always set lazy=true - { "nvim-tree/nvim-web-devicons", lazy = true }, - - -- you can use the VeryLazy event for things that can - -- load later and are not important for the initial UI - { "stevearc/dressing.nvim", event = "VeryLazy" }, - - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - - { - "monaqa/dial.nvim", - -- lazy-load on keys - -- mode is `n` by default. For more advanced options, check the section on key mappings - keys = { "", { "", mode = "n" } }, - }, - - -- local plugins need to be explicitly configured with dir - { dir = "~/projects/secret.nvim" }, - - -- you can use a custom url to fetch a plugin - { url = "git@github.com:folke/noice.nvim.git" }, - - -- local plugins can also be configured with the dev option. - -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub - -- With the dev option, you can easily switch between the local and installed version of a plugin - { "folke/noice.nvim", dev = true }, - } -< - - -LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* - -**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have -a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of -plugin `A`, then plugin `A` will be loaded on demand as expected. - - -Additionally, you can also lazy-load on **events**, **commands**, **file -types** and **key mappings**. - -Plugins will be lazy-loaded when one of the following is `true`: - -- The plugin only exists as a dependency in your spec -- It has an `event`, `cmd`, `ft` or `keys` key -- `config.defaults.lazy == true` - - -🌈 COLORSCHEMES ~ - -Colorscheme plugins can be configured with `lazy=true`. The plugin will -automagically load when doing `colorscheme foobar`. - - - -⌨️ LAZY KEY MAPPINGS ~ - -The `keys` property can be a `string` or `string[]` for simple normal-mode -mappings, or it can be a `LazyKeysSpec` table with the following key-value -pairs: - -- **[1]**: (`string`) lhs **(required)** -- **[2]**: (`string|fun()`) rhs **(optional)** -- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** -- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** -- any other option valid for `vim.keymap.set` - -Key mappings will load the plugin the first time they get executed. - -When `[2]` is `nil`, then the real mapping has to be created by the `config()` -function. - ->lua - -- Example for neo-tree.nvim - { - "nvim-neo-tree/neo-tree.nvim", - keys = { - { "ft", "Neotree toggle", desc = "NeoTree" }, - }, - config = function() - require("neo-tree").setup() - end, - } -< - - -VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* - -If you want to install a specific revision of a plugin, you can use `commit`, -`tag`, `branch`, `version`. - -The `version` property supports Semver ranges. - - - -EXAMPLES ~ - -- `*`: latest stable version (this excludes pre-release versions) -- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. -- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. -- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. -- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. -- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. -- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. -- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc - - -============================================================================== -5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* - -**lazy.nvim** supports three ways for plugins to define their dependencies and -configuration. - -- **Lazy**: `lazy.lua` file -- **Rockspec**: luarocks `*-scm-1.rockspec` file -- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) - -You can enable/disable package sources with `config.pkg.sources` -. The order of sources is important, as the first source that -finds a package will be used. - - - -LAZY *lazy.nvim-πŸ“¦-packages-lazy* - -Using a `lazy.lua` file is the recommended way to define your plugin -dependencies and configuration. Syntax is the same as any plugin spec. - - -ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* - -When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically -build the rock and its dependencies. - -A **rockspec** will only be used if one of the following is true: - -- the package does not have a `/lua` directory -- the package has a complex build step -- the package has dependencies (excluding `lua`) - - -PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* - -Supports the pkg.json - format, with -a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They -will be added to the plugin’s spec. - - -============================================================================== -6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* - -**lazy.nvim** comes with the following defaults: - ->lua - { - root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed - defaults = { - -- Set this to `true` to have all your plugins lazy-loaded by default. - -- Only do this if you know what you are doing, as it can lead to unexpected behavior. - lazy = false, -- should plugins be lazy-loaded? - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = nil, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - -- default `cond` you can use to globally disable a lot of plugins - -- when running inside vscode for example - cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil - }, - -- leave nil when passing the spec as the first argument to setup() - spec = nil, ---@type LazySpec - local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. - lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. - ---@type number? limit the maximum amount of concurrent tasks - concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, - git = { - -- defaults for the `Lazy log` command - -- log = { "--since=3 days ago" }, -- show commits from the last 3 days - log = { "-8" }, -- show the last 8 commits - timeout = 120, -- kill processes that take more than 2 minutes - url_format = "https://github.com/%s.git", - -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, - -- then set the below to false. This should work, but is NOT supported and will - -- increase downloads a lot. - filter = true, - }, - pkg = { - enabled = true, - cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources - -- the first package source that is found for a plugin will be used. - sources = { - "lazy", - "rockspec", - "packspec", - }, - }, - rocks = { - root = vim.fn.stdpath("data") .. "/lazy-rocks", - server = "https://nvim-neorocks.github.io/rocks-binaries/", - }, - dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects - path = "~/projects", - ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub - patterns = {}, -- For example {"folke"} - fallback = false, -- Fallback to git when local plugin doesn't exist - }, - install = { - -- install missing plugins on startup. This doesn't increase startup time. - missing = true, - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "habamax" }, - }, - ui = { - -- a number <1 is a percentage., >1 is a fixed size - size = { width = 0.8, height = 0.8 }, - wrap = true, -- wrap the lines in the ui - -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. - border = "none", - -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. - backdrop = 60, - title = nil, ---@type string only works when border is not "none" - title_pos = "center", ---@type "center" | "left" | "right" - -- Show pills on top of the Lazy window - pills = true, ---@type boolean - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ† ", - favorite = "ο€… ", - ft = "ο€– ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°’² ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - require = "σ°’± ", - source = "ο„‘ ", - start = "ξ«“ ", - task = "βœ” ", - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - -- leave nil, to automatically select a browser depending on your OS. - -- If you want to use a specific browser, you can define it here - browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events - custom_keys = { - -- You can define custom key maps here. If present, the description will - -- be shown in the help menu. - -- To disable one of the defaults, set it to false. - - ["l"] = { - function(plugin) - require("lazy.util").float_term({ "lazygit", "log" }, { - cwd = plugin.dir, - }) - end, - desc = "Open lazygit log", - }, - - ["t"] = { - function(plugin) - require("lazy.util").float_term(nil, { - cwd = plugin.dir, - }) - end, - desc = "Open terminal in plugin dir", - }, - }, - }, - diff = { - -- diff command can be one of: - -- * browser: opens the github compare view. Note that this is always mapped to as well, - -- so you can have a different command for diff - -- * git: will run git diff and open a buffer with filetype git - -- * terminal_git: will open a pseudo terminal with git diff - -- * diffview.nvim: will open Diffview to show the diff - cmd = "git", - }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = true, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour - check_pinned = false, -- check for pinned packages that can't be updated - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = true, -- get a notification when changes are found - }, - performance = { - cache = { - enabled = true, - }, - reset_packpath = true, -- reset the package path to improve startup time - rtp = { - reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory - ---@type string[] - paths = {}, -- add any custom paths here that you want to includes in the rtp - ---@type string[] list any plugins you want to disable here - disabled_plugins = { - -- "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - -- "tarPlugin", - -- "tohtml", - -- "tutor", - -- "zipPlugin", - }, - }, - }, - -- lazy can generate helptags from the headings in markdown readme files, - -- so :help works even for plugins that don't have vim docs. - -- when the readme opens with :help it will be correctly displayed as markdown - readme = { - enabled = true, - root = vim.fn.stdpath("state") .. "/lazy/readme", - files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things - -- Enable profiling of lazy.nvim. This will add some overhead, - -- so only enable this when you are debugging lazy.nvim - profiling = { - -- Enables extra stats on the debug tab related to the loader cache. - -- Additionally gathers stats about all package.loaders - loader = false, - -- Track each new require in the Lazy profiling tab - require = false, - }, - } -< - -If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ - ->lua - { - ui = { - icons = { - cmd = "⌘", - config = "πŸ› ", - event = "πŸ“…", - ft = "πŸ“‚", - init = "βš™", - keys = "πŸ—", - plugin = "πŸ”Œ", - runtime = "πŸ’»", - require = "πŸŒ™", - source = "πŸ“„", - start = "πŸš€", - task = "πŸ“Œ", - lazy = "πŸ’€ ", - }, - }, - } -< - - -🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* - - ----------------------------------------------------------------------- - Highlight Group Default Group Description - ----------------------- ----------------------- ----------------------- - LazyButton CursorLine - - LazyButtonActive Visual - - LazyComment Comment - - LazyCommit @variable.builtin commit ref - - LazyCommitIssue Number - - LazyCommitScope Italic conventional commit - scope - - LazyCommitType Title conventional commit - type - - LazyDimmed Conceal property - - LazyDir @markup.link directory - - LazyH1 IncSearch home button - - LazyH2 Bold titles - - LazyLocal Constant - - LazyNoCond DiagnosticWarn unloaded icon for a - plugin where cond() was - false - - LazyNormal NormalFloat - - LazyProgressDone Constant progress bar done - - LazyProgressTodo LineNr progress bar todo - - LazyProp Conceal property - - LazyReasonCmd Operator - - LazyReasonEvent Constant - - LazyReasonFt Character - - LazyReasonImport Identifier - - LazyReasonKeys Statement - - LazyReasonPlugin Special - - LazyReasonRequire @variable.parameter - - LazyReasonRuntime @macro - - LazyReasonSource Character - - LazyReasonStart @variable.member - - LazySpecial @punctuation.special - - LazyTaskError ErrorMsg task errors - - LazyTaskOutput MsgArea task output - - LazyUrl @markup.link url - - LazyValue @string value of a property - ----------------------------------------------------------------------- - -============================================================================== -7. πŸš€ Usage *lazy.nvim-πŸš€-usage* - - -▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* - -**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading -completely (`vim.go.loadplugins = false`). It takes over the complete startup -sequence for more flexibility and better performance. - -In practice this means that step 10 of |Neovim Initialization| is done by Lazy: - -1. All the plugins’ `init()` functions are executed -2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) -3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) -4. All `/after/plugin` files are sourced (this includes `/after` from plugins) - -Files from runtime directories are always sourced in alphabetical order. - - -πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* - -Plugins are managed with the `:Lazy` command. Open the help with `` to see -all the key mappings. - -You can press `` on a plugin to show its details. Most properties can be -hovered with `` to open links, help files, readmes, git commits and git -issues. - -Lazy can automatically check for updates in the background. This feature can be -enabled with `config.checker.enabled = true`. - -Any operation can be started from the UI, with a sub command or an API -function: - - ---------------------------------------------------------------------------------- - Command Lua Description - ------------------------- -------------------------------- ----------------------- - :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin - - :Lazy check [plugins] require("lazy").check(opts?) Check for updates and - show the log (git - fetch) - - :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are - no longer needed - - :Lazy clear require("lazy").clear() Clear finished tasks - - :Lazy debug require("lazy").debug() Show debug information - - :Lazy health require("lazy").health() Run :checkhealth lazy - - :Lazy help require("lazy").help() Toggle this help page - - :Lazy home require("lazy").home() Go back to plugin list - - :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins - - :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has - not been loaded yet. - Similar to :packadd. - Like - :Lazy load foo.nvim. - Use :Lazy! load to skip - cond checks. - - :Lazy log [plugins] require("lazy").log(opts?) Show recent updates - - :Lazy profile require("lazy").profile() Show detailed profiling - - :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin - (experimental!!) - - :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to - the state in the - lockfile. For a single - plugin: restore it to - the state in the - lockfile or to a given - commit under the cursor - - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update - - :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This - will also update the - lockfile - ---------------------------------------------------------------------------------- -Any command can have a **bang** to make the command wait till it finished. For -example, if you want to sync lazy from the cmdline, you can use: - ->shell - nvim --headless "+Lazy! sync" +qa -< - -`opts` is a table with the following key-values: - -- **wait**: when true, then the call will wait till the operation completed -- **show**: when false, the UI will not be shown -- **plugins**: a list of plugin names to run the operation on -- **concurrency**: limit the `number` of concurrently running tasks - -Stats API (`require("lazy").stats()`): - ->lua - { - -- startuptime in milliseconds till UIEnter - startuptime = 0, - -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) - -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher - -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. - real_cputime = false, - count = 0, -- total number of plugins - loaded = 0, -- number of loaded plugins - ---@type table - times = {}, - } -< - -**lazy.nvim** provides a statusline component that you can use to show the -number of pending updates. Make sure to enable `config.checker.enabled = true` -to make this work. - -Example of configuring lualine.nvim ~ - ->lua - require("lualine").setup({ - sections = { - lualine_x = { - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = "#ff9e64" }, - }, - }, - }, - }) -< - - -πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* - -The following user events will be triggered: - -- **LazyDone**: when lazy has finished starting up and loaded your config -- **LazySync**: after running sync -- **LazyInstall**: after an install -- **LazyUpdate**: after an update -- **LazyClean**: after a clean -- **LazyCheck**: after checking for updates -- **LazyLog**: after running log -- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. -- **LazySyncPre**: before running sync -- **LazyInstallPre**: before an install -- **LazyUpdatePre**: before an update -- **LazyCleanPre**: before a clean -- **LazyCheckPre**: before checking for updates -- **LazyLogPre**: before running log -- **LazyReload**: triggered by change detection after reloading plugin specs -- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands -- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. - Useful to update the startuptime on your dashboard. - - -❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* - -To uninstall **lazy.nvim**, you need to remove the following files and -directories: - -- **data**: `~/.local/share/nvim/lazy` -- **state**: `~/.local/state/nvim/lazy` -- **lockfile**: `~/.config/nvim/lazy-lock.json` - - - Paths can differ if you changed `XDG` environment variables. - -πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* - -After every **update**, the local lockfile (`lazy-lock.json`) is updated with -the installed revisions. It is recommended to have this file under version -control. - -If you use your Neovim config on multiple machines, using the lockfile, you can -ensure that the same version of every plugin is installed. - -If you are on another machine, you can do `:Lazy restore`, to update all your -plugins to the version from the lockfile. - - -πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* - - -PACKER.NVIM ~ - -- `setup` ➑️ `init` -- `requires` ➑️ `dependencies` -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` -- `lock` ➑️ `pin` -- `disable=true` ➑️ `enabled = false` -- `tag='*'` ➑️ `version="*"` -- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. -- `config` don’t support string type, use `fun(LazyPlugin)` instead. -- `module` is auto-loaded. No need to specify -- `keys` spec is |lazy.nvim-different| -- `rtp` can be accomplished with: - ->lua - config = function(plugin) - vim.opt.rtp:append(plugin.dir .. "/custom-rtp") - end -< - -With packer `wants`, `requires` and `after` can be used to manage dependencies. -With lazy, this isn’t needed for most of the Lua dependencies. They can be -installed just like normal plugins (even with `lazy=true`) and will be loaded -when other plugins need them. The `dependencies` key can be used to group those -required plugins with the one that requires them. The plugins which are added -as `dependencies` will always be lazy-loaded and loaded when the plugin is -loaded. - - -PAQ-NVIM ~ - -- `as` ➑️ `name` -- `opt` ➑️ `lazy` -- `run` ➑️ `build` - - -⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* - -Great care has been taken to make the startup code (`lazy.core`) as efficient -as possible. During startup, all Lua files used before `VimEnter` or -`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim - does. - -My config for example loads in about `11ms` with `93` plugins. I do a lot of -lazy-loading though :) - -**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you -improve performance. The profiling view shows you why and how long it took to -load your plugins. - - -πŸ› DEBUG ~ - -See an overview of active lazy-loading handlers and what’s in the module -cache. - - -πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* - -Some users may want to split their plugin specs in multiple files. Instead of -passing a spec table to `setup()`, you can use a Lua module. The specs from the -**module** and any top-level **sub-modules** will be merged together in the -final spec, so it is not needed to add `require` calls in your main plugin file -to the other files. - -The benefits of using this approach: - -- Simple to **add** new plugin specs. Just create a new file in your plugins module. -- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. -- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. - -Example: - -- `~/.config/nvim/init.lua` - ->lua - require("lazy").setup("plugins") -< - -- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** - ->lua - return { - "folke/neodev.nvim", - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - } -< - -- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec - -For a real-life example, you can check LazyVim - and more specifically: - -- lazyvim.plugins contains all the plugin specs that will be loaded - - -↩️ IMPORTING SPECS, CONFIG & OPTS - -As part of a spec, you can add `import` statements to import additional plugin -modules. Both of the `setup()` calls are equivalent: - ->lua - require("lazy").setup("plugins") - - -- Same as: - require("lazy").setup({{import = "plugins"}}) -< - -To import multiple modules from a plugin, add additional specs for each import. -For example, to import LazyVim core plugins and an optional plugin: - ->lua - require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, - } - }) -< - -When you import specs, you can override them by simply adding a spec for the -same plugin to your local specs, adding any keys you want to override / merge. - -`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with -the parent spec. Any other property will override the property from the parent -spec. - - -============================================================================== -8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* - -To make it easier for users to install your plugin, you can include a package -spec in your repo. - - -BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* - -- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: - >lua - return { "me/my-plugin", opts = {} } - < -- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. - >lua - { "nvim-lua/plenary.nvim", lazy = true } - < -- Always use `opts` instead of `config` when possible. `config` is almost never - needed. -- Only use `dependencies` if a plugin needs the dep to be installed **AND** - loaded. Lua plugins/libraries are automatically loaded when they are - `require()`d, so they don’t need to be in `dependencies`. -- Inside a `build` function or `*.lua` build file, use - `coroutine.yield(msg:string|LazyMsg)` to show progress. -- Don’t change the `cwd` in your build function, since builds run in parallel - and changing the `cwd` will affect other builds. - - -BUILDING *lazy.nvim-πŸ”₯-developers-building* - -The spec **build** property can be one of the following: - -- `fun(plugin: LazyPlugin)`: a function that builds the plugin. -- `*.lua`: a Lua file that builds the plugin (like `build.lua`) -- `":Command"`: a Neovim command -- `"rockspec"`: this will run `luarocks make` in the plugin’s directory - This is automatically set by the `rockspec` package source. -- any other **string** will be run as a shell command -- a `list` of any of the above to run multiple build steps -- if no `build` is specified, but a `build.lua` file exists, that will be used instead. - -Build functions and `*.lua` files run asynchronously in a coroutine. Use -`coroutine.yield(msg:string|LazyMsg)` to show progress. - -Yielding will also schedule the next `coroutine.resume()` to run in the next -tick, so you can do long-running tasks without blocking Neovim. - ->lua - ---@class LazyMsg - ---@field msg string - ---@field level? number vim.log.levels.XXX -< - -Use `vim.log.levels.TRACE` to only show the message as a **status** message for -the task. - - - -MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* - -**lazy.nvim** comes with some built-in functionality to help you create a -minimal init for your plugin. - -I mainly use this for testing and for users to create a `repro.lua`. - -When running in **headless** mode, **lazy.nvim** will log any messages to the -terminal. See `opts.headless` for more info. - -**minit** will install/load all your specs and will always run an update as -well. - - -BOOTSTRAP ~ - ->lua - -- setting this env will override all XDG paths - vim.env.LAZY_STDPATH = ".tests" - -- this will install lazy in your stdpath - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -< - - -TESTING WITH BUSTED ~ - -This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. - -Below is an example of how I use **minit** to run tests with busted - in **LazyVim**. - ->lua - #!/usr/bin/env -S nvim -l - - vim.env.LAZY_STDPATH = ".tests" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - -- Setup lazy.nvim - require("lazy.minit").busted({ - spec = { - "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "nvim-treesitter/nvim-treesitter", - }, - }) -< - -To use this, you can run: - ->sh - nvim -l ./tests/busted.lua tests -< - -If you want to inspect the test environment, run: - ->sh - nvim -u ./tests/busted.lua -< - - -REPRO.LUA ~ - ->lua - vim.env.LAZY_STDPATH = ".repro" - load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - - require("lazy.minit").repro({ - spec = { - "stevearc/conform.nvim", - "nvim-neotest/nvim-nio", - }, - }) - - -- do anything else you need to do to reproduce the issue -< - -Then run it with: - ->sh - nvim -u repro.lua -< - -============================================================================== -9. Links *lazy.nvim-links* +1. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png -2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png -3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 2cb8af1eb14184442d718d6418e26ccd5adf535c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 9 Jul 2024 17:25:39 +0200 Subject: [PATCH 062/148] ci: skip docs on main --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60f92cf..95c1e6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,3 +12,4 @@ jobs: with: plugin: lazy.nvim repo: folke/lazy.nvim + docs: false From d1de92dffab5a862332fdd1892889d362369c12f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 9 Jul 2024 15:26:28 +0000 Subject: [PATCH 063/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1352 insertions(+), 46 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index f2ef56a..c2c9695 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -1,61 +1,130 @@ -*lazy.nvim.txt* For Neovim Last change: 2024 July 09 +*lazy.nvim.txt* A modern plugin manager for Neovim ============================================================================== Table of Contents *lazy.nvim-table-of-contents* - - Features |lazy.nvim-features| - - Requirements |lazy.nvim-requirements| - - Getting Started |lazy.nvim-getting-started| -1. Links |lazy.nvim-links| -Install -Β· -Configure -Β· -Docs - - - - - - - - - - - - - - +1. πŸ“° What’s new? |lazy.nvim-πŸ“°-what’s-new?| + - 11.x |lazy.nvim-πŸ“°-what’s-new?-11.x| +2. πŸš€ Getting Started |lazy.nvim-πŸš€-getting-started| + - ✨ Features |lazy.nvim-πŸš€-getting-started-✨-features| + - ⚑️ Requirements |lazy.nvim-πŸš€-getting-started-⚑️-requirements| +3. πŸ› οΈ Installation |lazy.nvim-πŸ› οΈ-installation| + - Structured Setup |lazy.nvim-πŸ› οΈ-installation-structured-setup| + - Single File Setup |lazy.nvim-πŸ› οΈ-installation-single-file-setup| +4. πŸ”Œ Plugin Spec |lazy.nvim-πŸ”Œ-plugin-spec| + - Spec Source |lazy.nvim-πŸ”Œ-plugin-spec-spec-source| + - Spec Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-loading| + - Spec Setup |lazy.nvim-πŸ”Œ-plugin-spec-spec-setup| + - Spec Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading| + - Spec Versioning |lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning| + - Spec Advanced |lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced| + - Examples |lazy.nvim-πŸ”Œ-plugin-spec-examples| + - Lazy Loading |lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading| + - Versioning |lazy.nvim-πŸ”Œ-plugin-spec-versioning| +5. πŸ“¦ Packages |lazy.nvim-πŸ“¦-packages| + - Lazy |lazy.nvim-πŸ“¦-packages-lazy| + - Rockspec |lazy.nvim-πŸ“¦-packages-rockspec| + - Packspec |lazy.nvim-πŸ“¦-packages-packspec| +6. βš™οΈ Configuration |lazy.nvim-βš™οΈ-configuration| + - 🌈 Highlight Groups|lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups| +7. πŸš€ Usage |lazy.nvim-πŸš€-usage| + - ▢️ Startup Sequence |lazy.nvim-πŸš€-usage-▢️-startup-sequence| + - πŸš€ Commands |lazy.nvim-πŸš€-usage-πŸš€-commands| + - πŸ“† User Events |lazy.nvim-πŸš€-usage-πŸ“†-user-events| + - ❌ Uninstalling |lazy.nvim-πŸš€-usage-❌-uninstalling| + - πŸ”’ Lockfile |lazy.nvim-πŸš€-usage-πŸ”’-lockfile| + - πŸ“¦ Migration Guide |lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide| + - ⚑ Profiling & Debug |lazy.nvim-πŸš€-usage-⚑-profiling-&-debug| + - πŸ“‚ Structuring Your Plugins|lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins| +8. πŸ”₯ Developers |lazy.nvim-πŸ”₯-developers| + - Best Practices |lazy.nvim-πŸ”₯-developers-best-practices| + - Building |lazy.nvim-πŸ”₯-developers-building| + - Minit (Minimal Init) |lazy.nvim-πŸ”₯-developers-minit-(minimal-init)| +9. Links |lazy.nvim-links| + +============================================================================== +1. πŸ“° What’s new? *lazy.nvim-πŸ“°-what’s-new?* +11.X *lazy.nvim-πŸ“°-what’s-new?-11.x* + +- **New Website**: There’s a whole new website with a fresh look and improved + documentation. Check it out at . The GitHub `README.md` + has been updated to point to the new website. The `vimdoc` contains all the + information that is available on the website. +- **Spec Resolution & Merging**: the code that resolves a final spec from a + plugin’s fragments has been rewritten. This should be a tiny bit faster, but + more importantly, fixes some issues and is easier to maintain. +- Packages can now specify their dependencies + and configuration using one of: + - **Lazy**: `lazy.lua` file + - **Rockspec**: luarocks `*-scm-1.rockspec` file + - **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + Related _lazy.nvim_ options: + >lua + { + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", -- will only be used when rocks.enabled is true + "packspec", + }, + }, + rocks = { + enabled = true, + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + } + < +- Installing neorg is now as simple as: + >lua + { "nvim-neorg/neorg", opts = {} } + < +- Packages are not limited to just Neovim plugins. You can install any + **luarocks** package, like: + >lua + { "https://github.com/lubyk/yaml" } + < + Luarocks packages without a `/lua` directory are never lazy-loaded, since + it’s just a library. +- `build` functions or `*.lua` build files (like `build.lua`) now run + asynchronously. You can use `coroutine.yield(status_msg)` to show progress. + Yielding will also schedule the next `resume` to run in the next tick, so you + can do long-running tasks without blocking Neovim. +============================================================================== +2. πŸš€ Getting Started *lazy.nvim-πŸš€-getting-started* **lazy.nvim** is a modern plugin manager for Neovim. -FEATURES *lazy.nvim-features* +✨ FEATURES *lazy.nvim-πŸš€-getting-started-✨-features* -- Manage all your Neovim plugins with a powerful UI -- Fast startup times thanks to automatic caching and bytecode compilation of Lua modules -- Partial clones instead of shallow clones -- Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings -- Automatically install missing plugins before starting up Neovim, allowing you to start using it right away -- Async execution for improved performance -- No need to manually compile plugins -- Correct sequencing of dependencies -- Configurable in multiple files -- Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs -- Dev options and patterns for using local plugins -- Profiling tools to optimize performance -- Lockfile `lazy-lock.json` to keep track of installed plugins -- Automatically check for updates -- Commit, branch, tag, version, and full Semver support -- Statusline component to see the number of pending updates -- Automatically lazy-loads colorschemes +- πŸ“¦ Manage all your Neovim plugins with a powerful UI +- πŸš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules +- πŸ’Ύ Partial clones instead of shallow clones +- πŸ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings +- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away +- πŸ’ͺ Async execution for improved performance +- πŸ› οΈ No need to manually compile plugins +- πŸ§ͺ Correct sequencing of dependencies +- πŸ“ Configurable in multiple files +- πŸ“š Generates helptags of the headings in `README.md` files for plugins that don’t have vimdocs +- πŸ’» Dev options and patterns for using local plugins +- πŸ“Š Profiling tools to optimize performance +- πŸ”’ Lockfile `lazy-lock.json` to keep track of installed plugins +- πŸ”Ž Automatically check for updates +- πŸ“‹ Commit, branch, tag, version, and full Semver support +- πŸ“ˆ Statusline component to see the number of pending updates +- 🎨 Automatically lazy-loads colorschemes -REQUIREMENTS *lazy.nvim-requirements* +⚑️ REQUIREMENTS *lazy.nvim-πŸš€-getting-started-⚑️-requirements* - Neovim >= **0.8.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) @@ -64,14 +133,1251 @@ REQUIREMENTS *lazy.nvim-requirements* You can remove `rockspec` from `opts.pkg.sources` to disable this feature. -GETTING STARTED *lazy.nvim-getting-started* +============================================================================== +3. πŸ› οΈ Installation *lazy.nvim-πŸ› οΈ-installation* + +There are multiple ways to install **lazy.nvim**. The **Structured Setup** is +the recommended way, but you can also use the **Single File Setup** if you +prefer to keep everything in your `init.lua`. + +Please refer to the Configuration section for an overview of +all available options. + + + + +STRUCTURED SETUP *lazy.nvim-πŸ› οΈ-installation-structured-setup* + +>lua + require("config.lazy") +< + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< + +You can then create your plugin specs in `~/.config/nvim/lua/plugins/`. Each +file should return a table with the plugins you want to install. + +For more info see Structuring Your Plugins + + +SINGLE FILE SETUP *lazy.nvim-πŸ› οΈ-installation-single-file-setup* + +>lua + -- Bootstrap lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + end + vim.opt.rtp:prepend(lazypath) + + -- Make sure to setup `mapleader` and `maplocalleader` before + -- loading lazy.nvim so that mappings are correct. + -- This is also a good place to setup other settings (vim.opt) + vim.g.mapleader = " " + vim.g.maplocalleader = "\\" + + -- Setup lazy.nvim + require("lazy").setup({ + -- highlight-start + spec = { + -- add your plugins here + }, + -- highlight-end + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + }) +< -Check the documentation website for more information. ============================================================================== -1. Links *lazy.nvim-links* +4. πŸ”Œ Plugin Spec *lazy.nvim-πŸ”Œ-plugin-spec* + + +SPEC SOURCE *lazy.nvim-πŸ”Œ-plugin-spec-spec-source* + + ----------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------- + [1] string? Short plugin url. Will be expanded using + config.git.url_format. Can also be a url or dir. + + dir string? A directory pointing to a local plugin + + url string? A custom git url where the plugin is hosted + + name string? A custom name for the plugin used for the local plugin + directory and as the display name + + dev boolean? When true, a local plugin directory will be used instead. See + config.dev + ----------------------------------------------------------------------------------- +A valid spec should define one of `[1]`, `dir` or `url`. + + +SPEC LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-loading* + + -------------------------------------------------------------------------------------------------- + Property Type Description + -------------- ------------------------- --------------------------------------------------------- + dependencies LazySpec[] A list of plugin names or plugin specs that should be + loaded when the plugin loads. Dependencies are always + lazy-loaded unless specified otherwise. When specifying a + name, make sure the plugin spec has been defined + somewhere else. + + enabled boolean? or fun():boolean When false, or if the function returns false, then this + plugin will not be included in the spec + + cond boolean? or Behaves the same as enabled, but won’t uninstall the + fun(LazyPlugin):boolean plugin when the condition is false. Useful to disable + some plugins in vscode, or firenvim for example. + + priority number? Only useful for start plugins (lazy=false) to force + loading certain plugins first. Default priority is 50. + It’s recommended to set this to a high number for + colorschemes. + -------------------------------------------------------------------------------------------------- + +SPEC SETUP *lazy.nvim-πŸ”Œ-plugin-spec-spec-setup* + + -------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ----------------------------- --------------------------------------------------------- + init fun(LazyPlugin) init functions are always executed during startup. Mostly + useful for setting vim.g.* configuration used by Vim + plugins startup + + opts table or opts should be a table (will be merged with parent + fun(LazyPlugin, opts:table) specs), return a table (replaces parent specs) or should + change a table. The table will be passed to the + Plugin.config() function. Setting this value will imply + Plugin.config() + + config fun(LazyPlugin, opts:table) config is executed when the plugin loads. The default + or true implementation will automatically run + require(MAIN).setup(opts) if opts or config = true is + set. Lazy uses several heuristics to determine the + plugin’s MAIN module automatically based on the plugin’s + name. (opts is the recommended way to configure plugins). + + main string? You can specify the main module to use for config() and + opts(), in case it can not be determined automatically. + See config() + + build fun(LazyPlugin) or string or build is executed when a plugin is installed or updated. + false or a list of build See Building for more information. + commands + -------------------------------------------------------------------------------------------------- +Always use `opts` instead of `config` when possible. `config` is almost never +needed. + + + + +SPEC LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-spec-lazy-loading* + + -------------------------------------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------------------------------------------------------------- ---------------------------------------- + lazy boolean? When true, the plugin will only be + loaded when needed. Lazy-loaded plugins + are automatically loaded when their Lua + modules are required, or when one of the + lazy-loading handlers triggers + + event string? or string[] or Lazy-load on event. Events can be + fun(self:LazyPlugin, event:string[]):string[] or specified as BufEnter or with a pattern + {event:string[]\|string, pattern?:string[]\|string} like BufEnter *.lua + + cmd string? or string[] or Lazy-load on command + fun(self:LazyPlugin, cmd:string[]):string[] + + ft string? or string[] or Lazy-load on filetype + fun(self:LazyPlugin, ft:string[]):string[] + + keys string? or string[] or LazyKeysSpec[] or Lazy-load on key mapping + fun(self:LazyPlugin, keys:string[]):(string \| LazyKeysSpec)[] + -------------------------------------------------------------------------------------------------------------------- +Refer to the Lazy Loading <./lazy_loading.md> section for more information. + + +SPEC VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-spec-versioning* + + ------------------------------------------------------------------------------ + Property Type Description + ------------ -------------------- -------------------------------------------- + branch string? Branch of the repository + + tag string? Tag of the repository + + commit string? Commit of the repository + + version string? or false to Version to use from the repository. Full + override the default Semver ranges are supported + + pin boolean? When true, this plugin will not be included + in updates + + submodules boolean? When false, git submodules will not be + fetched. Defaults to true + ------------------------------------------------------------------------------ +Refer to the Versioning <./versioning.md> section for more information. + + +SPEC ADVANCED *lazy.nvim-πŸ”Œ-plugin-spec-spec-advanced* + + ---------------------------------------------------------------------------------------- + Property Type Description + ---------- ---------- ------------------------------------------------------------------ + optional boolean? When a spec is tagged optional, it will only be included in the + final spec, when the same plugin has been specified at least once + somewhere else without optional. This is mainly useful for Neovim + distros, to allow setting options on plugins that may/may not be + part of the user’s plugins. + + specs LazySpec A list of plugin specs defined in the scope of the plugin. This is + mainly useful for Neovim distros, to allow setting options on + plugins that may/may not be part of the user’s plugins. When the + plugin is disabled, none of the scoped specs will be included in + the final spec. Similar to dependencies without the automatic + loading of the specs. + + module false? Do not automatically load this Lua module when it’s required + somewhere + + import string? Import the given spec module. + ---------------------------------------------------------------------------------------- + +EXAMPLES *lazy.nvim-πŸ”Œ-plugin-spec-examples* + +>lua + return { + -- the colorscheme should be available when starting Neovim + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + + -- I have a separate config.mappings file where I require which-key. + -- With lazy the plugin will be automatically loaded when it is required somewhere + { "folke/which-key.nvim", lazy = true }, + + { + "nvim-neorg/neorg", + -- lazy-load on filetype + ft = "norg", + -- options for neorg. This will automatically call `require("neorg").setup(opts)` + opts = { + load = { + ["core.defaults"] = {}, + }, + }, + }, + + { + "dstein64/vim-startuptime", + -- lazy-load on a command + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + }, + config = function() + -- ... + end, + }, + + -- if some code requires a module from an unloaded plugin, it will be automatically loaded. + -- So for api plugins like devicons, we can always set lazy=true + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- you can use the VeryLazy event for things that can + -- load later and are not important for the initial UI + { "stevearc/dressing.nvim", event = "VeryLazy" }, + + { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, + }, + + { + "monaqa/dial.nvim", + -- lazy-load on keys + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, + }, + + -- local plugins need to be explicitly configured with dir + { dir = "~/projects/secret.nvim" }, + + -- you can use a custom url to fetch a plugin + { url = "git@github.com:folke/noice.nvim.git" }, + + -- local plugins can also be configured with the dev option. + -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub + -- With the dev option, you can easily switch between the local and installed version of a plugin + { "folke/noice.nvim", dev = true }, + } +< + + +LAZY LOADING *lazy.nvim-πŸ”Œ-plugin-spec-lazy-loading* + +**lazy.nvim** automagically lazy-loads Lua modules. This means that if you have +a plugin `A` that is lazy-loaded and a plugin `B` that requires a module of +plugin `A`, then plugin `A` will be loaded on demand as expected. + + +Additionally, you can also lazy-load on **events**, **commands**, **file +types** and **key mappings**. + +Plugins will be lazy-loaded when one of the following is `true`: + +- The plugin only exists as a dependency in your spec +- It has an `event`, `cmd`, `ft` or `keys` key +- `config.defaults.lazy == true` + + +🌈 COLORSCHEMES ~ + +Colorscheme plugins can be configured with `lazy=true`. The plugin will +automagically load when doing `colorscheme foobar`. + + + +⌨️ LAZY KEY MAPPINGS ~ + +The `keys` property can be a `string` or `string[]` for simple normal-mode +mappings, or it can be a `LazyKeysSpec` table with the following key-value +pairs: + +- **[1]**: (`string`) lhs **(required)** +- **[2]**: (`string|fun()`) rhs **(optional)** +- **mode**: (`string|string[]`) mode **(optional, defaults to "n")** +- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **(optional)** +- any other option valid for `vim.keymap.set` + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + +VERSIONING *lazy.nvim-πŸ”Œ-plugin-spec-versioning* + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports Semver ranges. + + + +EXAMPLES ~ + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + + +============================================================================== +5. πŸ“¦ Packages *lazy.nvim-πŸ“¦-packages* + +**lazy.nvim** supports three ways for plugins to define their dependencies and +configuration. + +- **Lazy**: `lazy.lua` file +- **Rockspec**: luarocks `*-scm-1.rockspec` file +- **Packspec**: `pkg.json` (experimental, since the format is not quite there yet) + +You can enable/disable package sources with `config.pkg.sources` +. The order of sources is important, as the first source that +finds a package will be used. + + + +LAZY *lazy.nvim-πŸ“¦-packages-lazy* + +Using a `lazy.lua` file is the recommended way to define your plugin +dependencies and configuration. Syntax is the same as any plugin spec. + + +ROCKSPEC *lazy.nvim-πŸ“¦-packages-rockspec* + +When a plugin contains a `*-1.rockspec` file, **lazy.nvim** will automatically +build the rock and its dependencies. + +A **rockspec** will only be used if one of the following is true: + +- the package does not have a `/lua` directory +- the package has a complex build step +- the package has dependencies (excluding `lua`) + + +PACKSPEC *lazy.nvim-πŸ“¦-packages-packspec* + +Supports the pkg.json + format, with +a lazy extension in `lazy`. `lazy` can contain any valid lazy spec fields. They +will be added to the plugin’s spec. + + +============================================================================== +6. βš™οΈ Configuration *lazy.nvim-βš™οΈ-configuration* + +**lazy.nvim** comes with the following defaults: + +>lua + { + root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil + }, + -- leave nil when passing the spec as the first argument to setup() + spec = nil, ---@type LazySpec + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", + }, + dev = { + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/projects", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, + }, + ui = { + -- a number <1 is a percentage., >1 is a fixed size + size = { width = 0.8, height = 0.8 }, + wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. + border = "none", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ† ", + favorite = "ο€… ", + ft = "ο€– ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°’² ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + require = "σ°’± ", + source = "ο„‘ ", + start = "ξ«“ ", + task = "βœ” ", + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to as well, + -- so you can have a different command for diff + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = true, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found + }, + performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time + rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here + disabled_plugins = { + -- "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + -- "tarPlugin", + -- "tohtml", + -- "tutor", + -- "zipPlugin", + }, + }, + }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, + } +< + +If you don’t want to use a Nerd Font, you can replace the icons with Unicode symbols. ~ + +>lua + { + ui = { + icons = { + cmd = "⌘", + config = "πŸ› ", + event = "πŸ“…", + ft = "πŸ“‚", + init = "βš™", + keys = "πŸ—", + plugin = "πŸ”Œ", + runtime = "πŸ’»", + require = "πŸŒ™", + source = "πŸ“„", + start = "πŸš€", + task = "πŸ“Œ", + lazy = "πŸ’€ ", + }, + }, + } +< + + +🌈 HIGHLIGHT GROUPS *lazy.nvim-βš™οΈ-configuration-🌈-highlight-groups* + + ----------------------------------------------------------------------- + Highlight Group Default Group Description + ----------------------- ----------------------- ----------------------- + LazyButton CursorLine + + LazyButtonActive Visual + + LazyComment Comment + + LazyCommit @variable.builtin commit ref + + LazyCommitIssue Number + + LazyCommitScope Italic conventional commit + scope + + LazyCommitType Title conventional commit + type + + LazyDimmed Conceal property + + LazyDir @markup.link directory + + LazyH1 IncSearch home button + + LazyH2 Bold titles + + LazyLocal Constant + + LazyNoCond DiagnosticWarn unloaded icon for a + plugin where cond() was + false + + LazyNormal NormalFloat + + LazyProgressDone Constant progress bar done + + LazyProgressTodo LineNr progress bar todo + + LazyProp Conceal property + + LazyReasonCmd Operator + + LazyReasonEvent Constant + + LazyReasonFt Character + + LazyReasonImport Identifier + + LazyReasonKeys Statement + + LazyReasonPlugin Special + + LazyReasonRequire @variable.parameter + + LazyReasonRuntime @macro + + LazyReasonSource Character + + LazyReasonStart @variable.member + + LazySpecial @punctuation.special + + LazyTaskError ErrorMsg task errors + + LazyTaskOutput MsgArea task output + + LazyUrl @markup.link url + + LazyValue @string value of a property + ----------------------------------------------------------------------- + +============================================================================== +7. πŸš€ Usage *lazy.nvim-πŸš€-usage* + + +▢️ STARTUP SEQUENCE *lazy.nvim-πŸš€-usage-▢️-startup-sequence* + +**lazy.nvim** does **NOT** use Neovim packages and even disables plugin loading +completely (`vim.go.loadplugins = false`). It takes over the complete startup +sequence for more flexibility and better performance. + +In practice this means that step 10 of |Neovim Initialization| is done by Lazy: + +1. All the plugins’ `init()` functions are executed +2. All plugins with `lazy=false` are loaded. This includes sourcing `/plugin` and `/ftdetect` files. (`/after` will not be sourced yet) +3. All files from `/plugin` and `/ftdetect` directories in your rtp are sourced (excluding `/after`) +4. All `/after/plugin` files are sourced (this includes `/after` from plugins) + +Files from runtime directories are always sourced in alphabetical order. + + +πŸš€ COMMANDS *lazy.nvim-πŸš€-usage-πŸš€-commands* + +Plugins are managed with the `:Lazy` command. Open the help with `` to see +all the key mappings. + +You can press `` on a plugin to show its details. Most properties can be +hovered with `` to open links, help files, readmes, git commits and git +issues. + +Lazy can automatically check for updates in the background. This feature can be +enabled with `config.checker.enabled = true`. + +Any operation can be started from the UI, with a sub command or an API +function: + + ---------------------------------------------------------------------------------- + Command Lua Description + ------------------------- -------------------------------- ----------------------- + :Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin + + :Lazy check [plugins] require("lazy").check(opts?) Check for updates and + show the log (git + fetch) + + :Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are + no longer needed + + :Lazy clear require("lazy").clear() Clear finished tasks + + :Lazy debug require("lazy").debug() Show debug information + + :Lazy health require("lazy").health() Run :checkhealth lazy + + :Lazy help require("lazy").help() Toggle this help page + + :Lazy home require("lazy").home() Go back to plugin list + + :Lazy install [plugins] require("lazy").install(opts?) Install missing plugins + + :Lazy load {plugins} require("lazy").load(opts) Load a plugin that has + not been loaded yet. + Similar to :packadd. + Like + :Lazy load foo.nvim. + Use :Lazy! load to skip + cond checks. + + :Lazy log [plugins] require("lazy").log(opts?) Show recent updates + + :Lazy profile require("lazy").profile() Show detailed profiling + + :Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin + (experimental!!) + + :Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to + the state in the + lockfile. For a single + plugin: restore it to + the state in the + lockfile or to a given + commit under the cursor + + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update + + :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This + will also update the + lockfile + ---------------------------------------------------------------------------------- +Any command can have a **bang** to make the command wait till it finished. For +example, if you want to sync lazy from the cmdline, you can use: + +>shell + nvim --headless "+Lazy! sync" +qa +< + +`opts` is a table with the following key-values: + +- **wait**: when true, then the call will wait till the operation completed +- **show**: when false, the UI will not be shown +- **plugins**: a list of plugin names to run the operation on +- **concurrency**: limit the `number` of concurrently running tasks + +Stats API (`require("lazy").stats()`): + +>lua + { + -- startuptime in milliseconds till UIEnter + startuptime = 0, + -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS) + -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher + -- when false, startuptime is calculated based on a delta with a timestamp when lazy started. + real_cputime = false, + count = 0, -- total number of plugins + loaded = 0, -- number of loaded plugins + ---@type table + times = {}, + } +< + +**lazy.nvim** provides a statusline component that you can use to show the +number of pending updates. Make sure to enable `config.checker.enabled = true` +to make this work. + +Example of configuring lualine.nvim ~ + +>lua + require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, + }) +< + + +πŸ“† USER EVENTS *lazy.nvim-πŸš€-usage-πŸ“†-user-events* + +The following user events will be triggered: + +- **LazyDone**: when lazy has finished starting up and loaded your config +- **LazySync**: after running sync +- **LazyInstall**: after an install +- **LazyUpdate**: after an update +- **LazyClean**: after a clean +- **LazyCheck**: after checking for updates +- **LazyLog**: after running log +- **LazyLoad**: after loading a plugin. The `data` attribute will contain the plugin name. +- **LazySyncPre**: before running sync +- **LazyInstallPre**: before an install +- **LazyUpdatePre**: before an update +- **LazyCleanPre**: before a clean +- **LazyCheckPre**: before checking for updates +- **LazyLogPre**: before running log +- **LazyReload**: triggered by change detection after reloading plugin specs +- **VeryLazy**: triggered after `LazyDone` and processing `VimEnter` auto commands +- **LazyVimStarted**: triggered after `UIEnter` when `require("lazy").stats().startuptime` has been calculated. + Useful to update the startuptime on your dashboard. + + +❌ UNINSTALLING *lazy.nvim-πŸš€-usage-❌-uninstalling* + +To uninstall **lazy.nvim**, you need to remove the following files and +directories: + +- **data**: `~/.local/share/nvim/lazy` +- **state**: `~/.local/state/nvim/lazy` +- **lockfile**: `~/.config/nvim/lazy-lock.json` + + + Paths can differ if you changed `XDG` environment variables. + +πŸ”’ LOCKFILE *lazy.nvim-πŸš€-usage-πŸ”’-lockfile* + +After every **update**, the local lockfile (`lazy-lock.json`) is updated with +the installed revisions. It is recommended to have this file under version +control. + +If you use your Neovim config on multiple machines, using the lockfile, you can +ensure that the same version of every plugin is installed. + +If you are on another machine, you can do `:Lazy restore`, to update all your +plugins to the version from the lockfile. + + +πŸ“¦ MIGRATION GUIDE *lazy.nvim-πŸš€-usage-πŸ“¦-migration-guide* + + +PACKER.NVIM ~ + +- `setup` ➑️ `init` +- `requires` ➑️ `dependencies` +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` +- `lock` ➑️ `pin` +- `disable=true` ➑️ `enabled = false` +- `tag='*'` ➑️ `version="*"` +- `after` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `wants` is **not needed** for most use-cases. Use `dependencies` otherwise. +- `config` don’t support string type, use `fun(LazyPlugin)` instead. +- `module` is auto-loaded. No need to specify +- `keys` spec is |lazy.nvim-different| +- `rtp` can be accomplished with: + +>lua + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/custom-rtp") + end +< + +With packer `wants`, `requires` and `after` can be used to manage dependencies. +With lazy, this isn’t needed for most of the Lua dependencies. They can be +installed just like normal plugins (even with `lazy=true`) and will be loaded +when other plugins need them. The `dependencies` key can be used to group those +required plugins with the one that requires them. The plugins which are added +as `dependencies` will always be lazy-loaded and loaded when the plugin is +loaded. + + +PAQ-NVIM ~ + +- `as` ➑️ `name` +- `opt` ➑️ `lazy` +- `run` ➑️ `build` + + +⚑ PROFILING & DEBUG *lazy.nvim-πŸš€-usage-⚑-profiling-&-debug* + +Great care has been taken to make the startup code (`lazy.core`) as efficient +as possible. During startup, all Lua files used before `VimEnter` or +`BufReadPre` are byte-compiled and cached, similar to what impatient.nvim + does. + +My config for example loads in about `11ms` with `93` plugins. I do a lot of +lazy-loading though :) + +**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you +improve performance. The profiling view shows you why and how long it took to +load your plugins. + + +πŸ› DEBUG ~ + +See an overview of active lazy-loading handlers and what’s in the module +cache. + + +πŸ“‚ STRUCTURING YOUR PLUGINS*lazy.nvim-πŸš€-usage-πŸ“‚-structuring-your-plugins* + +Some users may want to split their plugin specs in multiple files. Instead of +passing a spec table to `setup()`, you can use a Lua module. The specs from the +**module** and any top-level **sub-modules** will be merged together in the +final spec, so it is not needed to add `require` calls in your main plugin file +to the other files. + +The benefits of using this approach: + +- Simple to **add** new plugin specs. Just create a new file in your plugins module. +- Allows for **caching** of all your plugin specs. This becomes important if you have a lot of smaller plugin specs. +- Spec changes will automatically be **reloaded** when they’re updated, so the `:Lazy` UI is always up to date. + +Example: + +- `~/.config/nvim/init.lua` + +>lua + require("lazy").setup("plugins") +< + +- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **(this file is optional)** + +>lua + return { + "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + } +< + +- Any lua file in `~/.config/nvim/lua/plugins/*.lua` will be automatically merged in the main plugin spec + +For a real-life example, you can check LazyVim + and more specifically: + +- lazyvim.plugins contains all the plugin specs that will be loaded + + +↩️ IMPORTING SPECS, CONFIG & OPTS + +As part of a spec, you can add `import` statements to import additional plugin +modules. Both of the `setup()` calls are equivalent: + +>lua + require("lazy").setup("plugins") + + -- Same as: + require("lazy").setup({{import = "plugins"}}) +< + +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +>lua + require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } + }) +< + +When you import specs, you can override them by simply adding a spec for the +same plugin to your local specs, adding any keys you want to override / merge. + +`opts`, `dependencies`, `cmd`, `event`, `ft` and `keys` are always merged with +the parent spec. Any other property will override the property from the parent +spec. + + +============================================================================== +8. πŸ”₯ Developers *lazy.nvim-πŸ”₯-developers* + +To make it easier for users to install your plugin, you can include a package +spec in your repo. + + +BEST PRACTICES *lazy.nvim-πŸ”₯-developers-best-practices* + +- If your plugin needs `setup()`, then create a simple `lazy.lua` file like this: + >lua + return { "me/my-plugin", opts = {} } + < +- Plugins that are pure lua libraries should be lazy-loaded with `lazy = true`. + >lua + { "nvim-lua/plenary.nvim", lazy = true } + < +- Always use `opts` instead of `config` when possible. `config` is almost never + needed. +- Only use `dependencies` if a plugin needs the dep to be installed **AND** + loaded. Lua plugins/libraries are automatically loaded when they are + `require()`d, so they don’t need to be in `dependencies`. +- Inside a `build` function or `*.lua` build file, use + `coroutine.yield(msg:string|LazyMsg)` to show progress. +- Don’t change the `cwd` in your build function, since builds run in parallel + and changing the `cwd` will affect other builds. + + +BUILDING *lazy.nvim-πŸ”₯-developers-building* + +The spec **build** property can be one of the following: + +- `fun(plugin: LazyPlugin)`: a function that builds the plugin. +- `*.lua`: a Lua file that builds the plugin (like `build.lua`) +- `":Command"`: a Neovim command +- `"rockspec"`: this will run `luarocks make` in the plugin’s directory + This is automatically set by the `rockspec` package source. +- any other **string** will be run as a shell command +- a `list` of any of the above to run multiple build steps +- if no `build` is specified, but a `build.lua` file exists, that will be used instead. + +Build functions and `*.lua` files run asynchronously in a coroutine. Use +`coroutine.yield(msg:string|LazyMsg)` to show progress. + +Yielding will also schedule the next `coroutine.resume()` to run in the next +tick, so you can do long-running tasks without blocking Neovim. + +>lua + ---@class LazyMsg + ---@field msg string + ---@field level? number vim.log.levels.XXX +< + +Use `vim.log.levels.TRACE` to only show the message as a **status** message for +the task. + + + +MINIT (MINIMAL INIT) *lazy.nvim-πŸ”₯-developers-minit-(minimal-init)* + +**lazy.nvim** comes with some built-in functionality to help you create a +minimal init for your plugin. + +I mainly use this for testing and for users to create a `repro.lua`. + +When running in **headless** mode, **lazy.nvim** will log any messages to the +terminal. See `opts.headless` for more info. + +**minit** will install/load all your specs and will always run an update as +well. + + +BOOTSTRAP ~ + +>lua + -- setting this env will override all XDG paths + vim.env.LAZY_STDPATH = ".tests" + -- this will install lazy in your stdpath + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +< + + +TESTING WITH BUSTED ~ + +This will add `"lunarmodules/busted"`, configure `hererocks` and run `busted`. + +Below is an example of how I use **minit** to run tests with busted + in **LazyVim**. + +>lua + #!/usr/bin/env -S nvim -l + + vim.env.LAZY_STDPATH = ".tests" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + -- Setup lazy.nvim + require("lazy.minit").busted({ + spec = { + "LazyVim/starter", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }) +< + +To use this, you can run: + +>sh + nvim -l ./tests/busted.lua tests +< + +If you want to inspect the test environment, run: + +>sh + nvim -u ./tests/busted.lua +< + + +REPRO.LUA ~ + +>lua + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + + require("lazy.minit").repro({ + spec = { + "stevearc/conform.nvim", + "nvim-neotest/nvim-nio", + }, + }) + + -- do anything else you need to do to reproduce the issue +< + +Then run it with: + +>sh + nvim -u repro.lua +< + +============================================================================== +9. Links *lazy.nvim-links* 1. *image*: https://user-images.githubusercontent.com/292349/208301737-68fb279c-ba70-43ef-a369-8c3e8367d6b1.png +2. *image*: https://user-images.githubusercontent.com/292349/208301766-5c400561-83c3-4811-9667-1ec4bb3c43b8.png +3. *image*: https://user-images.githubusercontent.com/292349/208301790-7eedbfa5-d202-4e70-852e-de68aa47233b.png Generated by panvimdoc From 54b003c650f07b771e61566f7be2629beb2b781f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 11 Jul 2024 22:03:53 +0200 Subject: [PATCH 064/148] fix(util): strip `-lua` in normname --- lua/lazy/core/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 6d7c3b8..bdd42dd 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -66,7 +66,7 @@ end ---@param name string ---@return string function M.normname(name) - local ret = name:lower():gsub("^n?vim%-", ""):gsub("%.n?vim$", ""):gsub("%.lua", ""):gsub("[^a-z]+", "") + local ret = name:lower():gsub("^n?vim%-", ""):gsub("%.n?vim$", ""):gsub("[%.%-]lua", ""):gsub("[^a-z]+", "") return ret end From 17473db1d79ea30e06126834be7fd95ca511557b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 11 Jul 2024 22:04:06 +0200 Subject: [PATCH 065/148] feat: add plugin name to handlers.managed --- lua/lazy/core/handler/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/handler/init.lua b/lua/lazy/core/handler/init.lua index b7ce3e5..22d3252 100644 --- a/lua/lazy/core/handler/init.lua +++ b/lua/lazy/core/handler/init.lua @@ -5,7 +5,7 @@ local Util = require("lazy.core.util") ---@field type LazyHandlerTypes ---@field extends? LazyHandler ---@field active table> ----@field managed table +---@field managed table mapping handler keys to plugin names ---@field super LazyHandler local M = {} @@ -114,7 +114,7 @@ function M:add(plugin) if not self.active[key] then self.active[key] = {} self:_add(value) - self.managed[key] = key + self.managed[key] = plugin.name end self.active[key][plugin.name] = plugin.name end From 1d451b4c2ce957da05e2123ce1a001804fc7ea96 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 11 Jul 2024 22:32:11 +0200 Subject: [PATCH 066/148] ci: use mini.test instead of busted --- lua/lazy/minit.lua | 62 +++++++++++++++++++++++++++++++++++++++++++++- scripts/test | 2 +- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/lua/lazy/minit.lua b/lua/lazy/minit.lua index 6300730..bfe63c4 100644 --- a/lua/lazy/minit.lua +++ b/lua/lazy/minit.lua @@ -29,9 +29,12 @@ function M.setup(opts) local args = {} local is_busted = false + local is_minitest = false for _, a in ipairs(_G.arg) do if a == "--busted" then is_busted = true + elseif a == "--minitest" then + is_minitest = true else table.insert(args, a) end @@ -40,6 +43,8 @@ function M.setup(opts) if is_busted then opts = M.busted.setup(opts) + elseif is_minitest then + opts = M.minitest.setup(opts) end -- set stdpaths to use .tests @@ -49,7 +54,6 @@ function M.setup(opts) vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name end end - vim.o.loadplugins = true require("lazy").setup(opts) if vim.g.colors_name == nil then @@ -68,6 +72,8 @@ function M.setup(opts) if is_busted then M.busted.run() + elseif is_minitest then + M.minitest.run() end end @@ -89,6 +95,60 @@ function M.repro(opts) M.setup(opts) end +M.minitest = {} + +function M.minitest.run() + local Config = require("lazy.core.config") + -- disable termnial output for the tests + Config.options.headless = {} + + if not require("lazy.core.config").headless() then + return vim.notify("busted can only run in headless mode. Please run with `nvim -l`", vim.log.levels.WARN) + end + package.path = package.path .. ";" .. vim.uv.cwd() .. "/tests/?.lua" + local Test = require("mini.test") + local expect = Test.expect + local _assert = assert + local Assert = { + __call = function(_, ...) + return _assert(...) + end, + same = expect.equality, + equal = expect.equality, + are = { + equal = expect.equality, + }, + is_not = { + same = expect.no_equality, + }, + } + Assert.__index = Assert + -- assert = require("luassert") + assert = setmetatable({}, Assert) + require("mini.test").run() +end + +---@param opts LazyConfig +function M.minitest.setup(opts) + return M.extend({ + spec = { + { + "echasnovski/mini.test", + opts = { + collect = { + find_files = function() + return vim.fn.globpath("tests", "**/*_spec.lua", true, true) + end, + }, + -- script_path = "tests/minit.lua", + }, + }, + { dir = vim.uv.cwd() }, + }, + rocks = { hererocks = true }, + }, opts) +end + M.busted = {} function M.busted.run() diff --git a/scripts/test b/scripts/test index 4baf621..2ed43b9 100755 --- a/scripts/test +++ b/scripts/test @@ -1,3 +1,3 @@ #!/bin/env bash -nvim -l tests/minit.lua --busted tests -o utfTerminal "$@" +nvim -l tests/minit.lua --minitest tests -o utfTerminal "$@" From 070418dca1417e7df5c803d7366fd0c7b3e9c612 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 09:25:55 +0200 Subject: [PATCH 067/148] chore(main): release 11.11.0 (#1634) :robot: I have created a release *beep* *boop* --- ## [11.11.0](https://github.com/folke/lazy.nvim/compare/v11.10.4...v11.11.0) (2024-07-11) ### Features * add plugin name to handlers.managed ([17473db](https://github.com/folke/lazy.nvim/commit/17473db1d79ea30e06126834be7fd95ca511557b)) ### Bug Fixes * **minit:** add tests to package.path when running busted (helpers.lua etc) ([fadebdc](https://github.com/folke/lazy.nvim/commit/fadebdc76b71a1d3658a88a025c6c8fb4749e0f8)) * **util:** strip `-lua` in normname ([54b003c](https://github.com/folke/lazy.nvim/commit/54b003c650f07b771e61566f7be2629beb2b781f)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a2f63d1..c71760f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.10.4" + ".": "11.11.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed551f..b2051d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [11.11.0](https://github.com/folke/lazy.nvim/compare/v11.10.4...v11.11.0) (2024-07-11) + + +### Features + +* add plugin name to handlers.managed ([17473db](https://github.com/folke/lazy.nvim/commit/17473db1d79ea30e06126834be7fd95ca511557b)) + + +### Bug Fixes + +* **minit:** add tests to package.path when running busted (helpers.lua etc) ([fadebdc](https://github.com/folke/lazy.nvim/commit/fadebdc76b71a1d3658a88a025c6c8fb4749e0f8)) +* **util:** strip `-lua` in normname ([54b003c](https://github.com/folke/lazy.nvim/commit/54b003c650f07b771e61566f7be2629beb2b781f)) + ## [11.10.4](https://github.com/folke/lazy.nvim/compare/v11.10.3...v11.10.4) (2024-07-08) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index c50b9c5..ff178c1 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.10.4" -- x-release-please-version +M.version = "11.11.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 54f70c757cdfc5da4740f2c22e057f3518872ef5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 13 Jul 2024 09:44:59 +0200 Subject: [PATCH 068/148] ci: add luassert to minitest for now --- .github/ISSUE_TEMPLATE/bug_report.yml | 35 ++++++++------------------- lua/lazy/minit.lua | 15 +++++++++++- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4a77601..9f95860 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,7 +6,10 @@ body: - type: markdown attributes: value: | - **Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim) and search [existing issues](https://github.com/folke/lazy.nvim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed. + **Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim) + and search [existing issues](https://github.com/folke/lazy.nvim/issues). + + Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed. - type: checkboxes attributes: label: Did you check docs and existing issues? @@ -57,32 +60,14 @@ body: label: Repro description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua` value: | - -- DO NOT change the paths and don't remove the colorscheme - local root = vim.fn.fnamemodify("./.repro", ":p") + vim.env.LAZY_STDPATH = ".repro" + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() - -- set stdpaths to use .repro - for _, name in ipairs({ "config", "data", "state", "cache" }) do - vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name - end - - -- bootstrap lazy - local lazypath = root .. "/plugins/lazy.nvim" - if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, }) - end - vim.opt.runtimepath:prepend(lazypath) - - -- install plugins - local plugins = { - "folke/tokyonight.nvim", - -- add any other plugins here - } - require("lazy").setup(plugins, { - root = root .. "/plugins", + require("lazy.minit").repro({ + spec = { + -- add any other plugins here + }, }) - - vim.cmd.colorscheme("tokyonight") - -- add anything else here render: Lua validations: required: false diff --git a/lua/lazy/minit.lua b/lua/lazy/minit.lua index bfe63c4..0b8f3ca 100644 --- a/lua/lazy/minit.lua +++ b/lua/lazy/minit.lua @@ -25,6 +25,9 @@ function M.setup(opts) opts = M.extend({ local_spec = false, change_detection = { enabled = false }, + dev = { + patterns = vim.env.LAZY_DEV and vim.split(vim.env.LAZY_DEV, ",") or nil, + }, }, opts) local args = {} @@ -121,10 +124,19 @@ function M.minitest.run() is_not = { same = expect.no_equality, }, + is_not_nil = function(a) + return expect.no_equality(nil, a) + end, + is_true = function(a) + return expect.equality(true, a) + end, + is_false = function(a) + return expect.equality(false, a) + end, } Assert.__index = Assert - -- assert = require("luassert") assert = setmetatable({}, Assert) + assert = require("luassert") require("mini.test").run() end @@ -132,6 +144,7 @@ end function M.minitest.setup(opts) return M.extend({ spec = { + "lunarmodules/luassert", { "echasnovski/mini.test", opts = { From 7ed9f7173cdec71a057053d7e6efc20c2c230b95 Mon Sep 17 00:00:00 2001 From: Ethan Wu Date: Sat, 13 Jul 2024 03:51:44 -0400 Subject: [PATCH 069/148] fix(lockfile): ensure newline at EOF for lockfile (#1639) ## Description The lockfile currently does not end with a newline at EOF. Text files should [end with a newline](https://unix.stackexchange.com/a/18789). This also lets you manually edit the lockfile in vim without 'fixeol' creating a spurious change for the added newline. This change however will create a change in users' lockfiles adding a newline upon updating, but since the lockfile would be changing anyways to update lazy.nvim itself, this is likely acceptable. ## Related Issue(s) *none* ## Screenshots *N/A* --- lua/lazy/manage/lock.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/manage/lock.lua b/lua/lazy/manage/lock.lua index a1b4c74..b3c4444 100644 --- a/lua/lazy/manage/lock.lua +++ b/lua/lazy/manage/lock.lua @@ -42,7 +42,7 @@ function M.update() f:write(",\n") end end - f:write("\n}") + f:write("\n}\n") f:close() end From 58c6bc4ab298dc0d808d325754585f918a031919 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 10:07:17 +0200 Subject: [PATCH 070/148] chore(update): update repository (#1638) 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> --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2ed43b9..ffbb540 100755 --- a/scripts/test +++ b/scripts/test @@ -1,3 +1,3 @@ #!/bin/env bash -nvim -l tests/minit.lua --minitest tests -o utfTerminal "$@" +nvim -l tests/minit.lua --minitest From 788feaf10efd5c8a849f7a0daef31ac0af1157bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 16:16:17 +0200 Subject: [PATCH 071/148] chore(update): update repository (#1644) 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> --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9f95860..8468e01 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -68,6 +68,6 @@ body: -- add any other plugins here }, }) - render: Lua + render: lua validations: required: false From 93499c5deb37641c6cf71528a93f101d186b409f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 13 Jul 2024 18:07:56 +0200 Subject: [PATCH 072/148] fix(config): check for lib64. Fixes #1343 --- .editorconfig | 12 ++++++++++++ lua/lazy/core/config.lua | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a9452c7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index ff178c1..ee3e38b 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -284,6 +284,9 @@ function M.setup(opts) M.me = debug.getinfo(1, "S").source:sub(2) M.me = Util.norm(vim.fn.fnamemodify(M.me, ":p:h:h:h:h")) + local lib = vim.fn.fnamemodify(vim.v.progpath, ":p:h:h") .. "/lib" + lib = vim.uv.fs_stat(lib .. "64") and (lib .. "64") or lib + lib = lib .. "/nvim" if M.options.performance.rtp.reset then ---@type vim.Option vim.opt.rtp = { @@ -291,7 +294,7 @@ function M.setup(opts) vim.fn.stdpath("data") .. "/site", M.me, vim.env.VIMRUNTIME, - vim.fn.fnamemodify(vim.v.progpath, ":p:h:h") .. "/lib/nvim", + lib, vim.fn.stdpath("config") .. "/after", } end From 6e66f8e6550dd22467c11284e638dfccb5d514e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:29:13 +0200 Subject: [PATCH 073/148] chore(update): update repository (#1648) 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> --- .editorconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index a9452c7..18616d3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,5 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file root = true -# Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true From b02c9eae6a250f98908c146d1dc1a891f5019f0a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 22:50:19 +0200 Subject: [PATCH 074/148] chore(main): release 11.11.1 (#1643) :robot: I have created a release *beep* *boop* --- ## [11.11.1](https://github.com/folke/lazy.nvim/compare/v11.11.0...v11.11.1) (2024-07-13) ### Bug Fixes * **config:** check for lib64. Fixes [#1343](https://github.com/folke/lazy.nvim/issues/1343) ([93499c5](https://github.com/folke/lazy.nvim/commit/93499c5deb37641c6cf71528a93f101d186b409f)) * **lockfile:** ensure newline at EOF for lockfile ([#1639](https://github.com/folke/lazy.nvim/issues/1639)) ([7ed9f71](https://github.com/folke/lazy.nvim/commit/7ed9f7173cdec71a057053d7e6efc20c2c230b95)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c71760f..4d14617 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.11.0" + ".": "11.11.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b2051d3..39481ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [11.11.1](https://github.com/folke/lazy.nvim/compare/v11.11.0...v11.11.1) (2024-07-13) + + +### Bug Fixes + +* **config:** check for lib64. Fixes [#1343](https://github.com/folke/lazy.nvim/issues/1343) ([93499c5](https://github.com/folke/lazy.nvim/commit/93499c5deb37641c6cf71528a93f101d186b409f)) +* **lockfile:** ensure newline at EOF for lockfile ([#1639](https://github.com/folke/lazy.nvim/issues/1639)) ([7ed9f71](https://github.com/folke/lazy.nvim/commit/7ed9f7173cdec71a057053d7e6efc20c2c230b95)) + ## [11.11.0](https://github.com/folke/lazy.nvim/compare/v11.10.4...v11.11.0) (2024-07-11) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index ee3e38b..1206305 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -228,7 +228,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.11.0" -- x-release-please-version +M.version = "11.11.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 315191aa9e1b0ce5a023c01f959059411405b7c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:19:51 +0200 Subject: [PATCH 075/148] chore(update): update repository (#1651) 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> --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8468e01..5c225eb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -17,6 +17,8 @@ body: options: - label: I have read all the lazy.nvim docs required: true + - label: I have updated the plugin to the latest version before submitting this issue + required: true - label: I have searched the existing issues of lazy.nvim required: true - label: I have searched the existing issues of plugins related to this issue From 9d445ebbd89401544a538c6af080e4d2785abb49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:09:32 +0200 Subject: [PATCH 076/148] chore(update): update repository (#1653) 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> --- .editorconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 18616d3..8b176d5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,6 @@ root = true [*] -end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 From d731a6b005fd239e85e555bd57362382f6c1e461 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Jul 2024 16:50:31 +0200 Subject: [PATCH 077/148] feat(git): added git network throttle to limit network related git ops per interval. Closes #1635 --- lua/lazy/core/config.lua | 7 +++++++ lua/lazy/manage/task/git.lua | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 1206305..3ec89c6 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -34,6 +34,13 @@ M.defaults = { -- then set the below to false. This should work, but is NOT supported and will -- increase downloads a lot. filter = true, + -- rate of network related git operations (clone, fetch, checkout) + throttle = { + enabled = false, -- not enabled by default + -- max 2 ops every 5 seconds + rate = 2, + duration = 5 * 1000, -- in ms + }, }, pkg = { enabled = true, diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 9425fec..bd7ee38 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -1,8 +1,45 @@ +local Async = require("lazy.async") local Config = require("lazy.core.config") local Git = require("lazy.manage.git") local Lock = require("lazy.manage.lock") local Util = require("lazy.util") +local throttle = {} +throttle.running = 0 +throttle.waiting = {} ---@type Async[] +throttle.timer = vim.uv.new_timer() + +function throttle.next() + throttle.running = 0 + while #throttle.waiting > 0 and throttle.running < Config.options.git.throttle.rate do + ---@type Async + local task = table.remove(throttle.waiting, 1) + task:resume() + throttle.running = throttle.running + 1 + end + if throttle.running == 0 then + throttle.timer:stop() + end +end + +function throttle.wait() + if not Config.options.git.throttle.enabled then + return + end + if not throttle.timer:is_active() then + throttle.timer:start(0, Config.options.git.throttle.duration, vim.schedule_wrap(throttle.next)) + end + local running = Async.running() + if throttle.running < Config.options.git.throttle.rate then + throttle.running = throttle.running + 1 + else + table.insert(throttle.waiting, running) + coroutine.yield("waiting") + running:suspend() + coroutine.yield("") + end +end + ---@type table local M = {} @@ -84,6 +121,7 @@ M.clone = { end, ---@async run = function(self) + throttle.wait() local args = { "clone", self.plugin.url, @@ -233,6 +271,7 @@ M.fetch = { ---@async run = function(self) + throttle.wait() local args = { "fetch", "--recurse-submodules", @@ -262,6 +301,7 @@ M.checkout = { ---@async ---@param opts {lockfile?:boolean} run = function(self, opts) + throttle.wait() local info = assert(Git.info(self.plugin.dir)) local target = assert(Git.get_target(self.plugin)) From 5473e3d77c13e40fc4758fa977a1f2c14d0b4ceb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:54:53 +0200 Subject: [PATCH 078/148] chore(main): release 11.12.0 (#1655) :robot: I have created a release *beep* *boop* --- ## [11.12.0](https://github.com/folke/lazy.nvim/compare/v11.11.1...v11.12.0) (2024-07-16) ### Features * **git:** added git network throttle to limit network related git ops per interval. Closes [#1635](https://github.com/folke/lazy.nvim/issues/1635) ([d731a6b](https://github.com/folke/lazy.nvim/commit/d731a6b005fd239e85e555bd57362382f6c1e461)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 4d14617..fc1c305 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.11.1" + ".": "11.12.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 39481ef..0ad1e73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.12.0](https://github.com/folke/lazy.nvim/compare/v11.11.1...v11.12.0) (2024-07-16) + + +### Features + +* **git:** added git network throttle to limit network related git ops per interval. Closes [#1635](https://github.com/folke/lazy.nvim/issues/1635) ([d731a6b](https://github.com/folke/lazy.nvim/commit/d731a6b005fd239e85e555bd57362382f6c1e461)) + ## [11.11.1](https://github.com/folke/lazy.nvim/compare/v11.11.0...v11.11.1) (2024-07-13) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 3ec89c6..facd1f8 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.11.1" -- x-release-please-version +M.version = "11.12.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 6ca90a21202808796418e46d3cebfbb5a44e54a2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Jul 2024 00:40:41 +0200 Subject: [PATCH 079/148] feat(ui): added mapping descriptions --- lua/lazy/view/float.lua | 2 +- lua/lazy/view/init.lua | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lua/lazy/view/float.lua b/lua/lazy/view/float.lua index 3a59069..4131d72 100644 --- a/lua/lazy/view/float.lua +++ b/lua/lazy/view/float.lua @@ -166,7 +166,7 @@ function M:mount() self:augroup(true) end, { win = true }) self:focus() - self:on_key(ViewConfig.keys.close, self.close) + self:on_key(ViewConfig.keys.close, self.close, "Close") self:on({ "BufDelete", "BufHidden" }, self.close) if vim.bo[self.buf].buftype == "" then diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index 313d3ad..e8444eb 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -85,7 +85,7 @@ function M.create() require("lazy.manage.process").abort() require("lazy.async").abort() return ViewConfig.keys.abort - end, { silent = true, buffer = self.buf, expr = true }) + end, { silent = true, buffer = self.buf, expr = true, desc = "Abort" }) vim.keymap.set("n", "gx", "K", { buffer = self.buf, remap = true }) @@ -110,7 +110,7 @@ function M.create() self.state.plugin = open and selected or nil self:update() end - end) + end, "Details") self:on_key(ViewConfig.keys.next, function() local cursor = vim.api.nvim_win_get_cursor(self.view.win) @@ -121,7 +121,7 @@ function M.create() return end end - end) + end, "Next Plugin") self:on_key(ViewConfig.keys.prev, function() local cursor = vim.api.nvim_win_get_cursor(self.view.win) @@ -132,14 +132,14 @@ function M.create() return end end - end) + end, "Prev Plugin") self:on_key(ViewConfig.keys.profile_sort, function() if self.state.mode == "profile" then self.state.profile.sort_time_taken = not self.state.profile.sort_time_taken self:update() end - end) + end, "Sort Profile") self:on_key(ViewConfig.keys.profile_filter, function() if self.state.mode == "profile" then @@ -159,17 +159,18 @@ function M.create() end end) end - end) + end, "Filter Profile") for lhs, rhs in pairs(Config.options.ui.custom_keys) do if rhs then local handler = type(rhs) == "table" and rhs[1] or rhs + local desc = type(rhs) == "table" and rhs.desc or nil self:on_key(lhs, function() local plugin = self.render:get_plugin() if plugin then handler(plugin) end - end) + end, desc) end end @@ -219,17 +220,17 @@ function M:setup_patterns() ["(https?://%S+)"] = function(url) Util.open(url) end, - }, self.hover) + }, self.hover, "Hover") self:on_pattern(ViewConfig.keys.diff, { [commit_pattern] = function(hash) self:diff({ commit = hash }) end, - }, self.diff) + }, self.diff, "Diff") self:on_pattern(ViewConfig.commands.restore.key_plugin, { [commit_pattern] = function(hash) self:restore({ commit = hash }) end, - }, self.restore) + }, self.restore, "Restore") end ---@param opts? {commit:string} @@ -294,7 +295,8 @@ end ---@param key string ---@param patterns table ---@param fallback? fun(self) -function M:on_pattern(key, patterns, fallback) +---@param desc? string +function M:on_pattern(key, patterns, fallback, desc) self:on_key(key, function() local line = vim.api.nvim_get_current_line() local pos = vim.api.nvim_win_get_cursor(0) @@ -316,7 +318,7 @@ function M:on_pattern(key, patterns, fallback) if fallback then fallback(self) end - end) + end, desc) end function M:setup_modes() From 8f6225751138329da339eb6554d40158768d23ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:47:30 +0200 Subject: [PATCH 080/148] chore(main): release 11.13.0 (#1660) :robot: I have created a release *beep* *boop* --- ## [11.13.0](https://github.com/folke/lazy.nvim/compare/v11.12.0...v11.13.0) (2024-07-17) ### Features * **ui:** added mapping descriptions ([6ca90a2](https://github.com/folke/lazy.nvim/commit/6ca90a21202808796418e46d3cebfbb5a44e54a2)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index fc1c305..fa12dc5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.12.0" + ".": "11.13.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad1e73..44bd690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.13.0](https://github.com/folke/lazy.nvim/compare/v11.12.0...v11.13.0) (2024-07-17) + + +### Features + +* **ui:** added mapping descriptions ([6ca90a2](https://github.com/folke/lazy.nvim/commit/6ca90a21202808796418e46d3cebfbb5a44e54a2)) + ## [11.12.0](https://github.com/folke/lazy.nvim/compare/v11.11.1...v11.12.0) (2024-07-16) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index facd1f8..b75b51c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.12.0" -- x-release-please-version +M.version = "11.13.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 124b864233367cc0665bfcd9872b1c974bfb225b Mon Sep 17 00:00:00 2001 From: Gert Burger Date: Thu, 18 Jul 2024 14:57:12 +0100 Subject: [PATCH 081/148] docs(commands): fix command ordering for sync (#1661) ## Description After a discussion on Slack we noticed that the description of the sync command is a bit vague. Some people, including myself, assumed `clean`/`install`/`update` referred to build steps being performed per plugin. Another person mentioned they thought it referred to the Lazy commands, which does make more sense. They also noticed that the order of the commands do not match the source code. So this PR corrects the order, assuming it was meant to be ordered, and mentions that those are commands for clarity. --- doc/lazy.nvim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index c2c9695..1694d24 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -988,8 +988,8 @@ function: lockfile or to a given commit under the cursor - :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and - update + :Lazy sync [plugins] require("lazy").sync(opts?) Run clean, install, and + update commands :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This will also update the From c92c6b5fd2b3a13c8999ab8379e43a79c9406e59 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jul 2024 13:57:58 +0000 Subject: [PATCH 082/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 1694d24..c2c9695 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -988,8 +988,8 @@ function: lockfile or to a given commit under the cursor - :Lazy sync [plugins] require("lazy").sync(opts?) Run clean, install, and - update commands + :Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and + update :Lazy update [plugins] require("lazy").update(opts?) Update plugins. This will also update the From 5bdb12a038e5a72cc793f38893f1a9c9fb741759 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Jul 2024 08:57:35 +0200 Subject: [PATCH 083/148] fix(build): only load the plugin before build for `:` build commands --- lua/lazy/manage/task/plugin.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/lazy/manage/task/plugin.lua b/lua/lazy/manage/task/plugin.lua index fd6c12b..bd565f8 100644 --- a/lua/lazy/manage/task/plugin.lua +++ b/lua/lazy/manage/task/plugin.lua @@ -19,6 +19,9 @@ local B = {} ---@param task LazyTask ---@param build string function B.cmd(task, build) + if task.plugin.build ~= "rockspec" then + Loader.load(task.plugin, { task = "build" }) + end local cmd = vim.api.nvim_parse_cmd(build:sub(2), {}) --[[@as vim.api.keyset.cmd]] task:log(vim.api.nvim_cmd(cmd, { output = true })) end @@ -48,10 +51,6 @@ M.build = { run = function(self) vim.cmd([[silent! runtime plugin/rplugin.vim]]) - if self.plugin.build ~= "rockspec" then - Loader.load(self.plugin, { task = "build" }) - end - local builders = self.plugin.build -- Skip if `build` is set to `false` From 9a374a0fb4d3ac42dac4a129d4bead7252473c77 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:50:14 +0200 Subject: [PATCH 084/148] chore(main): release 11.13.1 (#1664) :robot: I have created a release *beep* *boop* --- ## [11.13.1](https://github.com/folke/lazy.nvim/compare/v11.13.0...v11.13.1) (2024-07-19) ### Bug Fixes * **build:** only load the plugin before build for `:` build commands ([5bdb12a](https://github.com/folke/lazy.nvim/commit/5bdb12a038e5a72cc793f38893f1a9c9fb741759)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index fa12dc5..4639dfb 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.0" + ".": "11.13.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bd690..1757c13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.13.1](https://github.com/folke/lazy.nvim/compare/v11.13.0...v11.13.1) (2024-07-19) + + +### Bug Fixes + +* **build:** only load the plugin before build for `:` build commands ([5bdb12a](https://github.com/folke/lazy.nvim/commit/5bdb12a038e5a72cc793f38893f1a9c9fb741759)) + ## [11.13.0](https://github.com/folke/lazy.nvim/compare/v11.12.0...v11.13.0) (2024-07-17) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index b75b51c..1753933 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.0" -- x-release-please-version +M.version = "11.13.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 18d1c1b47e175cd58dc12bf4792ef4e9a50505fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Jul 2024 12:41:54 +0200 Subject: [PATCH 085/148] fix(loader): add auto loaded module to package.loaded early to prevent require loops --- lua/lazy/core/loader.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index c5cdca2..ac53690 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -552,15 +552,16 @@ function M.loader(modname) end if ret then - M.auto_load(modname, ret.modpath) local mod = package.loaded[modname] - if type(mod) == "table" then - return function() - return mod - end + if type(mod) ~= "table" then + mod = loadfile(ret.modpath, nil, nil, ret.stat)() end + package.loaded[modname] = mod + M.auto_load(modname, ret.modpath) -- selene: allow(incorrect_standard_library_use) - return loadfile(ret.modpath, nil, nil, ret.stat) + return function() + return mod + end end end From 8bef0742a2f6f587c8dba73e99e7fb2c05b3764a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:53:27 +0200 Subject: [PATCH 086/148] chore(main): release 11.13.2 (#1668) :robot: I have created a release *beep* *boop* --- ## [11.13.2](https://github.com/folke/lazy.nvim/compare/v11.13.1...v11.13.2) (2024-07-21) ### Bug Fixes * **loader:** add auto loaded module to package.loaded early to prevent require loops ([18d1c1b](https://github.com/folke/lazy.nvim/commit/18d1c1b47e175cd58dc12bf4792ef4e9a50505fa)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 4639dfb..a52e23c 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.1" + ".": "11.13.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1757c13..8094a59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.13.2](https://github.com/folke/lazy.nvim/compare/v11.13.1...v11.13.2) (2024-07-21) + + +### Bug Fixes + +* **loader:** add auto loaded module to package.loaded early to prevent require loops ([18d1c1b](https://github.com/folke/lazy.nvim/commit/18d1c1b47e175cd58dc12bf4792ef4e9a50505fa)) + ## [11.13.1](https://github.com/folke/lazy.nvim/compare/v11.13.0...v11.13.1) (2024-07-19) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 1753933..0029a30 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.1" -- x-release-please-version +M.version = "11.13.2" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From a692bf86883457f45fe3f773bfc8bc4d9e4b070c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Jul 2024 17:32:12 +0200 Subject: [PATCH 087/148] revert: fix(loader): add auto loaded module to package.loaded early to prevent require loops This reverts commit 18d1c1b47e175cd58dc12bf4792ef4e9a50505fa. --- lua/lazy/core/loader.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index ac53690..c5cdca2 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -552,16 +552,15 @@ function M.loader(modname) end if ret then - local mod = package.loaded[modname] - if type(mod) ~= "table" then - mod = loadfile(ret.modpath, nil, nil, ret.stat)() - end - package.loaded[modname] = mod M.auto_load(modname, ret.modpath) - -- selene: allow(incorrect_standard_library_use) - return function() - return mod + local mod = package.loaded[modname] + if type(mod) == "table" then + return function() + return mod + end end + -- selene: allow(incorrect_standard_library_use) + return loadfile(ret.modpath, nil, nil, ret.stat) end end From a09c876f6ef642c8feaea45932df73b058d9a083 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 17:34:22 +0200 Subject: [PATCH 088/148] chore(main): release 11.13.3 (#1669) :robot: I have created a release *beep* *boop* --- ## [11.13.3](https://github.com/folke/lazy.nvim/compare/v11.13.2...v11.13.3) (2024-07-21) ### Reverts * fix(loader): add auto loaded module to package.loaded early to prevent require loops ([a692bf8](https://github.com/folke/lazy.nvim/commit/a692bf86883457f45fe3f773bfc8bc4d9e4b070c)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a52e23c..34e9ae3 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.2" + ".": "11.13.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8094a59..9f4735d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.13.3](https://github.com/folke/lazy.nvim/compare/v11.13.2...v11.13.3) (2024-07-21) + + +### Reverts + +* fix(loader): add auto loaded module to package.loaded early to prevent require loops ([a692bf8](https://github.com/folke/lazy.nvim/commit/a692bf86883457f45fe3f773bfc8bc4d9e4b070c)) + ## [11.13.2](https://github.com/folke/lazy.nvim/compare/v11.13.1...v11.13.2) (2024-07-21) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 0029a30..ab07479 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.2" -- x-release-please-version +M.version = "11.13.3" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 34b0126e5b3966f1dbe148d6f8450213115e76b2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jul 2024 09:43:09 +0200 Subject: [PATCH 089/148] fix(loader): add plugins whose rtp got loaded early to start plugins --- lua/lazy/core/loader.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index c5cdca2..323b57b 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -161,7 +161,7 @@ function M.get_start_plugins() ---@type LazyPlugin[] local start = {} for _, plugin in pairs(Config.plugins) do - if plugin.lazy == false and not plugin._.loaded then + if not plugin._.loaded and (plugin._.rtp_loaded or plugin.lazy == false) then start[#start + 1] = plugin end end From 12f2c74244cc768d97c83972aa63722389b5d96d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jul 2024 09:45:01 +0200 Subject: [PATCH 090/148] fix(loader): explicitely set package.loaded.modname to nil to prevent recursive loading errors --- lua/lazy/core/loader.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 323b57b..cfcc136 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -552,6 +552,8 @@ function M.loader(modname) end if ret then + -- explicitly set to nil to prevent loading errors + package.loaded[modname] = nil M.auto_load(modname, ret.modpath) local mod = package.loaded[modname] if type(mod) == "table" then From 16a5c46aa3d05d37eb9c49f57ab058033b0870a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 09:47:04 +0200 Subject: [PATCH 091/148] chore(main): release 11.13.4 (#1670) :robot: I have created a release *beep* *boop* --- ## [11.13.4](https://github.com/folke/lazy.nvim/compare/v11.13.3...v11.13.4) (2024-07-22) ### Bug Fixes * **loader:** add plugins whose rtp got loaded early to start plugins ([34b0126](https://github.com/folke/lazy.nvim/commit/34b0126e5b3966f1dbe148d6f8450213115e76b2)) * **loader:** explicitely set package.loaded.modname to nil to prevent recursive loading errors ([12f2c74](https://github.com/folke/lazy.nvim/commit/12f2c74244cc768d97c83972aa63722389b5d96d)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 34e9ae3..8c425b8 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.3" + ".": "11.13.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f4735d..21299f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [11.13.4](https://github.com/folke/lazy.nvim/compare/v11.13.3...v11.13.4) (2024-07-22) + + +### Bug Fixes + +* **loader:** add plugins whose rtp got loaded early to start plugins ([34b0126](https://github.com/folke/lazy.nvim/commit/34b0126e5b3966f1dbe148d6f8450213115e76b2)) +* **loader:** explicitely set package.loaded.modname to nil to prevent recursive loading errors ([12f2c74](https://github.com/folke/lazy.nvim/commit/12f2c74244cc768d97c83972aa63722389b5d96d)) + ## [11.13.3](https://github.com/folke/lazy.nvim/compare/v11.13.2...v11.13.3) (2024-07-21) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index ab07479..041778d 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.3" -- x-release-please-version +M.version = "11.13.4" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From cc028e77eba9592818ca237b2079a51cf87b6af2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jul 2024 14:24:40 +0200 Subject: [PATCH 092/148] ci: update --- .github/workflows/stale.yml | 3 ++- .github/workflows/update.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a0c704b..4e0273b 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,6 +5,7 @@ on: - cron: "30 1 * * *" jobs: - ci: + stale: + if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner) uses: folke/github/.github/workflows/stale.yml@main secrets: inherit diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 2177a50..6784ef9 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -7,6 +7,7 @@ on: - cron: "0 * * * *" jobs: - ci: + update: + if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner) uses: folke/github/.github/workflows/update.yml@main secrets: inherit From 7d29719ade6f5a269e3b7d08b246641b5b079aaa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jul 2024 14:38:00 +0200 Subject: [PATCH 093/148] fix(health): dont use vim.fn.system to get cmd versions --- lua/lazy/health.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/lazy/health.lua b/lua/lazy/health.lua index 9e2a869..6a6d60d 100644 --- a/lua/lazy/health.lua +++ b/lua/lazy/health.lua @@ -1,4 +1,5 @@ local Config = require("lazy.core.config") +local Process = require("lazy.manage.process") local uv = vim.uv or vim.loop local M = {} @@ -36,11 +37,11 @@ function M.have(cmd, opts) local found for _, c in ipairs(cmd) do if vim.fn.executable(c) == 1 then - local version = vim.fn.system(c .. " " .. opts.version) or "" - if vim.v.shell_error ~= 0 then - opts.error(("failed to get version of {%s}\n%s"):format(c, version)) + local out, exit_code = Process.exec({ c, opts.version }) + if exit_code ~= 0 then + opts.error(("failed to get version of {%s}\n%s"):format(c, table.concat(out, "\n"))) else - version = vim.trim(vim.split(version, "\n")[1]) + local version = vim.trim(out[1] or "") version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "") if opts.version_pattern and not version:find(opts.version_pattern, 1, true) then opts.warn(("`%s` version `%s` needed, but found `%s`"):format(c, opts.version_pattern, version)) From 839f9e78e78dc935b1188fb16583365991739c51 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:41:58 +0200 Subject: [PATCH 094/148] chore(main): release 11.13.5 (#1672) :robot: I have created a release *beep* *boop* --- ## [11.13.5](https://github.com/folke/lazy.nvim/compare/v11.13.4...v11.13.5) (2024-07-22) ### Bug Fixes * **health:** dont use vim.fn.system to get cmd versions ([7d29719](https://github.com/folke/lazy.nvim/commit/7d29719ade6f5a269e3b7d08b246641b5b079aaa)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8c425b8..73b8cd1 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.4" + ".": "11.13.5" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 21299f1..ed2bf2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.13.5](https://github.com/folke/lazy.nvim/compare/v11.13.4...v11.13.5) (2024-07-22) + + +### Bug Fixes + +* **health:** dont use vim.fn.system to get cmd versions ([7d29719](https://github.com/folke/lazy.nvim/commit/7d29719ade6f5a269e3b7d08b246641b5b079aaa)) + ## [11.13.4](https://github.com/folke/lazy.nvim/compare/v11.13.3...v11.13.4) (2024-07-22) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 041778d..e02ed0b 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -235,7 +235,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.4" -- x-release-please-version +M.version = "11.13.5" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From d5686efbd00942b3e38de7c08b8df69d961b02f0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Jul 2024 13:31:20 +0200 Subject: [PATCH 095/148] feat: added `opts.git.cooldown` to allow updating plugins on slow connections. Fixes #1656 --- lua/lazy/core/config.lua | 4 ++++ lua/lazy/manage/task/git.lua | 16 +++++++++++++++- lua/lazy/types.lua | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index e02ed0b..f5633b1 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -41,6 +41,10 @@ M.defaults = { rate = 2, duration = 5 * 1000, -- in ms }, + -- Time in seconds to wait before running fetch again for a plugin. + -- Repeated update/check operations will not run again until this + -- cooldown period has passed. + cooldown = 0, }, pkg = { enabled = true, diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index bd7ee38..c54c809 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -40,6 +40,15 @@ function throttle.wait() end end +---@param plugin LazyPlugin +local function cooldown(plugin) + if not plugin._.last_check then + return false + end + local delta = (vim.uv.now() - plugin._.last_check) / 1000 + return delta < Config.options.git.cooldown +end + ---@type table local M = {} @@ -266,7 +275,7 @@ M.status = { -- fetches all needed origin branches M.fetch = { skip = function(plugin) - return not plugin._.installed or plugin._.is_local + return not plugin._.installed or plugin._.is_local or cooldown(plugin) end, ---@async @@ -287,6 +296,11 @@ M.fetch = { self:spawn("git", { args = args, cwd = self.plugin.dir, + on_exit = function(ok) + if ok then + self.plugin._.last_check = vim.uv.now() + end + end, }) end, } diff --git a/lua/lazy/types.lua b/lua/lazy/types.lua index 0a10467..5921169 100644 --- a/lua/lazy/types.lua +++ b/lua/lazy/types.lua @@ -20,6 +20,7 @@ ---@field tasks? LazyTask[] ---@field updated? {from:string, to:string} ---@field updates? {from:GitInfo, to:GitInfo} +---@field last_check? number ---@field working? boolean ---@field pkg? LazyPkg From c02268ac6e6aab92249d020d75efc588bd9d24fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Jul 2024 17:24:33 +0200 Subject: [PATCH 096/148] feat(plugin): improve error handling and show better error message --- lua/lazy/core/plugin.lua | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index d121fdf..1aef7c7 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -146,33 +146,43 @@ function Spec:import(spec) local imported = 0 - ---@type (string|(fun():LazyPluginSpec))[] + ---@type {modname: string, load: fun():(LazyPluginSpec?, string?)}[] local modspecs = {} if type(import) == "string" then Util.lsmod(import, function(modname, modpath) - modspecs[#modspecs + 1] = modname - package.preload[modname] = function() - return loadfile(modpath)() - end + modspecs[#modspecs + 1] = { + modname = modname, + load = function() + local mod, err = loadfile(modpath) + if mod then + return mod() + else + return nil, err + end + end, + } + end) + table.sort(modspecs, function(a, b) + return a.modname < b.modname end) - table.sort(modspecs) else - modspecs = { spec.import } + modspecs = { modname = import_name, load = spec.import } end for _, modspec in ipairs(modspecs) do imported = imported + 1 - local modname = type(modspec) == "string" and modspec or import_name + local modname = modspec.modname Util.track({ import = modname }) self.importing = modname -- unload the module so we get a clean slate ---@diagnostic disable-next-line: no-unknown package.loaded[modname] = nil Util.try(function() - local mod = type(modspec) == "function" and modspec() or require(modspec) - if type(mod) ~= "table" then - self.importing = nil + local mod, err = modspec.load() + if err then + self:error("Failed to load `" .. modname .. "`:\n" .. err) + elseif type(mod) ~= "table" then return self:error( "Invalid spec module: `" .. modname @@ -180,18 +190,17 @@ function Spec:import(spec) .. type(mod) .. "` was returned instead" ) + else + self:normalize(mod) end - self:normalize(mod) - self.importing = nil - Util.track() end, { msg = "Failed to load `" .. modname .. "`", on_error = function(msg) self:error(msg) - self.importing = nil - Util.track() end, }) + self.importing = nil + Util.track() end if imported == 0 then self:error("No specs found for module " .. spec.import) From b4a5a1209e4c64fa67aedf721a383541a64056d1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 24 Jul 2024 07:23:36 +0200 Subject: [PATCH 097/148] fix(plugin): make .lazy.lua work again --- lua/lazy/core/plugin.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 1aef7c7..97347a7 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -167,7 +167,7 @@ function Spec:import(spec) return a.modname < b.modname end) else - modspecs = { modname = import_name, load = spec.import } + modspecs = { { modname = import_name, load = spec.import } } end for _, modspec in ipairs(modspecs) do @@ -203,7 +203,7 @@ function Spec:import(spec) Util.track() end if imported == 0 then - self:error("No specs found for module " .. spec.import) + self:error("No specs found for module " .. vim.inspect(spec.import)) end end From 4496b4cad69a862199bb3ad452d3c4988bb925a1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 07:38:49 +0200 Subject: [PATCH 098/148] chore(main): release 11.14.0 (#1673) :robot: I have created a release *beep* *boop* --- ## [11.14.0](https://github.com/folke/lazy.nvim/compare/v11.13.5...v11.14.0) (2024-07-24) ### Features * added `opts.git.cooldown` to allow updating plugins on slow connections. Fixes [#1656](https://github.com/folke/lazy.nvim/issues/1656) ([d5686ef](https://github.com/folke/lazy.nvim/commit/d5686efbd00942b3e38de7c08b8df69d961b02f0)) * **plugin:** improve error handling and show better error message ([c02268a](https://github.com/folke/lazy.nvim/commit/c02268ac6e6aab92249d020d75efc588bd9d24fa)) ### Bug Fixes * **plugin:** make .lazy.lua work again ([b4a5a12](https://github.com/folke/lazy.nvim/commit/b4a5a1209e4c64fa67aedf721a383541a64056d1)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 73b8cd1..ec03d72 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.13.5" + ".": "11.14.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index ed2bf2c..a67aea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [11.14.0](https://github.com/folke/lazy.nvim/compare/v11.13.5...v11.14.0) (2024-07-24) + + +### Features + +* added `opts.git.cooldown` to allow updating plugins on slow connections. Fixes [#1656](https://github.com/folke/lazy.nvim/issues/1656) ([d5686ef](https://github.com/folke/lazy.nvim/commit/d5686efbd00942b3e38de7c08b8df69d961b02f0)) +* **plugin:** improve error handling and show better error message ([c02268a](https://github.com/folke/lazy.nvim/commit/c02268ac6e6aab92249d020d75efc588bd9d24fa)) + + +### Bug Fixes + +* **plugin:** make .lazy.lua work again ([b4a5a12](https://github.com/folke/lazy.nvim/commit/b4a5a1209e4c64fa67aedf721a383541a64056d1)) + ## [11.13.5](https://github.com/folke/lazy.nvim/compare/v11.13.4...v11.13.5) (2024-07-22) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index f5633b1..1a8dba7 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -239,7 +239,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.13.5" -- x-release-please-version +M.version = "11.14.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 7108809ab18dc1b1e6f402b29e2e1d35a5d311d5 Mon Sep 17 00:00:00 2001 From: Alexander Grebennik Date: Thu, 25 Jul 2024 12:53:01 +0200 Subject: [PATCH 099/148] fix(plugins): "Vim:E150: Not a directory" on plugin update (#1679) ## Description On plugins update it fails with following error for any plugin. ``` ~/.local/share/nvim/lazy/lazy.nvim/manage/task/plugin.lua:95: Vim:E150: Not a directory: ~/.local/share/nvim/lazy/gitsigns.nvim/doc/ ``` --- lua/lazy/manage/task/plugin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/manage/task/plugin.lua b/lua/lazy/manage/task/plugin.lua index bd565f8..69a93a5 100644 --- a/lua/lazy/manage/task/plugin.lua +++ b/lua/lazy/manage/task/plugin.lua @@ -90,7 +90,7 @@ M.docs = { return not plugin._.dirty end, run = function(self) - local docs = self.plugin.dir .. "/doc/" + local docs = self.plugin.dir .. "/doc" if Util.file_exists(docs) then self:log(vim.api.nvim_cmd({ cmd = "helptags", args = { docs } }, { output = true })) end From 077102c5bfc578693f12377846d427f49bc50076 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:38:23 +0200 Subject: [PATCH 100/148] chore(main): release 11.14.1 (#1680) :robot: I have created a release *beep* *boop* --- ## [11.14.1](https://github.com/folke/lazy.nvim/compare/v11.14.0...v11.14.1) (2024-07-25) ### Bug Fixes * **plugins:** "Vim:E150: Not a directory" on plugin update ([#1679](https://github.com/folke/lazy.nvim/issues/1679)) ([7108809](https://github.com/folke/lazy.nvim/commit/7108809ab18dc1b1e6f402b29e2e1d35a5d311d5)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index ec03d72..fe56f44 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.14.0" + ".": "11.14.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a67aea8..83a3375 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.14.1](https://github.com/folke/lazy.nvim/compare/v11.14.0...v11.14.1) (2024-07-25) + + +### Bug Fixes + +* **plugins:** "Vim:E150: Not a directory" on plugin update ([#1679](https://github.com/folke/lazy.nvim/issues/1679)) ([7108809](https://github.com/folke/lazy.nvim/commit/7108809ab18dc1b1e6f402b29e2e1d35a5d311d5)) + ## [11.14.0](https://github.com/folke/lazy.nvim/compare/v11.13.5...v11.14.0) (2024-07-24) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 1a8dba7..06719b9 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -239,7 +239,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.14.0" -- x-release-please-version +M.version = "11.14.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 014a72b7a87ccf56670412edb87a431b196e5864 Mon Sep 17 00:00:00 2001 From: Christoph Zirkelbach <31811+tigion@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:57:58 +0200 Subject: [PATCH 101/148] docs: update dev.path description (#1711) ## Description In the issue (#1707) I was confused by the description of `dev.path`. I thought functions must also return the general directory for local plugins, but it must be the plugin directory. ## Related Issue(s) #1707 --- lua/lazy/core/config.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 06719b9..16cc012 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -67,7 +67,9 @@ M.defaults = { hererocks = nil, }, dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + -- Directory where you store your local plugin projects. If a function is used, + -- the plugin directory (e.g. `~/projects/plugin-name`) must be returned. + ---@type string | fun(plugin: LazyPlugin): string path = "~/projects", ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub patterns = {}, -- For example {"folke"} From 80da254e645f579c28394ee0f08f75a9c9481744 Mon Sep 17 00:00:00 2001 From: Roger Kim Date: Sat, 31 Aug 2024 02:58:43 -0400 Subject: [PATCH 102/148] fix(rocks): add lib64 plugin directory to package.cpath (#1717) ## Description `package.cpath` is missing the `lib64` directory for plugins that have luarocks dependencies. ## Context I found this issue when I was working on my new Neovim plugin on my Fedora 39 machine. I added the `luasockets` dependency to rockspec file in my plugin like so: ``` rockspec_format = "3.0" package = "typeracer.nvim" version = "scm-1" source = { url = "git+https://github.com/carbon-steel/typeracer.nvim", } dependencies = { "luasocket", } test_dependencies = { "nlua", } build = { type = "builtin", copy_directories = {}, } ``` I found that the dynamic libraries from the `luasockets` dependency were installed like so: `/home/username/.local/share/nvim/lazy-rocks/typeracer.nvim/lib64/lua/5.1/socket/core.so`. However, the only entry related to my plugin `typeracer.nvim` was: `/home/glyph/.local/share/nvim/lazy-rocks/typeracer.nvim/lib/lua/5.1/?.so`. The issue is that we only have the plugin's `lib` directory in `package.cpath` and not `lib64`. I looked through `lazy.nvim`'s code and I think adding the `lib64` directory should fix the issue. I don't know if we also want to worry about `lib32` as well, but so far, this change works for me. --- lua/lazy/core/loader.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index cfcc136..c6a7271 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -493,8 +493,11 @@ function M.add_to_luapath(plugin) local root = Config.options.rocks.root .. "/" .. plugin.name local path = root .. "/share/lua/5.1" local cpath = root .. "/lib/lua/5.1" + local cpath2 = root .. "/lib64/lua/5.1" + package.path = package.path .. ";" .. path .. "/?.lua;" .. path .. "/?/init.lua;" package.cpath = package.cpath .. ";" .. cpath .. "/?." .. (jit.os:find("Windows") and "dll" or "so") .. ";" + package.cpath = package.cpath .. ";" .. cpath2 .. "/?." .. (jit.os:find("Windows") and "dll" or "so") .. ";" end function M.source(path) From 591ef40f2da3a26fbcc0466988cd6fe45ca68cae Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sat, 31 Aug 2024 13:59:45 +0700 Subject: [PATCH 103/148] fix(luarocks): try to install from root manifest (#1687) ## Description When passing the `--dev` flag to `luarocks`, it will prioritise `dev` versions when resolving dependencies (treating `dev` or `scm` as greater than a SemVer version) if the rockspec doesn't specify an upper version constraint (which is often the case). Dev packages are often unstable and may cause more problems, especially for Windows users (an example I've seen is git for windows trying and failing to checkout submodules). For now , a good compromise between too many retries and not retrying at all could be to try `luarocks install` from the root manifest first, but to keep the `--dev` flag in `luarocks make`. If that still causes problems, it might be better to fall back to `luarocks make` without `--dev` first, and then to try `luarocks ---dev make` as a last resort. In rocks.nvim, we only fall back to adding the `--dev` flag if the install error message contains the string `"No results matching query were found"`; assuming that stable non-dev packages shouldn't depend on dev packages. --- lua/lazy/pkg/rockspec.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazy/pkg/rockspec.lua b/lua/lazy/pkg/rockspec.lua index 19d580d..d7ecfdb 100644 --- a/lua/lazy/pkg/rockspec.lua +++ b/lua/lazy/pkg/rockspec.lua @@ -172,7 +172,6 @@ function M.build(task) root, "--server", Config.options.rocks.server, - "--dev", "--lua-version", "5.1", "install", -- use install so that we can make use of pre-built rocks From 48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 Aug 2024 07:03:18 +0000 Subject: [PATCH 104/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 1496 +++++++++++++++++++++++++++-- 1 file changed, 1418 insertions(+), 78 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 87b46dd..b91e678 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -10,27 +10,39 @@ return }, { name = "adopure.nvim", url = "Willem-J-an/adopure.nvim", - version = "1.1.0-1" + version = "1.1.2-1" }, { name = "aerial.nvim", url = "stevearc/aerial.nvim", - version = "1.7.0-1" + version = "2.2.0-1" }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", version = "0.1.0-1" + }, { + name = "astral.nvim", + url = "rootiest/astral.nvim", + version = "1.0.9-1" }, { name = "auto-hlsearch.nvim", url = "asiryk/auto-hlsearch.nvim", version = "1.1.0-1" + }, { + name = "banana.nvim", + url = "CWood-sdf/banana.nvim", + version = "0.1.0-1" }, { name = "better-escape.nvim", url = "max397574/better-escape.nvim", - version = "1.0.0-1" + version = "2.3.2-1" }, { name = "bufferline.nvim", url = "akinsho/bufferline.nvim", - version = "4.6.1-1" + version = "4.7.0-1" + }, { + name = "care.nvim", + url = "max397574/care.nvim", + version = "0.1.0-1" }, { name = "ccc.nvim", url = "uga-rosa/ccc.nvim", @@ -39,6 +51,10 @@ return name = "ci-template.nvim", url = "linrongbin16/ci-template.nvim", version = "8.1.0-1" + }, { + name = "cinnamon.nvim", + url = "declancm/cinnamon.nvim", + version = "1.2.5-1" }, { name = "cmp-rg", url = "lukas-reineke/cmp-rg", @@ -70,11 +86,11 @@ return }, { name = "commons.nvim", url = "linrongbin16/commons.nvim", - version = "18.0.0-1" + version = "19.0.0-1" }, { name = "conform.nvim", url = "stevearc/conform.nvim", - version = "6.0.0-1" + version = "8.0.0-1" }, { name = "cybu.nvim", url = "ghillb/cybu.nvim", @@ -91,6 +107,10 @@ return name = "decipher.nvim", url = "MisanthropicBit/decipher.nvim", version = "1.0.1-1" + }, { + name = "delog.nvim", + url = "ej-shafran/delog.nvim", + version = "0.0.2-1" }, { name = "detour.nvim", url = "carbon-steel/detour.nvim", @@ -114,7 +134,7 @@ return }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "8.4.0-1" + version = "8.6.1-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -126,15 +146,19 @@ return }, { name = "edgy.nvim", url = "folke/edgy.nvim", - version = "1.9.1-1" + version = "1.10.2-1" + }, { + name = "efmls-configs-nvim", + url = "creativenull/efmls-configs-nvim", + version = "1.7.0-1" }, { name = "elixir-tools.nvim", url = "elixir-tools/elixir-tools.nvim", - version = "0.14.3-1" + version = "0.16.0-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", - version = "1.6.2-1" + version = "1.6.3-1" }, { name = "fidget.nvim", url = "j-hui/fidget.nvim", @@ -142,7 +166,7 @@ return }, { name = "flash.nvim", url = "folke/flash.nvim", - version = "1.18.3-1" + version = "2.1.0-1" }, { name = "flatten.nvim", url = "willothy/flatten.nvim", @@ -150,11 +174,15 @@ return }, { name = "flutter-tools.nvim", url = "akinsho/flutter-tools.nvim", - version = "1.10.0-1" + version = "1.14.0-1" }, { name = "focus.nvim", url = "nvim-focus/focus.nvim", version = "1.0.2-1" + }, { + name = "foldtext.nvim", + url = "OXY2DEV/foldtext.nvim", + version = "1.0.0-1" }, { name = "freeze-code.nvim", url = "AlejandroSuero/freeze-code.nvim", @@ -162,7 +190,7 @@ return }, { name = "fugit2.nvim", url = "SuperBo/fugit2.nvim", - version = "0.2.0-1" + version = "0.2.1-1" }, { name = "funnyfiles.nvim", url = "aikooo7/funnyfiles.nvim", @@ -182,7 +210,11 @@ return }, { name = "git-worktree.nvim", url = "polarmutex/git-worktree.nvim", - version = "1.0.0-1" + version = "2.0.1-1" + }, { + name = "git.nvim", + url = "Kibadda/git.nvim", + version = "3.3.1-1" }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", @@ -191,10 +223,6 @@ return name = "gitlinker.nvim", url = "linrongbin16/gitlinker.nvim", version = "4.13.1-1" - }, { - name = "gitsigns.nvim", - url = "lewis6991/gitsigns.nvim", - version = "scm-1" }, { name = "glow.nvim", url = "ellisonleao/glow.nvim", @@ -202,7 +230,7 @@ return }, { name = "go.nvim", url = "ray-x/go.nvim", - version = "0.2.1-1" + version = "0.9.0-1" }, { name = "godo.nvim", url = "arthuradolfo/godo.nvim", @@ -215,6 +243,10 @@ return name = "gruvbox.nvim", url = "ellisonleao/gruvbox.nvim", version = "2.0.0-1" + }, { + name = "hardhat.nvim", + url = "TheSnakeWitcher/hardhat.nvim", + version = "0.1.0-1" }, { name = "haskell-snippets.nvim", url = "mrcjkb/haskell-snippets.nvim", @@ -222,7 +254,7 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "3.1.10-1" + version = "4.0.1-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", @@ -231,6 +263,14 @@ return name = "heirline.nvim", url = "rebelot/heirline.nvim", version = "1.0.6-1" + }, { + name = "helpview.nvim", + url = "OXY2DEV/helpview.nvim", + version = "1.1.0-1" + }, { + name = "hibiscus.nvim", + url = "udayvir-singh/hibiscus.nvim", + version = "1.7-1" }, { name = "hlchunk.nvim", url = "shellRaining/hlchunk.nvim", @@ -238,7 +278,11 @@ return }, { name = "hotpot.nvim", url = "rktjmp/hotpot.nvim", - version = "0.12.1-1" + version = "0.14.3-1" + }, { + name = "hurl.nvim", + url = "jellydn/hurl.nvim", + version = "1.7.0-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -254,7 +298,7 @@ return }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.6.3-1" + version = "3.7.2-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -262,7 +306,15 @@ return }, { name = "lazy.nvim", url = "folke/lazy.nvim", - version = "11.2.1-1" + version = "11.14.1-1" + }, { + name = "lazydev.nvim", + url = "folke/lazydev.nvim", + version = "1.8.0-1" + }, { + name = "lean.nvim", + url = "Julian/lean.nvim", + version = "1.0.0-1" }, { name = "leetcode.nvim", url = "kawre/leetcode.nvim", @@ -275,6 +327,10 @@ return name = "live-command.nvim", url = "smjonas/live-command.nvim", version = "1.2.1-1" + }, { + name = "logger.nvim", + url = "jnpngshiii/logger.nvim", + version = "0.4.6-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -283,10 +339,14 @@ return name = "love2d.nvim", url = "S1M0N38/love2d.nvim", version = "0.2-1" + }, { + name = "lsp-format.nvim", + url = "lukas-reineke/lsp-format.nvim", + version = "2.7.1-1" }, { name = "lsp-progress.nvim", url = "linrongbin16/lsp-progress.nvim", - version = "1.0.12-1" + version = "1.0.13-1" }, { name = "lsp_signature.nvim", url = "ray-x/lsp_signature.nvim", @@ -310,23 +370,39 @@ return }, { name = "luarocks-build-treesitter-parser", url = "nvim-neorocks/luarocks-build-treesitter-parser", - version = "4.1.0-1" + version = "5.0.2-1" + }, { + name = "luarocks-build-treesitter-parser-cpp", + url = "nvim-neorocks/luarocks-build-treesitter-parser-cpp", + version = "2.0.4-1" }, { name = "mapx.nvim", url = "b0o/mapx.nvim", version = "0.2.1-1" + }, { + name = "markdown.nvim", + url = "MeanderingProgrammer/render-markdown.nvim", + version = "5.0.1-1" + }, { + name = "markview.nvim", + url = "OXY2DEV/markview.nvim", + version = "22.0.1-1" }, { name = "mason-lspconfig.nvim", url = "williamboman/mason-lspconfig.nvim", - version = "1.29.0-1" + version = "1.30.0-1" }, { name = "mason-nvim-dap.nvim", url = "jay-babu/mason-nvim-dap.nvim", - version = "2.3.0-1" + version = "2.4.0-1" }, { name = "mason.nvim", url = "williamboman/mason.nvim", version = "1.10.0-1" + }, { + name = "mindmap.nvim", + url = "jnpngshiii/mindmap.nvim", + version = "0.7.1-1" }, { name = "mini.nvim", url = "echasnovski/mini.nvim", @@ -334,7 +410,7 @@ return }, { name = "mkdnflow.nvim", url = "jakewvincent/mkdnflow.nvim", - version = "1.2.0-1" + version = "1.2.4-1" }, { name = "move.nvim", url = "fedepujol/move.nvim", @@ -342,7 +418,7 @@ return }, { name = "multicursors.nvim", url = "smoka7/multicursors.nvim", - version = "1.0.0-1" + version = "2.0.0-1" }, { name = "my-awesome-plugin.nvim", url = "S1M0N38/my-awesome-plugin.nvim", @@ -358,7 +434,7 @@ return }, { name = "neoconf.nvim", url = "folke/neoconf.nvim", - version = "1.2.2-1" + version = "1.3.2-1" }, { name = "neodev.nvim", url = "folke/neodev.nvim", @@ -366,7 +442,7 @@ return }, { name = "neogen", url = "danymat/neogen", - version = "2.17.1-1" + version = "2.19.4-1" }, { name = "neogit", url = "NeogitOrg/neogit", @@ -374,11 +450,27 @@ return }, { name = "neorg", url = "nvim-neorg/neorg", - version = "8.7.1-1" + version = "9.1.1-1" + }, { + name = "neorg-conceal-wrap", + url = "benlubas/neorg-conceal-wrap", + version = "1.0.0-1" + }, { + name = "neorg-interim-ls", + url = "benlubas/neorg-interim-ls", + version = "1.2.0-1" + }, { + name = "neorg-se", + url = "benlubas/neorg-se", + version = "1.1.10-1" }, { name = "neorg-telescope", url = "nvim-neorg/neorg-telescope", - version = "1.1.0-1" + version = "1.2.2-1" + }, { + name = "neorg-worklog", + url = "bottd/neorg-worklog", + version = "1.3.4-1" }, { name = "neoscroll.nvim", url = "karb94/neoscroll.nvim", @@ -386,27 +478,43 @@ return }, { name = "neotest", url = "nvim-neotest/neotest", - version = "5.3.3-1" + version = "5.4.1-1" + }, { + name = "neotest-busted", + url = "MisanthropicBit/neotest-busted", + version = "0.1.0-1" + }, { + name = "neotest-golang", + url = "fredrikaverpil/neotest-golang", + version = "1.0.0-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", - version = "2.0.0-1" + version = "2.1.0-1" + }, { + name = "neotest-java", + url = "rcasia/neotest-java", + version = "0.14.1-1" + }, { + name = "netman.nvim", + url = "miversen33/netman.nvim", + version = "1.15-1" }, { name = "nightfox.nvim", url = "EdenEast/nightfox.nvim", - version = "3.9.3-1" + version = "3.10.0-1" }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "1.14.0-1" + version = "1.16.0-1" }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.3.0-1" + version = "4.5.0-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", - version = "0.1.0-1" + version = "0.3.0-1" }, { name = "nui-components.nvim", url = "grapp-dev/nui-components.nvim", @@ -415,6 +523,10 @@ return name = "nui.nvim", url = "MunifTanjim/nui.nvim", version = "0.3.0-1" + }, { + name = "nvim-bqf", + url = "kevinhwang91/nvim-bqf", + version = "1.1.1-1" }, { name = "nvim-client", url = "neovim/lua-client", @@ -423,10 +535,6 @@ return name = "nvim-client-proxy", url = "hjdivad/nvim-client-proxy", version = "0.1.0-1" - }, { - name = "nvim-cmp", - url = "hrsh7th/nvim-cmp", - version = "0.0.1-2" }, { name = "nvim-cokeline", url = "willothy/nvim-cokeline", @@ -442,7 +550,7 @@ return }, { name = "nvim-dbee", url = "kndndrj/nvim-dbee", - version = "0.1.6-1" + version = "0.1.9-1" }, { name = "nvim-dev-container", url = "esensar/nvim-dev-container", @@ -486,7 +594,7 @@ return }, { name = "nvim-nio", url = "nvim-neotest/nvim-nio", - version = "1.9.4-1" + version = "1.10.0-1" }, { name = "nvim-notify", url = "rcarriga/nvim-notify", @@ -502,15 +610,19 @@ return }, { name = "nvim-possession", url = "gennaro-tedesco/nvim-possession", - version = "0.0.13-1" + version = "0.0.14-1" }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", - version = "5.1.0-1" + version = "5.2.1-1" }, { name = "nvim-smuggler", url = "Klafyvel/nvim-smuggler", - version = "main-1" + version = "0.3.0-1" + }, { + name = "nvim-snippets", + url = "garymjr/nvim-snippets", + version = "1.0.0-1" }, { name = "nvim-snippy", url = "dcampos/nvim-snippy", @@ -522,7 +634,7 @@ return }, { name = "nvim-tree.lua", url = "nvim-tree/nvim-tree.lua", - version = "1.4.0-1" + version = "1.6.0-1" }, { name = "nvim-treesitter-legacy-api", url = "nvim-treesitter/nvim-treesitter", @@ -535,18 +647,22 @@ return name = "nvim-web-devicons", url = "nvim-tree/nvim-web-devicons", version = "0.100-1" + }, { + name = "nvim-window-picker", + url = "s1n7ax/nvim-window-picker", + version = "2.0.3-1" }, { name = "obsidian.nvim", url = "epwalsh/obsidian.nvim", - version = "3.8.0-1" + version = "3.9.0-1" }, { name = "oil.nvim", url = "stevearc/oil.nvim", - version = "2.10.0-1" + version = "2.12.1-1" }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "0.8.0-1" + version = "1.0.0-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -554,7 +670,7 @@ return }, { name = "otter.nvim", url = "jmbuhr/otter.nvim", - version = "1.15.1-1" + version = "2.5.0-1" }, { name = "overseer.nvim", url = "stevearc/overseer.nvim", @@ -574,7 +690,7 @@ return }, { name = "papis.nvim", url = "jghauser/papis.nvim", - version = "0.5.1-1" + version = "0.6.1-1" }, { name = "paq-nvim", url = "savq/paq-nvim", @@ -582,11 +698,15 @@ return }, { name = "pathlib.nvim", url = "pysan3/pathlib.nvim", - version = "2.2.2-1" + version = "2.2.3-1" + }, { + name = "persisted.nvim", + url = "olimorris/persisted.nvim", + version = "1.1.0-1" }, { name = "persistence.nvim", url = "folke/persistence.nvim", - version = "2.0.0-1" + version = "3.1.0-1" }, { name = "plenary.nvim", url = "nvim-lua/plenary.nvim", @@ -595,42 +715,66 @@ return name = "pretty-fold.nvim", url = "anuvyklack/pretty-fold.nvim", version = "3.0-1" + }, { + name = "quarry.nvim", + url = "rudionrails/quarry.nvim", + version = "2.3.0-1" + }, { + name = "quicker.nvim", + url = "stevearc/quicker.nvim", + version = "1.1.1-1" }, { name = "rainbow-delimiters.nvim", url = "HiPhish/rainbow-delimiters.nvim", - version = "0.4.0-1" + version = "0.6.1-1" + }, { + name = "remember.nvim", + url = "vladdoster/remember.nvim", + version = "1.4.1-1" }, { name = "renamer.nvim", url = "filipdutescu/renamer.nvim", version = "5.1.0-1" + }, { + name = "render-markdown.nvim", + url = "MeanderingProgrammer/render-markdown.nvim", + version = "6.3.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "2.0.1-1" + version = "3.2.1-1" }, { name = "rocks-config.nvim", url = "nvim-neorocks/rocks-config.nvim", - version = "2.1.0-1" + version = "2.2.0-1" }, { name = "rocks-dev.nvim", url = "nvim-neorocks/rocks-dev.nvim", - version = "1.2.3-1" + version = "1.5.0-1" }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "1.5.1-1" + version = "2.0.1-1" + }, { + name = "rocks-lazy.nvim", + url = "nvim-neorocks/rocks-lazy.nvim", + version = "1.0.1-1" + }, { + name = "rocks-treesitter.nvim", + url = "nvim-neorocks/rocks-treesitter.nvim", + version = "1.1.1-1" }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.32.0-1" + version = "2.38.2-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", - version = "1.0.0-1" + version = "1.2.0-1" }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "4.25.1-1" + version = "5.2.2-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -638,7 +782,7 @@ return }, { name = "screenkey.nvim", url = "NStefan002/screenkey.nvim", - version = "2.1.0-1" + version = "2.2.1-1" }, { name = "scrollbar.nvim", url = "Xuyuanp/scrollbar.nvim", @@ -646,7 +790,11 @@ return }, { name = "session.nvim", url = "Kibadda/session.nvim", - version = "2.0.0-1" + version = "3.0.0-1" + }, { + name = "sf.nvim", + url = "xixiaofinland/sf.nvim", + version = "1.5.0-1" }, { name = "sg.nvim", url = "sourcegraph/sg.nvim", @@ -654,7 +802,7 @@ return }, { name = "smart-splits.nvim", url = "mrjones2014/smart-splits.nvim", - version = "1.5.0-1" + version = "1.6.0-1" }, { name = "squirrel.nvim", url = "xiaoshihou514/squirrel.nvim", @@ -671,14 +819,22 @@ return name = "substitute.nvim", url = "gbprod/substitute.nvim", version = "2.0.0-1" + }, { + name = "sus.nvim", + url = "TarunDaCoder/sus.nvim", + version = "1.0.0-1" }, { name = "sweetie.nvim", url = "NTBBloodbath/sweetie.nvim", - version = "3.1.1-1" + version = "3.2.0-1" }, { name = "tabby.nvim", url = "nanozuki/tabby.nvim", version = "2.5.1-1" + }, { + name = "tangerine.nvim", + url = "udayvir-singh/tangerine.nvim", + version = "2.9-1" }, { name = "telescope-zf-native.nvim", url = "natecraddock/telescope-zf-native.nvim", @@ -690,35 +846,1215 @@ return }, { name = "todo-comments.nvim", url = "folke/todo-comments.nvim", - version = "1.2.0-1" + version = "1.3.0-1" }, { name = "toggleterm.nvim", url = "akinsho/toggleterm.nvim", - version = "2.11.0-1" + version = "2.12.0-1" }, { name = "tokyonight.nvim", url = "folke/tokyonight.nvim", - version = "3.0.1-1" + version = "4.8.0-1" + }, { + name = "tree-sitter-ada", + url = "briot/tree-sitter-ada", + version = "0.0.2-1" + }, { + name = "tree-sitter-agda", + url = "tree-sitter/tree-sitter-agda", + version = "0.0.2-1" + }, { + name = "tree-sitter-angular", + url = "dlvandenberg/tree-sitter-angular", + version = "0.0.3-1" + }, { + name = "tree-sitter-apex", + url = "aheber/tree-sitter-sfapex", + version = "0.0.3-1" + }, { + name = "tree-sitter-arduino", + url = "tree-sitter-grammars/tree-sitter-arduino", + version = "0.0.2-1" + }, { + name = "tree-sitter-asm", + url = "RubixDev/tree-sitter-asm", + version = "0.0.3-1" + }, { + name = "tree-sitter-astro", + url = "virchau13/tree-sitter-astro", + version = "0.0.2-1" + }, { + name = "tree-sitter-authzed", + url = "mleonidas/tree-sitter-authzed", + version = "0.0.2-1" + }, { + name = "tree-sitter-awk", + url = "Beaglefoot/tree-sitter-awk", + version = "0.0.2-1" + }, { + name = "tree-sitter-bash", + url = "tree-sitter/tree-sitter-bash", + version = "0.0.2-1" + }, { + name = "tree-sitter-bass", + url = "vito/tree-sitter-bass", + version = "0.0.2-1" + }, { + name = "tree-sitter-beancount", + url = "polarmutex/tree-sitter-beancount", + version = "0.0.3-1" + }, { + name = "tree-sitter-bibtex", + url = "latex-lsp/tree-sitter-bibtex", + version = "0.0.2-1" + }, { + name = "tree-sitter-bicep", + url = "tree-sitter-grammars/tree-sitter-bicep", + version = "0.0.2-1" + }, { + name = "tree-sitter-bitbake", + url = "tree-sitter-grammars/tree-sitter-bitbake", + version = "0.0.2-1" + }, { + name = "tree-sitter-blueprint", + url = "https://gitlab.com/gabmus/tree-sitter-blueprint/-/archive/60ba73739c6083c693d86a1a7cf039c07eb4ed59.zip", + version = "0.0.2-1" + }, { + name = "tree-sitter-bp", + url = "ambroisie/tree-sitter-bp", + version = "0.0.2-1" + }, { + name = "tree-sitter-c", + url = "tree-sitter/tree-sitter-c", + version = "0.0.3-1" + }, { + name = "tree-sitter-c_sharp", + url = "tree-sitter/tree-sitter-c-sharp", + version = "0.0.2-1" + }, { + name = "tree-sitter-cairo", + url = "tree-sitter-grammars/tree-sitter-cairo", + version = "0.0.2-1" + }, { + name = "tree-sitter-capnp", + url = "tree-sitter-grammars/tree-sitter-capnp", + version = "0.0.2-1" + }, { + name = "tree-sitter-chatito", + url = "tree-sitter-grammars/tree-sitter-chatito", + version = "0.0.2-1" + }, { + name = "tree-sitter-clojure", + url = "sogaiu/tree-sitter-clojure", + version = "0.0.2-1" + }, { + name = "tree-sitter-cmake", + url = "uyha/tree-sitter-cmake", + version = "0.0.2-1" + }, { + name = "tree-sitter-comment", + url = "stsewd/tree-sitter-comment", + version = "0.0.3-1" + }, { + name = "tree-sitter-commonlisp", + url = "tree-sitter-grammars/tree-sitter-commonlisp", + version = "0.0.2-1" + }, { + name = "tree-sitter-cooklang", + url = "addcninblue/tree-sitter-cooklang", + version = "0.0.2-1" + }, { + name = "tree-sitter-corn", + url = "jakestanger/tree-sitter-corn", + version = "0.0.2-1" + }, { + name = "tree-sitter-cpon", + url = "tree-sitter-grammars/tree-sitter-cpon", + version = "0.0.2-1" + }, { + name = "tree-sitter-cpp", + url = "tree-sitter/tree-sitter-cpp", + version = "0.0.3-1" + }, { + name = "tree-sitter-css", + url = "tree-sitter/tree-sitter-css", + version = "0.0.3-1" + }, { + name = "tree-sitter-csv", + url = "tree-sitter-grammars/tree-sitter-csv", + version = "0.0.2-1" + }, { + name = "tree-sitter-cuda", + url = "tree-sitter-grammars/tree-sitter-cuda", + version = "0.0.3-1" + }, { + name = "tree-sitter-cue", + url = "eonpatapon/tree-sitter-cue", + version = "0.0.2-1" + }, { + name = "tree-sitter-d", + url = "gdamore/tree-sitter-d", + version = "0.0.3-1" + }, { + name = "tree-sitter-dart", + url = "UserNobody14/tree-sitter-dart", + version = "0.0.3-1" + }, { + name = "tree-sitter-devicetree", + url = "joelspadin/tree-sitter-devicetree", + version = "0.0.3-1" + }, { + name = "tree-sitter-dhall", + url = "jbellerb/tree-sitter-dhall", + version = "0.0.2-1" + }, { + name = "tree-sitter-diff", + url = "the-mikedavis/tree-sitter-diff", + version = "0.0.2-1" + }, { + name = "tree-sitter-disassembly", + url = "ColinKennedy/tree-sitter-disassembly", + version = "0.0.2-1" + }, { + name = "tree-sitter-djot", + url = "treeman/tree-sitter-djot", + version = "0.0.2-1" + }, { + name = "tree-sitter-dockerfile", + url = "camdencheek/tree-sitter-dockerfile", + version = "0.0.2-1" + }, { + name = "tree-sitter-dot", + url = "rydesun/tree-sitter-dot", + version = "0.0.2-1" + }, { + name = "tree-sitter-doxygen", + url = "tree-sitter-grammars/tree-sitter-doxygen", + version = "0.0.2-1" + }, { + name = "tree-sitter-dtd", + url = "tree-sitter-grammars/tree-sitter-xml", + version = "0.0.2-1" + }, { + name = "tree-sitter-earthfile", + url = "glehmann/tree-sitter-earthfile", + version = "0.0.2-1" + }, { + name = "tree-sitter-ebnf", + url = "RubixDev/ebnf", + version = "0.0.2-1" + }, { + name = "tree-sitter-ecma", + url = "nvim-neorocks/luarocks-stub", + version = "0.0.2-1" + }, { + name = "tree-sitter-editorconfig", + url = "ValdezFOmar/tree-sitter-editorconfig", + version = "0.0.4-1" + }, { + name = "tree-sitter-eds", + url = "uyha/tree-sitter-eds", + version = "0.0.2-1" + }, { + name = "tree-sitter-eex", + url = "connorlay/tree-sitter-eex", + version = "0.0.2-1" + }, { + name = "tree-sitter-elixir", + url = "elixir-lang/tree-sitter-elixir", + version = "0.0.2-1" + }, { + name = "tree-sitter-elm", + url = "elm-tooling/tree-sitter-elm", + version = "0.0.2-1" + }, { + name = "tree-sitter-elsa", + url = "glapa-grossklag/tree-sitter-elsa", + version = "0.0.2-1" + }, { + name = "tree-sitter-elvish", + url = "elves/tree-sitter-elvish", + version = "0.0.2-1" + }, { + name = "tree-sitter-embedded_template", + url = "tree-sitter/tree-sitter-embedded-template", + version = "0.0.3-1" + }, { + name = "tree-sitter-erlang", + url = "WhatsApp/tree-sitter-erlang", + version = "0.0.3-1" + }, { + name = "tree-sitter-facility", + url = "FacilityApi/tree-sitter-facility", + version = "0.0.2-1" + }, { + name = "tree-sitter-faust", + url = "khiner/tree-sitter-faust", + version = "0.0.2-1" + }, { + name = "tree-sitter-fennel", + url = "alexmozaidze/tree-sitter-fennel", + version = "0.0.2-1" + }, { + name = "tree-sitter-fidl", + url = "google/tree-sitter-fidl", + version = "0.0.2-1" + }, { + name = "tree-sitter-firrtl", + url = "tree-sitter-grammars/tree-sitter-firrtl", + version = "0.0.2-1" + }, { + name = "tree-sitter-fish", + url = "ram02z/tree-sitter-fish", + version = "0.0.2-1" + }, { + name = "tree-sitter-foam", + url = "FoamScience/tree-sitter-foam", + version = "0.0.2-1" + }, { + name = "tree-sitter-forth", + url = "AlexanderBrevig/tree-sitter-forth", + version = "0.0.2-1" + }, { + name = "tree-sitter-fortran", + url = "stadelmanma/tree-sitter-fortran", + version = "0.0.4-1" + }, { + name = "tree-sitter-fsh", + url = "mgramigna/tree-sitter-fsh", + version = "0.0.2-1" + }, { + name = "tree-sitter-func", + url = "tree-sitter-grammars/tree-sitter-func", + version = "0.0.2-1" + }, { + name = "tree-sitter-fusion", + url = "https://gitlab.com/jirgn/tree-sitter-fusion/-/archive/19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6.zip", + version = "0.0.2-1" + }, { + name = "tree-sitter-gdscript", + url = "PrestonKnopp/tree-sitter-gdscript", + version = "0.0.2-1" + }, { + name = "tree-sitter-gdshader", + url = "GodOfAvacyn/tree-sitter-gdshader", + version = "0.0.2-1" + }, { + name = "tree-sitter-git_config", + url = "the-mikedavis/tree-sitter-git-config", + version = "0.0.2-1" + }, { + name = "tree-sitter-git_rebase", + url = "the-mikedavis/tree-sitter-git-rebase", + version = "0.0.3-1" + }, { + name = "tree-sitter-gitattributes", + url = "tree-sitter-grammars/tree-sitter-gitattributes", + version = "0.0.2-1" + }, { + name = "tree-sitter-gitcommit", + url = "gbprod/tree-sitter-gitcommit", + version = "0.0.2-1" + }, { + name = "tree-sitter-gitignore", + url = "shunsambongi/tree-sitter-gitignore", + version = "0.0.2-1" + }, { + name = "tree-sitter-gleam", + url = "gleam-lang/tree-sitter-gleam", + version = "0.0.3-1" + }, { + name = "tree-sitter-glimmer", + url = "alexlafroscia/tree-sitter-glimmer", + version = "0.0.3-1" + }, { + name = "tree-sitter-glsl", + url = "tree-sitter-grammars/tree-sitter-glsl", + version = "0.0.3-1" + }, { + name = "tree-sitter-gn", + url = "tree-sitter-grammars/tree-sitter-gn", + version = "0.0.2-1" + }, { + name = "tree-sitter-gnuplot", + url = "dpezto/tree-sitter-gnuplot", + version = "0.0.2-1" + }, { + name = "tree-sitter-go", + url = "tree-sitter/tree-sitter-go", + version = "0.0.3-1" + }, { + name = "tree-sitter-goctl", + url = "chaozwn/tree-sitter-goctl", + version = "0.0.3-1" + }, { + name = "tree-sitter-godot_resource", + url = "PrestonKnopp/tree-sitter-godot-resource", + version = "0.0.2-1" + }, { + name = "tree-sitter-gomod", + url = "camdencheek/tree-sitter-go-mod", + version = "0.0.3-1" + }, { + name = "tree-sitter-gosum", + url = "tree-sitter-grammars/tree-sitter-go-sum", + version = "0.0.2-1" + }, { + name = "tree-sitter-gotmpl", + url = "ngalaiko/tree-sitter-go-template", + version = "0.0.3-1" + }, { + name = "tree-sitter-gowork", + url = "omertuc/tree-sitter-go-work", + version = "0.0.2-1" + }, { + name = "tree-sitter-gpg", + url = "tree-sitter-grammars/tree-sitter-gpg-config", + version = "0.0.2-1" + }, { + name = "tree-sitter-graphql", + url = "bkegley/tree-sitter-graphql", + version = "0.0.2-1" + }, { + name = "tree-sitter-groovy", + url = "murtaza64/tree-sitter-groovy", + version = "0.0.3-1" + }, { + name = "tree-sitter-gstlaunch", + url = "tree-sitter-grammars/tree-sitter-gstlaunch", + version = "0.0.2-1" + }, { + name = "tree-sitter-hack", + url = "slackhq/tree-sitter-hack", + version = "0.0.2-1" + }, { + name = "tree-sitter-hare", + url = "tree-sitter-grammars/tree-sitter-hare", + version = "0.0.2-1" + }, { + name = "tree-sitter-haskell", + url = "tree-sitter/tree-sitter-haskell", + version = "0.0.2-1" + }, { + name = "tree-sitter-haskell_persistent", + url = "MercuryTechnologies/tree-sitter-haskell-persistent", + version = "0.0.2-1" + }, { + name = "tree-sitter-hcl", + url = "tree-sitter-grammars/tree-sitter-hcl", + version = "0.0.2-1" + }, { + name = "tree-sitter-heex", + url = "connorlay/tree-sitter-heex", + version = "0.0.3-1" + }, { + name = "tree-sitter-helm", + url = "ngalaiko/tree-sitter-go-template", + version = "0.0.3-1" + }, { + name = "tree-sitter-hjson", + url = "winston0410/tree-sitter-hjson", + version = "0.0.2-1" + }, { + name = "tree-sitter-hlsl", + url = "tree-sitter-grammars/tree-sitter-hlsl", + version = "0.0.3-1" + }, { + name = "tree-sitter-hlsplaylist", + url = "Freed-Wu/tree-sitter-hlsplaylist", + version = "0.0.3-1" + }, { + name = "tree-sitter-hocon", + url = "antosha417/tree-sitter-hocon", + version = "0.0.2-1" + }, { + name = "tree-sitter-hoon", + url = "urbit-pilled/tree-sitter-hoon", + version = "0.0.2-1" + }, { + name = "tree-sitter-html", + url = "tree-sitter/tree-sitter-html", + version = "0.0.3-1" + }, { + name = "tree-sitter-html_tags", + url = "nvim-neorocks/luarocks-stub", + version = "0.0.2-1" + }, { + name = "tree-sitter-htmldjango", + url = "interdependence/tree-sitter-htmldjango", + version = "0.0.2-1" + }, { + name = "tree-sitter-http", + url = "rest-nvim/tree-sitter-http", + version = "0.0.3-1" + }, { + name = "tree-sitter-hurl", + url = "pfeiferj/tree-sitter-hurl", + version = "0.0.3-1" + }, { + name = "tree-sitter-hyprlang", + url = "tree-sitter-grammars/tree-sitter-hyprlang", + version = "0.0.2-1" + }, { + name = "tree-sitter-idl", + url = "cathaysia/tree-sitter-idl", + version = "0.0.3-1" + }, { + name = "tree-sitter-ini", + url = "justinmk/tree-sitter-ini", + version = "0.0.3-1" + }, { + name = "tree-sitter-inko", + url = "inko-lang/tree-sitter-inko", + version = "0.0.2-1" + }, { + name = "tree-sitter-ispc", + url = "tree-sitter-grammars/tree-sitter-ispc", + version = "0.0.2-1" + }, { + name = "tree-sitter-janet_simple", + url = "sogaiu/tree-sitter-janet-simple", + version = "0.0.3-1" + }, { + name = "tree-sitter-java", + url = "tree-sitter/tree-sitter-java", + version = "0.0.3-1" + }, { + name = "tree-sitter-javascript", + url = "tree-sitter/tree-sitter-javascript", + version = "0.0.3-1" + }, { + name = "tree-sitter-jq", + url = "flurie/tree-sitter-jq", + version = "0.0.2-1" + }, { + name = "tree-sitter-jsdoc", + url = "tree-sitter/tree-sitter-jsdoc", + version = "0.0.2-1" + }, { + name = "tree-sitter-json", + url = "tree-sitter/tree-sitter-json", + version = "0.0.3-1" + }, { + name = "tree-sitter-json5", + url = "Joakker/tree-sitter-json5", + version = "0.0.2-1" + }, { + name = "tree-sitter-jsonc", + url = "https://gitlab.com/WhyNotHugo/tree-sitter-jsonc/-/archive/02b01653c8a1c198ae7287d566efa86a135b30d5.zip", + version = "0.0.2-1" + }, { + name = "tree-sitter-jsonnet", + url = "sourcegraph/tree-sitter-jsonnet", + version = "0.0.4-1" + }, { + name = "tree-sitter-jsx", + url = "nvim-neorocks/luarocks-stub", + version = "0.0.2-1" + }, { + name = "tree-sitter-julia", + url = "tree-sitter/tree-sitter-julia", + version = "0.0.3-1" + }, { + name = "tree-sitter-just", + url = "IndianBoy42/tree-sitter-just", + version = "0.0.3-1" + }, { + name = "tree-sitter-kconfig", + url = "tree-sitter-grammars/tree-sitter-kconfig", + version = "0.0.2-1" + }, { + name = "tree-sitter-kdl", + url = "tree-sitter-grammars/tree-sitter-kdl", + version = "0.0.2-1" + }, { + name = "tree-sitter-kotlin", + url = "fwcd/tree-sitter-kotlin", + version = "0.0.4-1" + }, { + name = "tree-sitter-koto", + url = "koto-lang/tree-sitter-koto", + version = "0.0.2-1" + }, { + name = "tree-sitter-kusto", + url = "Willem-J-an/tree-sitter-kusto", + version = "0.0.2-1" + }, { + name = "tree-sitter-lalrpop", + url = "traxys/tree-sitter-lalrpop", + version = "0.0.2-1" + }, { + name = "tree-sitter-latex", + url = "latex-lsp/tree-sitter-latex", + version = "0.0.3-1" + }, { + name = "tree-sitter-ledger", + url = "cbarrete/tree-sitter-ledger", + version = "0.0.2-1" + }, { + name = "tree-sitter-leo", + url = "r001/tree-sitter-leo", + version = "0.0.4-1" + }, { + name = "tree-sitter-linkerscript", + url = "tree-sitter-grammars/tree-sitter-linkerscript", + version = "0.0.2-1" + }, { + name = "tree-sitter-liquid", + url = "hankthetank27/tree-sitter-liquid", + version = "0.0.5-1" + }, { + name = "tree-sitter-liquidsoap", + url = "savonet/tree-sitter-liquidsoap", + version = "0.0.2-1" + }, { + name = "tree-sitter-llvm", + url = "benwilliamgraham/tree-sitter-llvm", + version = "0.0.2-1" + }, { + name = "tree-sitter-lua", + url = "tree-sitter-grammars/tree-sitter-lua", + version = "0.0.2-1" + }, { + name = "tree-sitter-luadoc", + url = "tree-sitter-grammars/tree-sitter-luadoc", + version = "0.0.2-1" + }, { + name = "tree-sitter-luap", + url = "tree-sitter-grammars/tree-sitter-luap", + version = "0.0.2-1" + }, { + name = "tree-sitter-luau", + url = "tree-sitter-grammars/tree-sitter-luau", + version = "0.0.2-1" + }, { + name = "tree-sitter-m68k", + url = "grahambates/tree-sitter-m68k", + version = "0.0.3-1" + }, { + name = "tree-sitter-make", + url = "alemuller/tree-sitter-make", + version = "0.0.2-1" + }, { + name = "tree-sitter-markdown", + url = "tree-sitter-grammars/tree-sitter-markdown", + version = "0.0.2-1" + }, { + name = "tree-sitter-markdown_inline", + url = "tree-sitter-grammars/tree-sitter-markdown", + version = "0.0.2-1" + }, { + name = "tree-sitter-matlab", + url = "acristoffers/tree-sitter-matlab", + version = "0.0.4-1" + }, { + name = "tree-sitter-menhir", + url = "Kerl13/tree-sitter-menhir", + version = "0.0.2-1" + }, { + name = "tree-sitter-mermaid", + url = "monaqa/tree-sitter-mermaid", + version = "0.0.2-1" + }, { + name = "tree-sitter-meson", + url = "tree-sitter-grammars/tree-sitter-meson", + version = "0.0.2-1" + }, { + name = "tree-sitter-mlir", + url = "artagnon/tree-sitter-mlir", + version = "0.0.3-1" + }, { + name = "tree-sitter-muttrc", + url = "neomutt/tree-sitter-muttrc", + version = "0.0.3-1" + }, { + name = "tree-sitter-nasm", + url = "naclsn/tree-sitter-nasm", + version = "0.0.2-1" + }, { + name = "tree-sitter-nginx", + url = "opa-oz/tree-sitter-nginx", + version = "0.0.2-1" + }, { + name = "tree-sitter-nickel", + url = "nickel-lang/tree-sitter-nickel", + version = "0.0.4-1" + }, { + name = "tree-sitter-nim", + url = "alaviss/tree-sitter-nim", + version = "0.0.2-1" + }, { + name = "tree-sitter-nim_format_string", + url = "aMOPel/tree-sitter-nim-format-string", + version = "0.0.2-1" + }, { + name = "tree-sitter-ninja", + url = "alemuller/tree-sitter-ninja", + version = "0.0.2-1" + }, { + name = "tree-sitter-nix", + url = "cstrahan/tree-sitter-nix", + version = "0.0.5-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", - version = "0.2.4-1" + version = "0.2.5-1" }, { name = "tree-sitter-norg-meta", url = "nvim-neorg/tree-sitter-norg-meta", version = "0.1.0-1" + }, { + name = "tree-sitter-nqc", + url = "tree-sitter-grammars/tree-sitter-nqc", + version = "0.0.2-1" + }, { + name = "tree-sitter-objc", + url = "tree-sitter-grammars/tree-sitter-objc", + version = "0.0.2-1" + }, { + name = "tree-sitter-objdump", + url = "ColinKennedy/tree-sitter-objdump", + version = "0.0.2-1" + }, { + name = "tree-sitter-ocaml", + url = "tree-sitter/tree-sitter-ocaml", + version = "0.0.2-1" + }, { + name = "tree-sitter-ocaml_interface", + url = "tree-sitter/tree-sitter-ocaml", + version = "0.0.2-1" + }, { + name = "tree-sitter-ocamllex", + url = "atom-ocaml/tree-sitter-ocamllex", + version = "0.0.2-1" + }, { + name = "tree-sitter-odin", + url = "tree-sitter-grammars/tree-sitter-odin", + version = "0.0.2-1" + }, { + name = "tree-sitter-org", + url = "milisims/tree-sitter-org", + version = "0.0.1-1" }, { name = "tree-sitter-orgmode", url = "nvim-orgmode/tree-sitter-org", version = "1.3.2-1" + }, { + name = "tree-sitter-pascal", + url = "Isopod/tree-sitter-pascal", + version = "0.0.3-1" + }, { + name = "tree-sitter-passwd", + url = "ath3/tree-sitter-passwd", + version = "0.0.2-1" + }, { + name = "tree-sitter-pem", + url = "tree-sitter-grammars/tree-sitter-pem", + version = "0.0.2-1" + }, { + name = "tree-sitter-perl", + url = "tree-sitter-perl/tree-sitter-perl", + version = "0.0.4-1" + }, { + name = "tree-sitter-php", + url = "tree-sitter/tree-sitter-php", + version = "0.0.4-1" + }, { + name = "tree-sitter-php_only", + url = "tree-sitter/tree-sitter-php", + version = "0.0.4-1" + }, { + name = "tree-sitter-phpdoc", + url = "claytonrcarter/tree-sitter-phpdoc", + version = "0.0.2-1" + }, { + name = "tree-sitter-pioasm", + url = "leo60228/tree-sitter-pioasm", + version = "0.0.2-1" + }, { + name = "tree-sitter-po", + url = "tree-sitter-grammars/tree-sitter-po", + version = "0.0.2-1" + }, { + name = "tree-sitter-pod", + url = "tree-sitter-perl/tree-sitter-pod", + version = "0.0.3-1" + }, { + name = "tree-sitter-poe_filter", + url = "tree-sitter-grammars/tree-sitter-poe-filter", + version = "0.0.2-1" + }, { + name = "tree-sitter-pony", + url = "tree-sitter-grammars/tree-sitter-pony", + version = "0.0.2-1" + }, { + name = "tree-sitter-powershell", + url = "airbus-cert/tree-sitter-powershell", + version = "0.0.3-1" + }, { + name = "tree-sitter-printf", + url = "tree-sitter-grammars/tree-sitter-printf", + version = "0.0.2-1" + }, { + name = "tree-sitter-prisma", + url = "victorhqc/tree-sitter-prisma", + version = "0.0.2-1" + }, { + name = "tree-sitter-problog", + url = "foxyseta/tree-sitter-prolog", + version = "0.0.3-1" + }, { + name = "tree-sitter-prolog", + url = "foxyseta/tree-sitter-prolog", + version = "0.0.3-1" + }, { + name = "tree-sitter-promql", + url = "MichaHoffmann/tree-sitter-promql", + version = "0.0.2-1" + }, { + name = "tree-sitter-properties", + url = "tree-sitter-grammars/tree-sitter-properties", + version = "0.0.2-1" + }, { + name = "tree-sitter-proto", + url = "treywood/tree-sitter-proto", + version = "0.0.2-1" + }, { + name = "tree-sitter-prql", + url = "PRQL/tree-sitter-prql", + version = "0.0.2-1" + }, { + name = "tree-sitter-psv", + url = "tree-sitter-grammars/tree-sitter-csv", + version = "0.0.2-1" + }, { + name = "tree-sitter-pug", + url = "zealot128/tree-sitter-pug", + version = "0.0.2-1" + }, { + name = "tree-sitter-puppet", + url = "tree-sitter-grammars/tree-sitter-puppet", + version = "0.0.2-1" + }, { + name = "tree-sitter-purescript", + url = "postsolar/tree-sitter-purescript", + version = "0.0.2-1" + }, { + name = "tree-sitter-pymanifest", + url = "tree-sitter-grammars/tree-sitter-pymanifest", + version = "0.0.2-1" + }, { + name = "tree-sitter-python", + url = "tree-sitter/tree-sitter-python", + version = "0.0.3-1" + }, { + name = "tree-sitter-ql", + url = "tree-sitter/tree-sitter-ql", + version = "0.0.2-1" + }, { + name = "tree-sitter-qmldir", + url = "tree-sitter-grammars/tree-sitter-qmldir", + version = "0.0.2-1" + }, { + name = "tree-sitter-qmljs", + url = "yuja/tree-sitter-qmljs", + version = "0.0.3-1" + }, { + name = "tree-sitter-query", + url = "tree-sitter-grammars/tree-sitter-query", + version = "0.0.2-1" + }, { + name = "tree-sitter-r", + url = "r-lib/tree-sitter-r", + version = "0.0.2-1" + }, { + name = "tree-sitter-racket", + url = "6cdh/tree-sitter-racket", + version = "0.0.2-1" + }, { + name = "tree-sitter-ralph", + url = "alephium/tree-sitter-ralph", + version = "0.0.2-1" + }, { + name = "tree-sitter-rasi", + url = "Fymyte/tree-sitter-rasi", + version = "0.0.2-1" + }, { + name = "tree-sitter-rbs", + url = "joker1007/tree-sitter-rbs", + version = "0.0.2-1" + }, { + name = "tree-sitter-re2c", + url = "tree-sitter-grammars/tree-sitter-re2c", + version = "0.0.2-1" + }, { + name = "tree-sitter-readline", + url = "tree-sitter-grammars/tree-sitter-readline", + version = "0.0.2-1" + }, { + name = "tree-sitter-regex", + url = "tree-sitter/tree-sitter-regex", + version = "0.0.2-1" + }, { + name = "tree-sitter-rego", + url = "FallenAngel97/tree-sitter-rego", + version = "0.0.2-1" + }, { + name = "tree-sitter-requirements", + url = "tree-sitter-grammars/tree-sitter-requirements", + version = "0.0.2-1" + }, { + name = "tree-sitter-rescript", + url = "rescript-lang/tree-sitter-rescript", + version = "0.0.3-1" + }, { + name = "tree-sitter-rnoweb", + url = "bamonroe/tree-sitter-rnoweb", + version = "0.0.2-1" + }, { + name = "tree-sitter-robot", + url = "Hubro/tree-sitter-robot", + version = "0.0.2-1" + }, { + name = "tree-sitter-robots", + url = "opa-oz/tree-sitter-robots-txt", + version = "0.0.2-1" + }, { + name = "tree-sitter-roc", + url = "faldor20/tree-sitter-roc", + version = "0.0.3-1" + }, { + name = "tree-sitter-ron", + url = "tree-sitter-grammars/tree-sitter-ron", + version = "0.0.2-1" + }, { + name = "tree-sitter-rst", + url = "stsewd/tree-sitter-rst", + version = "0.0.2-1" + }, { + name = "tree-sitter-ruby", + url = "tree-sitter/tree-sitter-ruby", + version = "0.0.3-1" + }, { + name = "tree-sitter-rust", + url = "tree-sitter/tree-sitter-rust", + version = "0.0.3-1" + }, { + name = "tree-sitter-scala", + url = "tree-sitter/tree-sitter-scala", + version = "0.0.3-1" + }, { + name = "tree-sitter-scfg", + url = "rockorager/tree-sitter-scfg", + version = "0.0.2-1" + }, { + name = "tree-sitter-scheme", + url = "6cdh/tree-sitter-scheme", + version = "0.0.2-1" + }, { + name = "tree-sitter-scss", + url = "serenadeai/tree-sitter-scss", + version = "0.0.2-1" + }, { + name = "tree-sitter-sflog", + url = "aheber/tree-sitter-sfapex", + version = "0.0.3-1" + }, { + name = "tree-sitter-slang", + url = "tree-sitter-grammars/tree-sitter-slang", + version = "0.0.3-1" + }, { + name = "tree-sitter-slint", + url = "slint-ui/tree-sitter-slint", + version = "0.0.3-1" + }, { + name = "tree-sitter-smali", + url = "tree-sitter-grammars/tree-sitter-smali", + version = "0.0.2-1" + }, { + name = "tree-sitter-smithy", + url = "indoorvivants/tree-sitter-smithy", + version = "0.0.2-1" + }, { + name = "tree-sitter-snakemake", + url = "osthomas/tree-sitter-snakemake", + version = "0.0.3-1" + }, { + name = "tree-sitter-solidity", + url = "JoranHonig/tree-sitter-solidity", + version = "0.0.2-1" + }, { + name = "tree-sitter-soql", + url = "aheber/tree-sitter-sfapex", + version = "0.0.3-1" + }, { + name = "tree-sitter-sosl", + url = "aheber/tree-sitter-sfapex", + version = "0.0.3-1" + }, { + name = "tree-sitter-sourcepawn", + url = "nilshelmig/tree-sitter-sourcepawn", + version = "0.0.3-1" + }, { + name = "tree-sitter-sparql", + url = "GordianDziwis/tree-sitter-sparql", + version = "0.0.2-1" + }, { + name = "tree-sitter-sql", + url = "derekstride/tree-sitter-sql", + version = "0.0.3-1" + }, { + name = "tree-sitter-squirrel", + url = "tree-sitter-grammars/tree-sitter-squirrel", + version = "0.0.2-1" + }, { + name = "tree-sitter-ssh_config", + url = "tree-sitter-grammars/tree-sitter-ssh-config", + version = "0.0.2-1" + }, { + name = "tree-sitter-starlark", + url = "tree-sitter-grammars/tree-sitter-starlark", + version = "0.0.2-1" + }, { + name = "tree-sitter-strace", + url = "sigmaSd/tree-sitter-strace", + version = "0.0.2-1" + }, { + name = "tree-sitter-styled", + url = "mskelton/tree-sitter-styled", + version = "0.0.3-1" + }, { + name = "tree-sitter-supercollider", + url = "madskjeldgaard/tree-sitter-supercollider", + version = "0.0.2-1" + }, { + name = "tree-sitter-surface", + url = "connorlay/tree-sitter-surface", + version = "0.0.2-1" + }, { + name = "tree-sitter-svelte", + url = "tree-sitter-grammars/tree-sitter-svelte", + version = "0.0.3-1" + }, { + name = "tree-sitter-swift", + url = "alex-pinkus/tree-sitter-swift", + version = "0.0.3-1" + }, { + name = "tree-sitter-sxhkdrc", + url = "RaafatTurki/tree-sitter-sxhkdrc", + version = "0.0.2-1" + }, { + name = "tree-sitter-systemtap", + url = "ok-ryoko/tree-sitter-systemtap", + version = "0.0.3-1" + }, { + name = "tree-sitter-systemverilog", + url = "zhangwwpeng/tree-sitter-systemverilog", + version = "0.0.3-1" + }, { + name = "tree-sitter-t32", + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/6182836f4128725f1e74ce986840d7317021a015.zip", + version = "0.0.2-1" + }, { + name = "tree-sitter-tablegen", + url = "tree-sitter-grammars/tree-sitter-tablegen", + version = "0.0.2-1" + }, { + name = "tree-sitter-tact", + url = "tact-lang/tree-sitter-tact", + version = "0.0.3-1" + }, { + name = "tree-sitter-tcl", + url = "tree-sitter-grammars/tree-sitter-tcl", + version = "0.0.2-1" + }, { + name = "tree-sitter-teal", + url = "euclidianAce/tree-sitter-teal", + version = "0.0.2-1" + }, { + name = "tree-sitter-templ", + url = "vrischmann/tree-sitter-templ", + version = "0.0.3-1" + }, { + name = "tree-sitter-terraform", + url = "MichaHoffmann/tree-sitter-hcl", + version = "0.0.2-1" + }, { + name = "tree-sitter-textproto", + url = "PorterAtGoogle/tree-sitter-textproto", + version = "0.0.2-1" + }, { + name = "tree-sitter-thrift", + url = "tree-sitter-grammars/tree-sitter-thrift", + version = "0.0.2-1" + }, { + name = "tree-sitter-tiger", + url = "ambroisie/tree-sitter-tiger", + version = "0.0.2-1" + }, { + name = "tree-sitter-tlaplus", + url = "tlaplus-community/tree-sitter-tlaplus", + version = "0.0.2-1" + }, { + name = "tree-sitter-tmux", + url = "Freed-Wu/tree-sitter-tmux", + version = "0.0.3-1" + }, { + name = "tree-sitter-todotxt", + url = "arnarg/tree-sitter-todotxt", + version = "0.0.2-1" + }, { + name = "tree-sitter-toml", + url = "tree-sitter-grammars/tree-sitter-toml", + version = "0.0.2-1" + }, { + name = "tree-sitter-tsv", + url = "tree-sitter-grammars/tree-sitter-csv", + version = "0.0.2-1" + }, { + name = "tree-sitter-tsx", + url = "tree-sitter/tree-sitter-typescript", + version = "0.0.3-1" + }, { + name = "tree-sitter-turtle", + url = "GordianDziwis/tree-sitter-turtle", + version = "0.0.2-1" + }, { + name = "tree-sitter-twig", + url = "gbprod/tree-sitter-twig", + version = "0.0.2-1" + }, { + name = "tree-sitter-typescript", + url = "tree-sitter/tree-sitter-typescript", + version = "0.0.3-1" + }, { + name = "tree-sitter-typespec", + url = "happenslol/tree-sitter-typespec", + version = "0.0.3-1" + }, { + name = "tree-sitter-typoscript", + url = "Teddytrombone/tree-sitter-typoscript", + version = "0.0.2-1" + }, { + name = "tree-sitter-typst", + url = "uben0/tree-sitter-typst", + version = "0.0.3-1" + }, { + name = "tree-sitter-udev", + url = "tree-sitter-grammars/tree-sitter-udev", + version = "0.0.2-1" + }, { + name = "tree-sitter-ungrammar", + url = "tree-sitter-grammars/tree-sitter-ungrammar", + version = "0.0.2-1" + }, { + name = "tree-sitter-unison", + url = "kylegoetz/tree-sitter-unison", + version = "0.0.2-1" + }, { + name = "tree-sitter-usd", + url = "ColinKennedy/tree-sitter-usd", + version = "0.0.2-1" + }, { + name = "tree-sitter-uxntal", + url = "tree-sitter-grammars/tree-sitter-uxntal", + version = "0.0.2-1" + }, { + name = "tree-sitter-v", + url = "vlang/v-analyzer", + version = "0.0.3-1" + }, { + name = "tree-sitter-vala", + url = "vala-lang/tree-sitter-vala", + version = "0.0.2-1" + }, { + name = "tree-sitter-vento", + url = "ventojs/tree-sitter-vento", + version = "0.0.2-1" + }, { + name = "tree-sitter-verilog", + url = "tree-sitter/tree-sitter-verilog", + version = "0.0.2-1" + }, { + name = "tree-sitter-vhdl", + url = "jpt13653903/tree-sitter-vhdl", + version = "0.0.2-1" + }, { + name = "tree-sitter-vhs", + url = "charmbracelet/tree-sitter-vhs", + version = "0.0.3-1" + }, { + name = "tree-sitter-vim", + url = "tree-sitter-grammars/tree-sitter-vim", + version = "0.0.3-1" + }, { + name = "tree-sitter-vimdoc", + url = "neovim/tree-sitter-vimdoc", + version = "0.0.2-1" + }, { + name = "tree-sitter-vrl", + url = "belltoy/tree-sitter-vrl", + version = "0.0.2-1" + }, { + name = "tree-sitter-vue", + url = "tree-sitter-grammars/tree-sitter-vue", + version = "0.0.2-1" + }, { + name = "tree-sitter-wgsl", + url = "szebniok/tree-sitter-wgsl", + version = "0.0.2-1" + }, { + name = "tree-sitter-wgsl_bevy", + url = "tree-sitter-grammars/tree-sitter-wgsl-bevy", + version = "0.0.2-1" + }, { + name = "tree-sitter-wing", + url = "winglang/tree-sitter-wing", + version = "0.0.2-1" + }, { + name = "tree-sitter-wit", + url = "liamwh/tree-sitter-wit", + version = "0.0.3-1" + }, { + name = "tree-sitter-xcompose", + url = "tree-sitter-grammars/tree-sitter-xcompose", + version = "0.0.2-1" + }, { + name = "tree-sitter-xml", + url = "tree-sitter-grammars/tree-sitter-xml", + version = "0.0.2-1" + }, { + name = "tree-sitter-yaml", + url = "tree-sitter-grammars/tree-sitter-yaml", + version = "0.0.2-1" + }, { + name = "tree-sitter-yang", + url = "Hubro/tree-sitter-yang", + version = "0.0.2-1" + }, { + name = "tree-sitter-yuck", + url = "tree-sitter-grammars/tree-sitter-yuck", + version = "0.0.2-1" + }, { + name = "tree-sitter-zathurarc", + url = "Freed-Wu/tree-sitter-zathurarc", + version = "0.0.3-1" + }, { + name = "tree-sitter-zig", + url = "tree-sitter-grammars/tree-sitter-zig", + version = "0.0.3-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", - version = "3.4.3-1" + version = "3.6.0-1" + }, { + name = "ts-comments.nvim", + url = "folke/ts-comments.nvim", + version = "1.5.0-1" }, { name = "tsc.nvim", url = "dmmulroy/tsc.nvim", - version = "2.3.0-1" + version = "2.4.1-1" }, { name = "twilight.nvim", url = "folke/twilight.nvim", @@ -730,15 +2066,19 @@ return }, { name = "vgit.nvim", url = "tanvirtin/vgit.nvim", - version = "0.2.2-1" + version = "0.2.3-1" }, { name = "which-key.nvim", url = "folke/which-key.nvim", - version = "2.1.0-1" + version = "3.13.2-1" }, { name = "windline.nvim", url = "windwp/windline.nvim", version = "1.1.0-1" + }, { + name = "wrapping-paper.nvim", + url = "benlubas/wrapping-paper.nvim", + version = "1.0.0-1" }, { name = "yanky.nvim", url = "gbprod/yanky.nvim", @@ -746,11 +2086,11 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "master-1" + version = "6.0.4-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", - version = "1.3.0-1" + version = "1.4.0-1" }, { name = "zk-nvim", url = "zk-org/zk-nvim", From aca30f63619a7492ecdea8833a065cf83c80f764 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Sep 2024 10:13:11 +0200 Subject: [PATCH 105/148] fix(bootstrap): single forward slash. Fixes #1747 --- bootstrap.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.lua b/bootstrap.lua index 16d9f1d..88c1a44 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -1,4 +1,4 @@ --- Lay Bootstrapper +-- Lazy Bootstrapper -- Usage: -- ```lua -- load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() @@ -7,7 +7,7 @@ local M = {} function M.setup() if vim.env.LAZY_STDPATH then - local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p") + local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "") for _, name in ipairs({ "config", "data", "state", "cache" }) do vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name end From 460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Sep 2024 08:17:41 +0000 Subject: [PATCH 106/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 710 ++++++++++++++++-------------- 1 file changed, 375 insertions(+), 335 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index b91e678..6b1d4fb 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -14,11 +14,11 @@ return }, { name = "aerial.nvim", url = "stevearc/aerial.nvim", - version = "2.2.0-1" + version = "2.3.0-1" }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", - version = "0.1.0-1" + version = "1.2.0-1" }, { name = "astral.nvim", url = "rootiest/astral.nvim", @@ -31,6 +31,14 @@ return name = "banana.nvim", url = "CWood-sdf/banana.nvim", version = "0.1.0-1" + }, { + name = "bars-n-lines.nvim", + url = "OXY2DEV/bars-N-lines.nvim", + version = "1.0.0-1" + }, { + name = "base.nvim", + url = "S1M0N38/base.nvim", + version = "1.0.2-1" }, { name = "better-escape.nvim", url = "max397574/better-escape.nvim", @@ -90,11 +98,15 @@ return }, { name = "conform.nvim", url = "stevearc/conform.nvim", - version = "8.0.0-1" + version = "8.1.0-1" }, { name = "cybu.nvim", url = "ghillb/cybu.nvim", version = "1.0-1" + }, { + name = "dante.nvim", + url = "S1M0N38/dante.nvim", + version = "1.0.1-1" }, { name = "daylight.nvim", url = "NTBBloodbath/daylight.nvim", @@ -106,7 +118,7 @@ return }, { name = "decipher.nvim", url = "MisanthropicBit/decipher.nvim", - version = "1.0.1-1" + version = "1.0.2-1" }, { name = "delog.nvim", url = "ej-shafran/delog.nvim", @@ -214,7 +226,7 @@ return }, { name = "git.nvim", url = "Kibadda/git.nvim", - version = "3.3.1-1" + version = "3.3.2-1" }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", @@ -223,6 +235,10 @@ return name = "gitlinker.nvim", url = "linrongbin16/gitlinker.nvim", version = "4.13.1-1" + }, { + name = "gitsigns.nvim", + url = "lewis6991/gitsigns.nvim", + version = "0.9.0-1" }, { name = "glow.nvim", url = "ellisonleao/glow.nvim", @@ -258,7 +274,7 @@ return }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", - version = "4.0.1-1" + version = "4.0.2-1" }, { name = "heirline.nvim", url = "rebelot/heirline.nvim", @@ -278,11 +294,11 @@ return }, { name = "hotpot.nvim", url = "rktjmp/hotpot.nvim", - version = "0.14.3-1" + version = "0.14.5-1" }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", - version = "1.7.0-1" + version = "1.7.1-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -303,6 +319,10 @@ return name = "kai.nvim", url = "Kamilcuk/kai.nvim", version = "0.0.6-1" + }, { + name = "kanban.nvim", + url = "Kibadda/kanban.nvim", + version = "1.3.0-1" }, { name = "lazy.nvim", url = "folke/lazy.nvim", @@ -326,11 +346,7 @@ return }, { name = "live-command.nvim", url = "smjonas/live-command.nvim", - version = "1.2.1-1" - }, { - name = "logger.nvim", - url = "jnpngshiii/logger.nvim", - version = "0.4.6-1" + version = "2.0.0-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -386,11 +402,11 @@ return }, { name = "markview.nvim", url = "OXY2DEV/markview.nvim", - version = "22.0.1-1" + version = "23.1.0-1" }, { name = "mason-lspconfig.nvim", url = "williamboman/mason-lspconfig.nvim", - version = "1.30.0-1" + version = "1.31.0-1" }, { name = "mason-nvim-dap.nvim", url = "jay-babu/mason-nvim-dap.nvim", @@ -399,10 +415,6 @@ return name = "mason.nvim", url = "williamboman/mason.nvim", version = "1.10.0-1" - }, { - name = "mindmap.nvim", - url = "jnpngshiii/mindmap.nvim", - version = "0.7.1-1" }, { name = "mini.nvim", url = "echasnovski/mini.nvim", @@ -454,11 +466,11 @@ return }, { name = "neorg-conceal-wrap", url = "benlubas/neorg-conceal-wrap", - version = "1.0.0-1" + version = "1.0.1-1" }, { name = "neorg-interim-ls", url = "benlubas/neorg-interim-ls", - version = "1.2.0-1" + version = "1.2.1-1" }, { name = "neorg-se", url = "benlubas/neorg-se", @@ -482,11 +494,11 @@ return }, { name = "neotest-busted", url = "MisanthropicBit/neotest-busted", - version = "0.1.0-1" + version = "0.2.0-1" }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.0.0-1" + version = "1.1.1-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", @@ -494,7 +506,7 @@ return }, { name = "neotest-java", url = "rcasia/neotest-java", - version = "0.14.1-1" + version = "0.15.6-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -506,7 +518,7 @@ return }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "1.16.0-1" + version = "2.0.1-1" }, { name = "noice.nvim", url = "folke/noice.nvim", @@ -586,7 +598,7 @@ return }, { name = "nvim-lspconfig", url = "neovim/nvim-lspconfig", - version = "0.1.8-1" + version = "1.0.0-1" }, { name = "nvim-metals", url = "scalameta/nvim-metals", @@ -618,7 +630,7 @@ return }, { name = "nvim-smuggler", url = "Klafyvel/nvim-smuggler", - version = "0.3.0-1" + version = "0.4.2-1" }, { name = "nvim-snippets", url = "garymjr/nvim-snippets", @@ -658,7 +670,7 @@ return }, { name = "oil.nvim", url = "stevearc/oil.nvim", - version = "2.12.1-1" + version = "2.12.2-1" }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", @@ -690,7 +702,7 @@ return }, { name = "papis.nvim", url = "jghauser/papis.nvim", - version = "0.6.1-1" + version = "0.7.0-1" }, { name = "paq-nvim", url = "savq/paq-nvim", @@ -702,7 +714,7 @@ return }, { name = "persisted.nvim", url = "olimorris/persisted.nvim", - version = "1.1.0-1" + version = "2.0.0-1" }, { name = "persistence.nvim", url = "folke/persistence.nvim", @@ -715,6 +727,10 @@ return name = "pretty-fold.nvim", url = "anuvyklack/pretty-fold.nvim", version = "3.0-1" + }, { + name = "processing.nvim", + url = "sophieforrest/processing.nvim", + version = "1.1.0-1" }, { name = "quarry.nvim", url = "rudionrails/quarry.nvim", @@ -738,23 +754,23 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "6.3.0-1" + version = "7.0.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.2.1-1" + version = "3.7.0-1" }, { name = "rocks-config.nvim", url = "nvim-neorocks/rocks-config.nvim", - version = "2.2.0-1" + version = "2.3.1-1" }, { name = "rocks-dev.nvim", url = "nvim-neorocks/rocks-dev.nvim", - version = "1.5.0-1" + version = "1.7.0-1" }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "2.0.1-1" + version = "2.2.0-1" }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", @@ -762,19 +778,23 @@ return }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", - version = "1.1.1-1" + version = "1.1.2-1" }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.38.2-1" + version = "2.40.0-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", version = "1.2.0-1" + }, { + name = "runt.nvim", + url = "Julian/runt.nvim", + version = "2024.9.2-1" }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.2.2-1" + version = "5.4.2-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -794,7 +814,7 @@ return }, { name = "sf.nvim", url = "xixiaofinland/sf.nvim", - version = "1.5.0-1" + version = "1.6.0-1" }, { name = "sg.nvim", url = "sourcegraph/sg.nvim", @@ -807,6 +827,10 @@ return name = "squirrel.nvim", url = "xiaoshihou514/squirrel.nvim", version = "1.0.0-1" + }, { + name = "starter.nvim", + url = "Kibadda/starter.nvim", + version = "1.2.0-1" }, { name = "storm-mode.nvim", url = "HoppenR/storm-mode.nvim", @@ -858,647 +882,663 @@ return }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-agda", url = "tree-sitter/tree-sitter-agda", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-angular", url = "dlvandenberg/tree-sitter-angular", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-asm", url = "RubixDev/tree-sitter-asm", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-authzed", url = "mleonidas/tree-sitter-authzed", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-awk", url = "Beaglefoot/tree-sitter-awk", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-beancount", url = "polarmutex/tree-sitter-beancount", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-bibtex", url = "latex-lsp/tree-sitter-bibtex", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-bicep", url = "tree-sitter-grammars/tree-sitter-bicep", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-bitbake", url = "tree-sitter-grammars/tree-sitter-bitbake", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-blueprint", url = "https://gitlab.com/gabmus/tree-sitter-blueprint/-/archive/60ba73739c6083c693d86a1a7cf039c07eb4ed59.zip", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-bp", url = "ambroisie/tree-sitter-bp", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-capnp", url = "tree-sitter-grammars/tree-sitter-capnp", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-chatito", url = "tree-sitter-grammars/tree-sitter-chatito", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cmake", url = "uyha/tree-sitter-cmake", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-comment", url = "stsewd/tree-sitter-comment", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-commonlisp", url = "tree-sitter-grammars/tree-sitter-commonlisp", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cooklang", url = "addcninblue/tree-sitter-cooklang", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-corn", url = "jakestanger/tree-sitter-corn", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cpon", url = "tree-sitter-grammars/tree-sitter-cpon", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-cuda", url = "tree-sitter-grammars/tree-sitter-cuda", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-d", url = "gdamore/tree-sitter-d", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-dart", url = "UserNobody14/tree-sitter-dart", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-dhall", url = "jbellerb/tree-sitter-dhall", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-diff", url = "the-mikedavis/tree-sitter-diff", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-disassembly", url = "ColinKennedy/tree-sitter-disassembly", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-djot", url = "treeman/tree-sitter-djot", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-dockerfile", url = "camdencheek/tree-sitter-dockerfile", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-dot", url = "rydesun/tree-sitter-dot", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-doxygen", url = "tree-sitter-grammars/tree-sitter-doxygen", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.2-1" + version = "0.0.12-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ecma", url = "nvim-neorocks/luarocks-stub", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-eex", url = "connorlay/tree-sitter-eex", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.2-1" + version = "0.0.11-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-elsa", url = "glapa-grossklag/tree-sitter-elsa", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-elvish", url = "elves/tree-sitter-elvish", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-faust", url = "khiner/tree-sitter-faust", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-fennel", url = "alexmozaidze/tree-sitter-fennel", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-fidl", url = "google/tree-sitter-fidl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-firrtl", url = "tree-sitter-grammars/tree-sitter-firrtl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-fish", url = "ram02z/tree-sitter-fish", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-foam", url = "FoamScience/tree-sitter-foam", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-forth", url = "AlexanderBrevig/tree-sitter-forth", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-func", url = "tree-sitter-grammars/tree-sitter-func", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-fusion", url = "https://gitlab.com/jirgn/tree-sitter-fusion/-/archive/19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6.zip", - version = "0.0.2-1" + version = "0.0.10-1" + }, { + name = "tree-sitter-gap", + url = "gap-system/tree-sitter-gap", + version = "0.0.10-1" + }, { + name = "tree-sitter-gaptst", + url = "gap-system/tree-sitter-gaptst", + version = "0.0.10-1" }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-git_config", url = "the-mikedavis/tree-sitter-git-config", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-git_rebase", url = "the-mikedavis/tree-sitter-git-rebase", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-gitattributes", url = "tree-sitter-grammars/tree-sitter-gitattributes", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gitcommit", url = "gbprod/tree-sitter-gitcommit", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gitignore", url = "shunsambongi/tree-sitter-gitignore", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-glimmer", - url = "alexlafroscia/tree-sitter-glimmer", - version = "0.0.3-1" + url = "ember-tooling/tree-sitter-glimmer", + version = "0.0.10-1" + }, { + name = "tree-sitter-glimmer_javascript", + url = "NullVoxPopuli/tree-sitter-glimmer-javascript", + version = "0.0.10-1" + }, { + name = "tree-sitter-glimmer_typescript", + url = "NullVoxPopuli/tree-sitter-glimmer-typescript", + version = "0.0.10-1" }, { name = "tree-sitter-glsl", url = "tree-sitter-grammars/tree-sitter-glsl", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-gn", url = "tree-sitter-grammars/tree-sitter-gn", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gnuplot", url = "dpezto/tree-sitter-gnuplot", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-godot_resource", url = "PrestonKnopp/tree-sitter-godot-resource", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gomod", url = "camdencheek/tree-sitter-go-mod", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-gosum", url = "tree-sitter-grammars/tree-sitter-go-sum", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gotmpl", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-gowork", url = "omertuc/tree-sitter-go-work", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-gpg", url = "tree-sitter-grammars/tree-sitter-gpg-config", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-graphql", url = "bkegley/tree-sitter-graphql", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-gstlaunch", url = "tree-sitter-grammars/tree-sitter-gstlaunch", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-hack", url = "slackhq/tree-sitter-hack", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-hare", url = "tree-sitter-grammars/tree-sitter-hare", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-haskell", url = "tree-sitter/tree-sitter-haskell", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-haskell_persistent", url = "MercuryTechnologies/tree-sitter-haskell-persistent", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-hcl", url = "tree-sitter-grammars/tree-sitter-hcl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-heex", url = "connorlay/tree-sitter-heex", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-helm", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-hjson", url = "winston0410/tree-sitter-hjson", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-hlsl", url = "tree-sitter-grammars/tree-sitter-hlsl", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-hlsplaylist", url = "Freed-Wu/tree-sitter-hlsplaylist", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-hocon", url = "antosha417/tree-sitter-hocon", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-hoon", url = "urbit-pilled/tree-sitter-hoon", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-htmldjango", url = "interdependence/tree-sitter-htmldjango", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-hyprlang", url = "tree-sitter-grammars/tree-sitter-hyprlang", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-ini", url = "justinmk/tree-sitter-ini", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-jsonc", url = "https://gitlab.com/WhyNotHugo/tree-sitter-jsonc/-/archive/02b01653c8a1c198ae7287d566efa86a135b30d5.zip", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-jsonnet", url = "sourcegraph/tree-sitter-jsonnet", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-jsx", url = "nvim-neorocks/luarocks-stub", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-kdl", url = "tree-sitter-grammars/tree-sitter-kdl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-kotlin", url = "fwcd/tree-sitter-kotlin", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-koto", url = "koto-lang/tree-sitter-koto", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-kusto", url = "Willem-J-an/tree-sitter-kusto", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-lalrpop", url = "traxys/tree-sitter-lalrpop", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-latex", url = "latex-lsp/tree-sitter-latex", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-ledger", url = "cbarrete/tree-sitter-ledger", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-leo", url = "r001/tree-sitter-leo", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-linkerscript", url = "tree-sitter-grammars/tree-sitter-linkerscript", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-liquid", url = "hankthetank27/tree-sitter-liquid", - version = "0.0.5-1" + version = "0.0.10-1" }, { name = "tree-sitter-liquidsoap", url = "savonet/tree-sitter-liquidsoap", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-llvm", url = "benwilliamgraham/tree-sitter-llvm", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.2-1" + version = "0.0.11-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-luap", url = "tree-sitter-grammars/tree-sitter-luap", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-luau", url = "tree-sitter-grammars/tree-sitter-luau", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-m68k", url = "grahambates/tree-sitter-m68k", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-make", url = "alemuller/tree-sitter-make", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.2-1" + version = "0.0.13-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.2-1" + version = "0.0.13-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-menhir", url = "Kerl13/tree-sitter-menhir", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-mermaid", url = "monaqa/tree-sitter-mermaid", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-meson", url = "tree-sitter-grammars/tree-sitter-meson", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-nasm", url = "naclsn/tree-sitter-nasm", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-nginx", url = "opa-oz/tree-sitter-nginx", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-nickel", url = "nickel-lang/tree-sitter-nickel", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-nim", url = "alaviss/tree-sitter-nim", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-nim_format_string", url = "aMOPel/tree-sitter-nim-format-string", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ninja", url = "alemuller/tree-sitter-ninja", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.5-1" + version = "0.0.10-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", - version = "0.2.5-1" + version = "0.2.6-1" }, { name = "tree-sitter-norg-meta", url = "nvim-neorg/tree-sitter-norg-meta", @@ -1506,31 +1546,31 @@ return }, { name = "tree-sitter-nqc", url = "tree-sitter-grammars/tree-sitter-nqc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-objdump", url = "ColinKennedy/tree-sitter-objdump", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-odin", url = "tree-sitter-grammars/tree-sitter-odin", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-org", url = "milisims/tree-sitter-org", @@ -1542,507 +1582,507 @@ return }, { name = "tree-sitter-pascal", url = "Isopod/tree-sitter-pascal", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-passwd", url = "ath3/tree-sitter-passwd", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pem", url = "tree-sitter-grammars/tree-sitter-pem", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.4-1" + version = "0.0.12-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pioasm", url = "leo60228/tree-sitter-pioasm", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-po", url = "tree-sitter-grammars/tree-sitter-po", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pod", url = "tree-sitter-perl/tree-sitter-pod", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-poe_filter", url = "tree-sitter-grammars/tree-sitter-poe-filter", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pony", url = "tree-sitter-grammars/tree-sitter-pony", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-problog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-prolog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-promql", url = "MichaHoffmann/tree-sitter-promql", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-properties", url = "tree-sitter-grammars/tree-sitter-properties", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-proto", url = "treywood/tree-sitter-proto", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-prql", url = "PRQL/tree-sitter-prql", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-psv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pug", url = "zealot128/tree-sitter-pug", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-puppet", url = "tree-sitter-grammars/tree-sitter-puppet", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-purescript", url = "postsolar/tree-sitter-purescript", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-pymanifest", url = "tree-sitter-grammars/tree-sitter-pymanifest", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-qmldir", url = "tree-sitter-grammars/tree-sitter-qmldir", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-qmljs", url = "yuja/tree-sitter-qmljs", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", - version = "0.0.2-1" + version = "0.0.11-1" }, { name = "tree-sitter-racket", url = "6cdh/tree-sitter-racket", - version = "0.0.2-1" + version = "0.0.12-1" }, { name = "tree-sitter-ralph", url = "alephium/tree-sitter-ralph", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-rasi", url = "Fymyte/tree-sitter-rasi", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-rbs", url = "joker1007/tree-sitter-rbs", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-re2c", url = "tree-sitter-grammars/tree-sitter-re2c", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-readline", url = "tree-sitter-grammars/tree-sitter-readline", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-requirements", url = "tree-sitter-grammars/tree-sitter-requirements", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-rescript", url = "rescript-lang/tree-sitter-rescript", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-rnoweb", url = "bamonroe/tree-sitter-rnoweb", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-robot", url = "Hubro/tree-sitter-robot", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-robots", url = "opa-oz/tree-sitter-robots-txt", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-roc", url = "faldor20/tree-sitter-roc", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-ron", url = "tree-sitter-grammars/tree-sitter-ron", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.3-1" + version = "0.0.13-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-scheme", url = "6cdh/tree-sitter-scheme", - version = "0.0.2-1" + version = "0.0.12-1" }, { name = "tree-sitter-scss", url = "serenadeai/tree-sitter-scss", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-slint", url = "slint-ui/tree-sitter-slint", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-smali", url = "tree-sitter-grammars/tree-sitter-smali", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-smithy", url = "indoorvivants/tree-sitter-smithy", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-snakemake", url = "osthomas/tree-sitter-snakemake", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-solidity", url = "JoranHonig/tree-sitter-solidity", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-sparql", url = "GordianDziwis/tree-sitter-sparql", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ssh_config", url = "tree-sitter-grammars/tree-sitter-ssh-config", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-starlark", url = "tree-sitter-grammars/tree-sitter-starlark", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-strace", url = "sigmaSd/tree-sitter-strace", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-styled", url = "mskelton/tree-sitter-styled", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-supercollider", url = "madskjeldgaard/tree-sitter-supercollider", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-svelte", url = "tree-sitter-grammars/tree-sitter-svelte", - version = "0.0.3-1" + version = "0.0.12-1" }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-systemtap", url = "ok-ryoko/tree-sitter-systemtap", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-systemverilog", url = "zhangwwpeng/tree-sitter-systemverilog", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-t32", url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/6182836f4128725f1e74ce986840d7317021a015.zip", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tact", url = "tact-lang/tree-sitter-tact", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-tcl", url = "tree-sitter-grammars/tree-sitter-tcl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-textproto", url = "PorterAtGoogle/tree-sitter-textproto", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-thrift", url = "tree-sitter-grammars/tree-sitter-thrift", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tiger", url = "ambroisie/tree-sitter-tiger", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tlaplus", url = "tlaplus-community/tree-sitter-tlaplus", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tmux", url = "Freed-Wu/tree-sitter-tmux", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-todotxt", url = "arnarg/tree-sitter-todotxt", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-toml", url = "tree-sitter-grammars/tree-sitter-toml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tsv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-twig", url = "gbprod/tree-sitter-twig", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-typoscript", url = "Teddytrombone/tree-sitter-typoscript", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-typst", url = "uben0/tree-sitter-typst", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-udev", url = "tree-sitter-grammars/tree-sitter-udev", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-ungrammar", url = "tree-sitter-grammars/tree-sitter-ungrammar", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-unison", url = "kylegoetz/tree-sitter-unison", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-usd", url = "ColinKennedy/tree-sitter-usd", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-uxntal", url = "tree-sitter-grammars/tree-sitter-uxntal", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.3-1" + version = "0.0.11-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-vento", url = "ventojs/tree-sitter-vento", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-verilog", url = "tree-sitter/tree-sitter-verilog", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-vimdoc", url = "neovim/tree-sitter-vimdoc", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-vrl", url = "belltoy/tree-sitter-vrl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-vue", url = "tree-sitter-grammars/tree-sitter-vue", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-wgsl", url = "szebniok/tree-sitter-wgsl", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-wgsl_bevy", url = "tree-sitter-grammars/tree-sitter-wgsl-bevy", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-wing", url = "winglang/tree-sitter-wing", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-wit", url = "liamwh/tree-sitter-wit", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-xcompose", url = "tree-sitter-grammars/tree-sitter-xcompose", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-yang", url = "Hubro/tree-sitter-yang", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-yuck", url = "tree-sitter-grammars/tree-sitter-yuck", - version = "0.0.2-1" + version = "0.0.10-1" }, { name = "tree-sitter-zathurarc", url = "Freed-Wu/tree-sitter-zathurarc", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.3-1" + version = "0.0.10-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", @@ -2086,7 +2126,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.0.4-1" + version = "6.1.0-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", From e9fd76e239cc18da289f9a3f80f35fa16b003175 Mon Sep 17 00:00:00 2001 From: Luna Saphie Mittelbach Date: Wed, 2 Oct 2024 09:52:51 +0200 Subject: [PATCH 107/148] fix(completion): check if command string is a prefix of Lazy (#1760) Problem: Command completion doesn't work if the command name isn't written in full Solution: Use vim.startswith to check if the command is a prefix of 'Lazy' Fixes #1758 --- lua/lazy/view/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/view/commands.lua b/lua/lazy/view/commands.lua index 9791924..fd4af3d 100644 --- a/lua/lazy/view/commands.lua +++ b/lua/lazy/view/commands.lua @@ -146,7 +146,7 @@ end ---@return string, string[] function M.parse(args) local parts = vim.split(vim.trim(args), "%s+") - if parts[1]:find("Lazy") then + if vim.startswith("Lazy", parts[1]) then table.remove(parts, 1) end if args:sub(-1) == " " then From 1159bdccd8910a0fd0914b24d6c3d186689023d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Oct 2024 07:54:44 +0000 Subject: [PATCH 108/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 676 +++++++++++++++--------------- 1 file changed, 346 insertions(+), 330 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 6b1d4fb..558ff33 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -18,7 +18,7 @@ return }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", - version = "1.2.0-1" + version = "1.3.0-1" }, { name = "astral.nvim", url = "rootiest/astral.nvim", @@ -106,7 +106,7 @@ return }, { name = "dante.nvim", url = "S1M0N38/dante.nvim", - version = "1.0.1-1" + version = "1.2.0-1" }, { name = "daylight.nvim", url = "NTBBloodbath/daylight.nvim", @@ -138,11 +138,11 @@ return }, { name = "donut.nvim", url = "NStefan002/donut.nvim", - version = "2.1.0-1" + version = "2.2.1-1" }, { name = "dressing.nvim", url = "stevearc/dressing.nvim", - version = "2.2.2-1" + version = "3.0.0-1" }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", @@ -167,6 +167,10 @@ return name = "elixir-tools.nvim", url = "elixir-tools/elixir-tools.nvim", version = "0.16.0-1" + }, { + name = "feed.nvim", + url = "noearc/feed.nvim", + version = "main-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", @@ -226,7 +230,7 @@ return }, { name = "git.nvim", url = "Kibadda/git.nvim", - version = "3.3.2-1" + version = "4.1.0-1" }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", @@ -234,7 +238,7 @@ return }, { name = "gitlinker.nvim", url = "linrongbin16/gitlinker.nvim", - version = "4.13.1-1" + version = "4.13.2-1" }, { name = "gitsigns.nvim", url = "lewis6991/gitsigns.nvim", @@ -270,7 +274,7 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "4.0.1-1" + version = "4.1.0-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", @@ -294,7 +298,7 @@ return }, { name = "hotpot.nvim", url = "rktjmp/hotpot.nvim", - version = "0.14.5-1" + version = "0.14.7-1" }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", @@ -334,7 +338,7 @@ return }, { name = "lean.nvim", url = "Julian/lean.nvim", - version = "1.0.0-1" + version = "2024.9.2-1" }, { name = "leetcode.nvim", url = "kawre/leetcode.nvim", @@ -346,7 +350,7 @@ return }, { name = "live-command.nvim", url = "smjonas/live-command.nvim", - version = "2.0.0-1" + version = "2.2.0-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -446,7 +450,7 @@ return }, { name = "neoconf.nvim", url = "folke/neoconf.nvim", - version = "1.3.2-1" + version = "1.3.3-1" }, { name = "neodev.nvim", url = "folke/neodev.nvim", @@ -490,7 +494,7 @@ return }, { name = "neotest", url = "nvim-neotest/neotest", - version = "5.4.1-1" + version = "5.6.0-1" }, { name = "neotest-busted", url = "MisanthropicBit/neotest-busted", @@ -498,7 +502,7 @@ return }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.1.1-1" + version = "1.2.0-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", @@ -506,7 +510,7 @@ return }, { name = "neotest-java", url = "rcasia/neotest-java", - version = "0.15.6-1" + version = "0.16.0-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -518,11 +522,11 @@ return }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "2.0.1-1" + version = "2.0.5-1" }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.5.0-1" + version = "4.5.1-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -535,6 +539,10 @@ return name = "nui.nvim", url = "MunifTanjim/nui.nvim", version = "0.3.0-1" + }, { + name = "nvim-a2-pack", + url = "dfgordon/nvim-a2-pack", + version = "0.0.2-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -610,7 +618,7 @@ return }, { name = "nvim-notify", url = "rcarriga/nvim-notify", - version = "3.13.5-1" + version = "3.14.0-1" }, { name = "nvim-parinfer", url = "gpanders/nvim-parinfer", @@ -626,7 +634,7 @@ return }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", - version = "5.2.1-1" + version = "5.2.2-1" }, { name = "nvim-smuggler", url = "Klafyvel/nvim-smuggler", @@ -734,7 +742,7 @@ return }, { name = "quarry.nvim", url = "rudionrails/quarry.nvim", - version = "2.3.0-1" + version = "3.0.1-1" }, { name = "quicker.nvim", url = "stevearc/quicker.nvim", @@ -742,7 +750,7 @@ return }, { name = "rainbow-delimiters.nvim", url = "HiPhish/rainbow-delimiters.nvim", - version = "0.6.1-1" + version = "0.6.2-1" }, { name = "remember.nvim", url = "vladdoster/remember.nvim", @@ -754,15 +762,19 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.0.0-1" + version = "7.2.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.7.0-1" + version = "3.8.2-1" + }, { + name = "rime.nvim", + url = "Freed-Wu/rime.nvim", + version = "0.0.1-1" }, { name = "rocks-config.nvim", url = "nvim-neorocks/rocks-config.nvim", - version = "2.3.1-1" + version = "3.0.0-1" }, { name = "rocks-dev.nvim", url = "nvim-neorocks/rocks-dev.nvim", @@ -770,19 +782,19 @@ return }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "2.2.0-1" + version = "2.3.1-1" }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", - version = "1.0.1-1" + version = "1.1.0-1" }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", - version = "1.1.2-1" + version = "1.1.3-1" }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.40.0-1" + version = "2.40.2-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -790,11 +802,11 @@ return }, { name = "runt.nvim", url = "Julian/runt.nvim", - version = "2024.9.2-1" + version = "2024.10.1-1" }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.4.2-1" + version = "5.11.0-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -814,7 +826,7 @@ return }, { name = "sf.nvim", url = "xixiaofinland/sf.nvim", - version = "1.6.0-1" + version = "1.7.0-1" }, { name = "sg.nvim", url = "sourcegraph/sg.nvim", @@ -870,7 +882,7 @@ return }, { name = "todo-comments.nvim", url = "folke/todo-comments.nvim", - version = "1.3.0-1" + version = "1.4.0-1" }, { name = "toggleterm.nvim", url = "akinsho/toggleterm.nvim", @@ -882,659 +894,663 @@ return }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-agda", url = "tree-sitter/tree-sitter-agda", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-angular", url = "dlvandenberg/tree-sitter-angular", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-asm", url = "RubixDev/tree-sitter-asm", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-authzed", url = "mleonidas/tree-sitter-authzed", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-awk", url = "Beaglefoot/tree-sitter-awk", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-beancount", url = "polarmutex/tree-sitter-beancount", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bibtex", url = "latex-lsp/tree-sitter-bibtex", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bicep", url = "tree-sitter-grammars/tree-sitter-bicep", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bitbake", url = "tree-sitter-grammars/tree-sitter-bitbake", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-blueprint", url = "https://gitlab.com/gabmus/tree-sitter-blueprint/-/archive/60ba73739c6083c693d86a1a7cf039c07eb4ed59.zip", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-bp", url = "ambroisie/tree-sitter-bp", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-capnp", url = "tree-sitter-grammars/tree-sitter-capnp", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-chatito", url = "tree-sitter-grammars/tree-sitter-chatito", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cmake", url = "uyha/tree-sitter-cmake", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-comment", url = "stsewd/tree-sitter-comment", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-commonlisp", url = "tree-sitter-grammars/tree-sitter-commonlisp", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cooklang", url = "addcninblue/tree-sitter-cooklang", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-corn", url = "jakestanger/tree-sitter-corn", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cpon", url = "tree-sitter-grammars/tree-sitter-cpon", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cuda", url = "tree-sitter-grammars/tree-sitter-cuda", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-d", url = "gdamore/tree-sitter-d", - version = "0.0.10-1" + version = "0.0.28-1" }, { name = "tree-sitter-dart", url = "UserNobody14/tree-sitter-dart", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-dhall", url = "jbellerb/tree-sitter-dhall", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-diff", url = "the-mikedavis/tree-sitter-diff", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-disassembly", url = "ColinKennedy/tree-sitter-disassembly", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-djot", url = "treeman/tree-sitter-djot", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-dockerfile", url = "camdencheek/tree-sitter-dockerfile", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-dot", url = "rydesun/tree-sitter-dot", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-doxygen", url = "tree-sitter-grammars/tree-sitter-doxygen", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.12-1" + version = "0.0.26-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ecma", url = "nvim-neorocks/luarocks-stub", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-eex", url = "connorlay/tree-sitter-eex", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.11-1" + version = "0.0.26-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-elsa", url = "glapa-grossklag/tree-sitter-elsa", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-elvish", url = "elves/tree-sitter-elvish", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-faust", url = "khiner/tree-sitter-faust", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-fennel", url = "alexmozaidze/tree-sitter-fennel", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-fidl", url = "google/tree-sitter-fidl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-firrtl", url = "tree-sitter-grammars/tree-sitter-firrtl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-fish", url = "ram02z/tree-sitter-fish", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-foam", url = "FoamScience/tree-sitter-foam", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-forth", url = "AlexanderBrevig/tree-sitter-forth", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.10-1" + version = "0.0.27-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", - version = "0.0.10-1" + version = "0.0.24-1" + }, { + name = "tree-sitter-fsharp", + url = "ionide/tree-sitter-fsharp", + version = "0.0.2-1" }, { name = "tree-sitter-func", url = "tree-sitter-grammars/tree-sitter-func", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-fusion", url = "https://gitlab.com/jirgn/tree-sitter-fusion/-/archive/19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6.zip", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gap", url = "gap-system/tree-sitter-gap", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gaptst", url = "gap-system/tree-sitter-gaptst", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-git_config", url = "the-mikedavis/tree-sitter-git-config", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-git_rebase", url = "the-mikedavis/tree-sitter-git-rebase", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gitattributes", url = "tree-sitter-grammars/tree-sitter-gitattributes", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gitcommit", url = "gbprod/tree-sitter-gitcommit", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gitignore", url = "shunsambongi/tree-sitter-gitignore", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.11-1" + version = "0.0.26-1" }, { name = "tree-sitter-glimmer", url = "ember-tooling/tree-sitter-glimmer", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-glimmer_javascript", url = "NullVoxPopuli/tree-sitter-glimmer-javascript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-glimmer_typescript", url = "NullVoxPopuli/tree-sitter-glimmer-typescript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-glsl", url = "tree-sitter-grammars/tree-sitter-glsl", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-gn", url = "tree-sitter-grammars/tree-sitter-gn", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gnuplot", url = "dpezto/tree-sitter-gnuplot", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-godot_resource", url = "PrestonKnopp/tree-sitter-godot-resource", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gomod", url = "camdencheek/tree-sitter-go-mod", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-gosum", url = "tree-sitter-grammars/tree-sitter-go-sum", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gotmpl", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gowork", url = "omertuc/tree-sitter-go-work", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gpg", url = "tree-sitter-grammars/tree-sitter-gpg-config", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-graphql", url = "bkegley/tree-sitter-graphql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-gstlaunch", url = "tree-sitter-grammars/tree-sitter-gstlaunch", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hack", url = "slackhq/tree-sitter-hack", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hare", url = "tree-sitter-grammars/tree-sitter-hare", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-haskell", url = "tree-sitter/tree-sitter-haskell", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-haskell_persistent", url = "MercuryTechnologies/tree-sitter-haskell-persistent", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hcl", url = "tree-sitter-grammars/tree-sitter-hcl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-heex", url = "connorlay/tree-sitter-heex", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-helm", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hjson", url = "winston0410/tree-sitter-hjson", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hlsl", url = "tree-sitter-grammars/tree-sitter-hlsl", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-hlsplaylist", url = "Freed-Wu/tree-sitter-hlsplaylist", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hocon", url = "antosha417/tree-sitter-hocon", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-hoon", url = "urbit-pilled/tree-sitter-hoon", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-htmldjango", url = "interdependence/tree-sitter-htmldjango", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-hyprlang", url = "tree-sitter-grammars/tree-sitter-hyprlang", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ini", url = "justinmk/tree-sitter-ini", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-jsonc", url = "https://gitlab.com/WhyNotHugo/tree-sitter-jsonc/-/archive/02b01653c8a1c198ae7287d566efa86a135b30d5.zip", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-jsonnet", url = "sourcegraph/tree-sitter-jsonnet", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-jsx", url = "nvim-neorocks/luarocks-stub", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-kdl", url = "tree-sitter-grammars/tree-sitter-kdl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-kotlin", url = "fwcd/tree-sitter-kotlin", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-koto", url = "koto-lang/tree-sitter-koto", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-kusto", url = "Willem-J-an/tree-sitter-kusto", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-lalrpop", url = "traxys/tree-sitter-lalrpop", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-latex", url = "latex-lsp/tree-sitter-latex", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-ledger", url = "cbarrete/tree-sitter-ledger", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-leo", url = "r001/tree-sitter-leo", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-linkerscript", url = "tree-sitter-grammars/tree-sitter-linkerscript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-liquid", url = "hankthetank27/tree-sitter-liquid", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-liquidsoap", url = "savonet/tree-sitter-liquidsoap", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-llvm", url = "benwilliamgraham/tree-sitter-llvm", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-luap", url = "tree-sitter-grammars/tree-sitter-luap", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-luau", url = "tree-sitter-grammars/tree-sitter-luau", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-m68k", url = "grahambates/tree-sitter-m68k", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-make", url = "alemuller/tree-sitter-make", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.13-1" + version = "0.0.28-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.13-1" + version = "0.0.28-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-menhir", url = "Kerl13/tree-sitter-menhir", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-mermaid", url = "monaqa/tree-sitter-mermaid", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-meson", url = "tree-sitter-grammars/tree-sitter-meson", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nasm", url = "naclsn/tree-sitter-nasm", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nginx", url = "opa-oz/tree-sitter-nginx", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nickel", url = "nickel-lang/tree-sitter-nickel", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nim", url = "alaviss/tree-sitter-nim", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nim_format_string", url = "aMOPel/tree-sitter-nim-format-string", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ninja", url = "alemuller/tree-sitter-ninja", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.10-1" + version = "0.0.29-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1546,31 +1562,31 @@ return }, { name = "tree-sitter-nqc", url = "tree-sitter-grammars/tree-sitter-nqc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-objdump", url = "ColinKennedy/tree-sitter-objdump", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.10-1" + version = "0.0.27-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.10-1" + version = "0.0.27-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-odin", url = "tree-sitter-grammars/tree-sitter-odin", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-org", url = "milisims/tree-sitter-org", @@ -1582,507 +1598,507 @@ return }, { name = "tree-sitter-pascal", url = "Isopod/tree-sitter-pascal", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-passwd", url = "ath3/tree-sitter-passwd", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pem", url = "tree-sitter-grammars/tree-sitter-pem", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.12-1" + version = "0.0.28-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pioasm", url = "leo60228/tree-sitter-pioasm", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-po", url = "tree-sitter-grammars/tree-sitter-po", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pod", url = "tree-sitter-perl/tree-sitter-pod", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-poe_filter", url = "tree-sitter-grammars/tree-sitter-poe-filter", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pony", url = "tree-sitter-grammars/tree-sitter-pony", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-problog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-prolog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-promql", url = "MichaHoffmann/tree-sitter-promql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-properties", url = "tree-sitter-grammars/tree-sitter-properties", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-proto", url = "treywood/tree-sitter-proto", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-prql", url = "PRQL/tree-sitter-prql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-psv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pug", url = "zealot128/tree-sitter-pug", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-puppet", url = "tree-sitter-grammars/tree-sitter-puppet", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-purescript", url = "postsolar/tree-sitter-purescript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-pymanifest", url = "tree-sitter-grammars/tree-sitter-pymanifest", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-qmldir", url = "tree-sitter-grammars/tree-sitter-qmldir", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-qmljs", url = "yuja/tree-sitter-qmljs", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", - version = "0.0.11-1" + version = "0.0.26-1" }, { name = "tree-sitter-racket", url = "6cdh/tree-sitter-racket", - version = "0.0.12-1" + version = "0.0.26-1" }, { name = "tree-sitter-ralph", url = "alephium/tree-sitter-ralph", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rasi", url = "Fymyte/tree-sitter-rasi", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rbs", url = "joker1007/tree-sitter-rbs", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-re2c", url = "tree-sitter-grammars/tree-sitter-re2c", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-readline", url = "tree-sitter-grammars/tree-sitter-readline", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-requirements", url = "tree-sitter-grammars/tree-sitter-requirements", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rescript", url = "rescript-lang/tree-sitter-rescript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rnoweb", url = "bamonroe/tree-sitter-rnoweb", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-robot", url = "Hubro/tree-sitter-robot", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-robots", url = "opa-oz/tree-sitter-robots-txt", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-roc", url = "faldor20/tree-sitter-roc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ron", url = "tree-sitter-grammars/tree-sitter-ron", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.13-1" + version = "0.0.27-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-scheme", url = "6cdh/tree-sitter-scheme", - version = "0.0.12-1" + version = "0.0.26-1" }, { name = "tree-sitter-scss", url = "serenadeai/tree-sitter-scss", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", - version = "0.0.11-1" + version = "0.0.25-1" }, { name = "tree-sitter-slint", url = "slint-ui/tree-sitter-slint", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-smali", url = "tree-sitter-grammars/tree-sitter-smali", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-smithy", url = "indoorvivants/tree-sitter-smithy", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-snakemake", url = "osthomas/tree-sitter-snakemake", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-solidity", url = "JoranHonig/tree-sitter-solidity", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-sparql", url = "GordianDziwis/tree-sitter-sparql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ssh_config", url = "tree-sitter-grammars/tree-sitter-ssh-config", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-starlark", url = "tree-sitter-grammars/tree-sitter-starlark", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-strace", url = "sigmaSd/tree-sitter-strace", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-styled", url = "mskelton/tree-sitter-styled", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-supercollider", url = "madskjeldgaard/tree-sitter-supercollider", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-svelte", url = "tree-sitter-grammars/tree-sitter-svelte", - version = "0.0.12-1" + version = "0.0.26-1" }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.11-1" + version = "0.0.26-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-systemtap", url = "ok-ryoko/tree-sitter-systemtap", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-systemverilog", url = "zhangwwpeng/tree-sitter-systemverilog", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-t32", url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/6182836f4128725f1e74ce986840d7317021a015.zip", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tact", url = "tact-lang/tree-sitter-tact", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "tree-sitter-tcl", url = "tree-sitter-grammars/tree-sitter-tcl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-textproto", url = "PorterAtGoogle/tree-sitter-textproto", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-thrift", url = "tree-sitter-grammars/tree-sitter-thrift", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tiger", url = "ambroisie/tree-sitter-tiger", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tlaplus", url = "tlaplus-community/tree-sitter-tlaplus", - version = "0.0.10-1" + version = "0.0.26-1" }, { name = "tree-sitter-tmux", url = "Freed-Wu/tree-sitter-tmux", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-todotxt", url = "arnarg/tree-sitter-todotxt", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-toml", url = "tree-sitter-grammars/tree-sitter-toml", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tsv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-twig", url = "gbprod/tree-sitter-twig", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-typoscript", url = "Teddytrombone/tree-sitter-typoscript", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-typst", url = "uben0/tree-sitter-typst", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-udev", url = "tree-sitter-grammars/tree-sitter-udev", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-ungrammar", url = "tree-sitter-grammars/tree-sitter-ungrammar", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-unison", url = "kylegoetz/tree-sitter-unison", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-usd", url = "ColinKennedy/tree-sitter-usd", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-uxntal", url = "tree-sitter-grammars/tree-sitter-uxntal", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.11-1" + version = "0.0.27-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vento", url = "ventojs/tree-sitter-vento", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-verilog", url = "tree-sitter/tree-sitter-verilog", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vimdoc", url = "neovim/tree-sitter-vimdoc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vrl", url = "belltoy/tree-sitter-vrl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-vue", url = "tree-sitter-grammars/tree-sitter-vue", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-wgsl", url = "szebniok/tree-sitter-wgsl", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-wgsl_bevy", url = "tree-sitter-grammars/tree-sitter-wgsl-bevy", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-wing", url = "winglang/tree-sitter-wing", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-wit", url = "liamwh/tree-sitter-wit", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-xcompose", url = "tree-sitter-grammars/tree-sitter-xcompose", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-yang", url = "Hubro/tree-sitter-yang", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-yuck", url = "tree-sitter-grammars/tree-sitter-yuck", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-zathurarc", url = "Freed-Wu/tree-sitter-zathurarc", - version = "0.0.10-1" + version = "0.0.24-1" }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.10-1" + version = "0.0.25-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", @@ -2110,7 +2126,7 @@ return }, { name = "which-key.nvim", url = "folke/which-key.nvim", - version = "3.13.2-1" + version = "3.13.3-1" }, { name = "windline.nvim", url = "windwp/windline.nvim", @@ -2126,7 +2142,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.1.0-1" + version = "6.3.0-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", From 40dab7450e6da28364539664d9f51be596b4686b Mon Sep 17 00:00:00 2001 From: Lorenzo Zabot Date: Tue, 22 Oct 2024 12:43:33 +0200 Subject: [PATCH 109/148] style(typos): correct a few typos (#1776) ## Description This PR just fixes a few typos :) `dont => don't` ## Related Issue(s) ## Screenshots --- lua/lazy/core/config.lua | 2 +- lua/lazy/manage/task/git.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 16cc012..5bb1d91 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -218,7 +218,7 @@ M.defaults = { enabled = true, root = vim.fn.stdpath("state") .. "/lazy/readme", files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs + -- only generate markdown helptags for plugins that don't have docs skip_if_doc_exists = true, }, state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index c54c809..ef848f9 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -335,7 +335,7 @@ M.checkout = { end end - -- dont run checkout if target is already reached. + -- don't run checkout if target is already reached. -- unless we just cloned, since then we won't have any data yet if Git.eq(info, target) and info.branch == target.branch then self.plugin._.updated = { From cf8ecc2c5e4332760431a33534240b0cbc6680ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Oct 2024 10:47:57 +0000 Subject: [PATCH 110/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 700 ++++++++++++++++-------------- 1 file changed, 374 insertions(+), 326 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 558ff33..c105756 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -14,7 +14,7 @@ return }, { name = "aerial.nvim", url = "stevearc/aerial.nvim", - version = "2.3.0-1" + version = "2.3.1-1" }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", @@ -115,6 +115,10 @@ return name = "deadcolumn.nvim", url = "Bekaboo/deadcolumn.nvim", version = "1.0.0-1" + }, { + name = "decasify.nvim", + url = "alerque/decasify", + version = "0.7.3-1" }, { name = "decipher.nvim", url = "MisanthropicBit/decipher.nvim", @@ -139,6 +143,10 @@ return name = "donut.nvim", url = "NStefan002/donut.nvim", version = "2.2.1-1" + }, { + name = "doris.nvim", + url = "jackokring/doris.nvim", + version = "0.0.0-1" }, { name = "dressing.nvim", url = "stevearc/dressing.nvim", @@ -166,11 +174,11 @@ return }, { name = "elixir-tools.nvim", url = "elixir-tools/elixir-tools.nvim", - version = "0.16.0-1" + version = "0.16.1-1" }, { name = "feed.nvim", - url = "noearc/feed.nvim", - version = "main-1" + url = "neo451/feed.nvim", + version = "1.5.1-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", @@ -230,7 +238,7 @@ return }, { name = "git.nvim", url = "Kibadda/git.nvim", - version = "4.1.0-1" + version = "5.0.1-1" }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", @@ -263,6 +271,10 @@ return name = "gruvbox.nvim", url = "ellisonleao/gruvbox.nvim", version = "2.0.0-1" + }, { + name = "guard.nvim", + url = "nvimdev/guard.nvim", + version = "1.0.1-1" }, { name = "hardhat.nvim", url = "TheSnakeWitcher/hardhat.nvim", @@ -274,7 +286,7 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "4.1.0-1" + version = "4.3.1-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", @@ -318,7 +330,7 @@ return }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.7.2-1" + version = "3.8.2-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -327,6 +339,10 @@ return name = "kanban.nvim", url = "Kibadda/kanban.nvim", version = "1.3.0-1" + }, { + name = "kube.nvim", + url = "mimparat132/kube.nvim", + version = "1.2.0-1" }, { name = "lazy.nvim", url = "folke/lazy.nvim", @@ -395,6 +411,10 @@ return name = "luarocks-build-treesitter-parser-cpp", url = "nvim-neorocks/luarocks-build-treesitter-parser-cpp", version = "2.0.4-1" + }, { + name = "magazine.nvim", + url = "iguanacucumber/magazine.nvim", + version = "0.1-1" }, { name = "mapx.nvim", url = "b0o/mapx.nvim", @@ -406,7 +426,7 @@ return }, { name = "markview.nvim", url = "OXY2DEV/markview.nvim", - version = "23.1.0-1" + version = "24.0.0-1" }, { name = "mason-lspconfig.nvim", url = "williamboman/mason-lspconfig.nvim", @@ -494,15 +514,15 @@ return }, { name = "neotest", url = "nvim-neotest/neotest", - version = "5.6.0-1" + version = "5.6.1-1" }, { name = "neotest-busted", url = "MisanthropicBit/neotest-busted", - version = "0.2.0-1" + version = "0.2.1-1" }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.2.0-1" + version = "1.3.0-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", @@ -510,7 +530,7 @@ return }, { name = "neotest-java", url = "rcasia/neotest-java", - version = "0.16.0-1" + version = "0.17.4-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -522,11 +542,11 @@ return }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "2.0.5-1" + version = "2.0.6-1" }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.5.1-1" + version = "4.5.2-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -542,7 +562,7 @@ return }, { name = "nvim-a2-pack", url = "dfgordon/nvim-a2-pack", - version = "0.0.2-1" + version = "0.2.0-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -634,7 +654,7 @@ return }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", - version = "5.2.2-1" + version = "6.0.0-1" }, { name = "nvim-smuggler", url = "Klafyvel/nvim-smuggler", @@ -682,7 +702,7 @@ return }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "1.0.0-1" + version = "2.0.0-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -722,7 +742,7 @@ return }, { name = "persisted.nvim", url = "olimorris/persisted.nvim", - version = "2.0.0-1" + version = "2.0.1-1" }, { name = "persistence.nvim", url = "folke/persistence.nvim", @@ -762,11 +782,11 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.2.0-1" + version = "7.4.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.8.2-1" + version = "3.8.3-1" }, { name = "rime.nvim", url = "Freed-Wu/rime.nvim", @@ -782,11 +802,11 @@ return }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "2.3.1-1" + version = "2.4.2-1" }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", - version = "1.1.0-1" + version = "1.1.1-1" }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", @@ -794,7 +814,7 @@ return }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.40.2-1" + version = "2.40.5-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -806,7 +826,7 @@ return }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.11.0-1" + version = "5.13.0-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -826,7 +846,7 @@ return }, { name = "sf.nvim", url = "xixiaofinland/sf.nvim", - version = "1.7.0-1" + version = "1.8.0-1" }, { name = "sg.nvim", url = "sourcegraph/sg.nvim", @@ -835,6 +855,10 @@ return name = "smart-splits.nvim", url = "mrjones2014/smart-splits.nvim", version = "1.6.0-1" + }, { + name = "sos.nvim", + url = "tmillr/sos.nvim", + version = "1.0.0-1" }, { name = "squirrel.nvim", url = "xiaoshihou514/squirrel.nvim", @@ -894,663 +918,667 @@ return }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-agda", url = "tree-sitter/tree-sitter-agda", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-angular", url = "dlvandenberg/tree-sitter-angular", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.26-1" + version = "0.0.36-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-asm", url = "RubixDev/tree-sitter-asm", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-authzed", url = "mleonidas/tree-sitter-authzed", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-awk", url = "Beaglefoot/tree-sitter-awk", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-beancount", url = "polarmutex/tree-sitter-beancount", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-bibtex", url = "latex-lsp/tree-sitter-bibtex", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-bicep", url = "tree-sitter-grammars/tree-sitter-bicep", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-bitbake", url = "tree-sitter-grammars/tree-sitter-bitbake", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-blueprint", url = "https://gitlab.com/gabmus/tree-sitter-blueprint/-/archive/60ba73739c6083c693d86a1a7cf039c07eb4ed59.zip", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-bp", url = "ambroisie/tree-sitter-bp", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.25-1" + version = "0.0.32-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-capnp", url = "tree-sitter-grammars/tree-sitter-capnp", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-chatito", url = "tree-sitter-grammars/tree-sitter-chatito", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cmake", url = "uyha/tree-sitter-cmake", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-comment", url = "stsewd/tree-sitter-comment", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-commonlisp", url = "tree-sitter-grammars/tree-sitter-commonlisp", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cooklang", url = "addcninblue/tree-sitter-cooklang", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-corn", url = "jakestanger/tree-sitter-corn", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cpon", url = "tree-sitter-grammars/tree-sitter-cpon", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.26-1" + version = "0.0.32-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cuda", url = "tree-sitter-grammars/tree-sitter-cuda", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-d", url = "gdamore/tree-sitter-d", - version = "0.0.28-1" + version = "0.0.33-1" }, { name = "tree-sitter-dart", url = "UserNobody14/tree-sitter-dart", - version = "0.0.24-1" + version = "0.0.32-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", - version = "0.0.25-1" + version = "0.0.31-1" }, { name = "tree-sitter-dhall", url = "jbellerb/tree-sitter-dhall", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-diff", url = "the-mikedavis/tree-sitter-diff", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-disassembly", url = "ColinKennedy/tree-sitter-disassembly", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-djot", url = "treeman/tree-sitter-djot", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-dockerfile", url = "camdencheek/tree-sitter-dockerfile", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-dot", url = "rydesun/tree-sitter-dot", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-doxygen", url = "tree-sitter-grammars/tree-sitter-doxygen", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ecma", url = "nvim-neorocks/luarocks-stub", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.25-1" + version = "0.0.34-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-eex", url = "connorlay/tree-sitter-eex", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.26-1" + version = "0.0.33-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-elsa", url = "glapa-grossklag/tree-sitter-elsa", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-elvish", url = "elves/tree-sitter-elvish", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-faust", url = "khiner/tree-sitter-faust", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fennel", url = "alexmozaidze/tree-sitter-fennel", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fidl", url = "google/tree-sitter-fidl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-firrtl", url = "tree-sitter-grammars/tree-sitter-firrtl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fish", url = "ram02z/tree-sitter-fish", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-foam", url = "FoamScience/tree-sitter-foam", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-forth", url = "AlexanderBrevig/tree-sitter-forth", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.27-1" + version = "0.0.32-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fsharp", url = "ionide/tree-sitter-fsharp", - version = "0.0.2-1" + version = "0.0.9-1" }, { name = "tree-sitter-func", url = "tree-sitter-grammars/tree-sitter-func", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-fusion", url = "https://gitlab.com/jirgn/tree-sitter-fusion/-/archive/19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6.zip", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gap", url = "gap-system/tree-sitter-gap", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gaptst", url = "gap-system/tree-sitter-gaptst", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-git_config", url = "the-mikedavis/tree-sitter-git-config", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-git_rebase", url = "the-mikedavis/tree-sitter-git-rebase", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gitattributes", url = "tree-sitter-grammars/tree-sitter-gitattributes", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gitcommit", url = "gbprod/tree-sitter-gitcommit", - version = "0.0.24-1" + version = "0.0.32-1" }, { name = "tree-sitter-gitignore", url = "shunsambongi/tree-sitter-gitignore", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-glimmer", url = "ember-tooling/tree-sitter-glimmer", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-glimmer_javascript", url = "NullVoxPopuli/tree-sitter-glimmer-javascript", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-glimmer_typescript", url = "NullVoxPopuli/tree-sitter-glimmer-typescript", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-glsl", url = "tree-sitter-grammars/tree-sitter-glsl", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-gn", url = "tree-sitter-grammars/tree-sitter-gn", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gnuplot", url = "dpezto/tree-sitter-gnuplot", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.25-1" + version = "0.0.31-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-godot_resource", url = "PrestonKnopp/tree-sitter-godot-resource", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gomod", url = "camdencheek/tree-sitter-go-mod", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-gosum", url = "tree-sitter-grammars/tree-sitter-go-sum", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gotmpl", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-gowork", url = "omertuc/tree-sitter-go-work", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gpg", url = "tree-sitter-grammars/tree-sitter-gpg-config", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-graphql", url = "bkegley/tree-sitter-graphql", - version = "0.0.24-1" + version = "0.0.29-1" + }, { + name = "tree-sitter-gren", + url = "MaeBrooks/tree-sitter-gren", + version = "0.0.2-1" }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-gstlaunch", url = "tree-sitter-grammars/tree-sitter-gstlaunch", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hack", url = "slackhq/tree-sitter-hack", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hare", url = "tree-sitter-grammars/tree-sitter-hare", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-haskell", url = "tree-sitter/tree-sitter-haskell", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-haskell_persistent", url = "MercuryTechnologies/tree-sitter-haskell-persistent", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hcl", url = "tree-sitter-grammars/tree-sitter-hcl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-heex", url = "connorlay/tree-sitter-heex", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-helm", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-hjson", url = "winston0410/tree-sitter-hjson", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hlsl", url = "tree-sitter-grammars/tree-sitter-hlsl", - version = "0.0.25-1" + version = "0.0.31-1" }, { name = "tree-sitter-hlsplaylist", url = "Freed-Wu/tree-sitter-hlsplaylist", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hocon", url = "antosha417/tree-sitter-hocon", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-hoon", url = "urbit-pilled/tree-sitter-hoon", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-htmldjango", url = "interdependence/tree-sitter-htmldjango", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-hyprlang", url = "tree-sitter-grammars/tree-sitter-hyprlang", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ini", url = "justinmk/tree-sitter-ini", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.24-1" + version = "0.0.32-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-jsonc", url = "https://gitlab.com/WhyNotHugo/tree-sitter-jsonc/-/archive/02b01653c8a1c198ae7287d566efa86a135b30d5.zip", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-jsonnet", url = "sourcegraph/tree-sitter-jsonnet", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-jsx", url = "nvim-neorocks/luarocks-stub", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-kdl", url = "tree-sitter-grammars/tree-sitter-kdl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-kotlin", url = "fwcd/tree-sitter-kotlin", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-koto", url = "koto-lang/tree-sitter-koto", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-kusto", url = "Willem-J-an/tree-sitter-kusto", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-lalrpop", url = "traxys/tree-sitter-lalrpop", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-latex", url = "latex-lsp/tree-sitter-latex", - version = "0.0.25-1" + version = "0.0.32-1" }, { name = "tree-sitter-ledger", url = "cbarrete/tree-sitter-ledger", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-leo", url = "r001/tree-sitter-leo", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-linkerscript", url = "tree-sitter-grammars/tree-sitter-linkerscript", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-liquid", url = "hankthetank27/tree-sitter-liquid", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-liquidsoap", url = "savonet/tree-sitter-liquidsoap", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-llvm", url = "benwilliamgraham/tree-sitter-llvm", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-luap", url = "tree-sitter-grammars/tree-sitter-luap", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-luau", url = "tree-sitter-grammars/tree-sitter-luau", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-m68k", url = "grahambates/tree-sitter-m68k", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-make", url = "alemuller/tree-sitter-make", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.28-1" + version = "0.0.34-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.28-1" + version = "0.0.34-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-menhir", url = "Kerl13/tree-sitter-menhir", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-mermaid", url = "monaqa/tree-sitter-mermaid", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-meson", url = "tree-sitter-grammars/tree-sitter-meson", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.24-1" + version = "0.0.34-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-nasm", url = "naclsn/tree-sitter-nasm", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-nginx", url = "opa-oz/tree-sitter-nginx", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-nickel", url = "nickel-lang/tree-sitter-nickel", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-nim", url = "alaviss/tree-sitter-nim", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-nim_format_string", url = "aMOPel/tree-sitter-nim-format-string", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ninja", url = "alemuller/tree-sitter-ninja", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.29-1" + version = "0.0.42-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1562,31 +1590,31 @@ return }, { name = "tree-sitter-nqc", url = "tree-sitter-grammars/tree-sitter-nqc", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-objdump", url = "ColinKennedy/tree-sitter-objdump", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.27-1" + version = "0.0.32-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.27-1" + version = "0.0.33-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-odin", url = "tree-sitter-grammars/tree-sitter-odin", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-org", url = "milisims/tree-sitter-org", @@ -1598,507 +1626,527 @@ return }, { name = "tree-sitter-pascal", url = "Isopod/tree-sitter-pascal", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-passwd", url = "ath3/tree-sitter-passwd", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-pem", url = "tree-sitter-grammars/tree-sitter-pem", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.28-1" + version = "0.0.35-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.24-1" + version = "0.0.33-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.24-1" + version = "0.0.33-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-pioasm", url = "leo60228/tree-sitter-pioasm", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-po", url = "tree-sitter-grammars/tree-sitter-po", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-pod", url = "tree-sitter-perl/tree-sitter-pod", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-poe_filter", url = "tree-sitter-grammars/tree-sitter-poe-filter", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-pony", url = "tree-sitter-grammars/tree-sitter-pony", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.25-1" + version = "0.0.30-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-problog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-prolog", url = "foxyseta/tree-sitter-prolog", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-promql", url = "MichaHoffmann/tree-sitter-promql", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-properties", url = "tree-sitter-grammars/tree-sitter-properties", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-proto", url = "treywood/tree-sitter-proto", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-prql", url = "PRQL/tree-sitter-prql", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-psv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-pug", url = "zealot128/tree-sitter-pug", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-puppet", url = "tree-sitter-grammars/tree-sitter-puppet", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-purescript", url = "postsolar/tree-sitter-purescript", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-pymanifest", url = "tree-sitter-grammars/tree-sitter-pymanifest", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-qmldir", url = "tree-sitter-grammars/tree-sitter-qmldir", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-qmljs", url = "yuja/tree-sitter-qmljs", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-racket", url = "6cdh/tree-sitter-racket", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-ralph", url = "alephium/tree-sitter-ralph", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-rasi", url = "Fymyte/tree-sitter-rasi", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-rbs", url = "joker1007/tree-sitter-rbs", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-re2c", url = "tree-sitter-grammars/tree-sitter-re2c", - version = "0.0.25-1" + version = "0.0.31-1" }, { name = "tree-sitter-readline", url = "tree-sitter-grammars/tree-sitter-readline", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.24-1" + version = "0.0.32-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-requirements", url = "tree-sitter-grammars/tree-sitter-requirements", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-rescript", url = "rescript-lang/tree-sitter-rescript", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-rnoweb", url = "bamonroe/tree-sitter-rnoweb", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-robot", url = "Hubro/tree-sitter-robot", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-robots", url = "opa-oz/tree-sitter-robots-txt", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-roc", url = "faldor20/tree-sitter-roc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ron", url = "tree-sitter-grammars/tree-sitter-ron", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.27-1" + version = "0.0.36-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-scheme", url = "6cdh/tree-sitter-scheme", - version = "0.0.26-1" + version = "0.0.31-1" }, { name = "tree-sitter-scss", url = "serenadeai/tree-sitter-scss", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.26-1" + version = "0.0.34-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", - version = "0.0.25-1" + version = "0.0.32-1" }, { name = "tree-sitter-slint", url = "slint-ui/tree-sitter-slint", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-smali", url = "tree-sitter-grammars/tree-sitter-smali", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-smithy", url = "indoorvivants/tree-sitter-smithy", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-snakemake", url = "osthomas/tree-sitter-snakemake", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-solidity", url = "JoranHonig/tree-sitter-solidity", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.26-1" + version = "0.0.35-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.26-1" + version = "0.0.34-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-sparql", url = "GordianDziwis/tree-sitter-sparql", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ssh_config", url = "tree-sitter-grammars/tree-sitter-ssh-config", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-starlark", url = "tree-sitter-grammars/tree-sitter-starlark", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-strace", url = "sigmaSd/tree-sitter-strace", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-styled", url = "mskelton/tree-sitter-styled", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-supercollider", url = "madskjeldgaard/tree-sitter-supercollider", - version = "0.0.25-1" + version = "0.0.30-1" + }, { + name = "tree-sitter-superhtml", + url = "kristoff-it/superhtml", + version = "0.0.6-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-svelte", url = "tree-sitter-grammars/tree-sitter-svelte", - version = "0.0.26-1" + version = "0.0.32-1" }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.26-1" + version = "0.0.35-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-systemtap", url = "ok-ryoko/tree-sitter-systemtap", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-systemverilog", url = "zhangwwpeng/tree-sitter-systemverilog", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-t32", - url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/6182836f4128725f1e74ce986840d7317021a015.zip", - version = "0.0.24-1" + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/0f6a5b1e031c97ebf58d3c76eadb2c6bf1e4f780.zip", + version = "0.0.30-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-tact", url = "tact-lang/tree-sitter-tact", - version = "0.0.25-1" + version = "0.0.33-1" }, { name = "tree-sitter-tcl", url = "tree-sitter-grammars/tree-sitter-tcl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.26-1" + version = "0.0.33-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-textproto", url = "PorterAtGoogle/tree-sitter-textproto", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-thrift", url = "tree-sitter-grammars/tree-sitter-thrift", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-tiger", url = "ambroisie/tree-sitter-tiger", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-tlaplus", url = "tlaplus-community/tree-sitter-tlaplus", - version = "0.0.26-1" + version = "0.0.34-1" }, { name = "tree-sitter-tmux", url = "Freed-Wu/tree-sitter-tmux", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-todotxt", url = "arnarg/tree-sitter-todotxt", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-toml", url = "tree-sitter-grammars/tree-sitter-toml", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-tsv", url = "tree-sitter-grammars/tree-sitter-csv", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-twig", url = "gbprod/tree-sitter-twig", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-typoscript", url = "Teddytrombone/tree-sitter-typoscript", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-typst", url = "uben0/tree-sitter-typst", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-udev", url = "tree-sitter-grammars/tree-sitter-udev", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-ungrammar", url = "tree-sitter-grammars/tree-sitter-ungrammar", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-unison", url = "kylegoetz/tree-sitter-unison", - version = "0.0.24-1" + version = "0.0.31-1" }, { name = "tree-sitter-usd", url = "ColinKennedy/tree-sitter-usd", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-uxntal", url = "tree-sitter-grammars/tree-sitter-uxntal", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.27-1" + version = "0.0.34-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-vento", url = "ventojs/tree-sitter-vento", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-verilog", - url = "tree-sitter/tree-sitter-verilog", - version = "0.0.24-1" + url = "gmlarumbe/tree-sitter-systemverilog", + version = "0.0.33-1" }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-vimdoc", url = "neovim/tree-sitter-vimdoc", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-vrl", url = "belltoy/tree-sitter-vrl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-vue", url = "tree-sitter-grammars/tree-sitter-vue", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-wgsl", url = "szebniok/tree-sitter-wgsl", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-wgsl_bevy", url = "tree-sitter-grammars/tree-sitter-wgsl-bevy", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-wing", url = "winglang/tree-sitter-wing", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-wit", url = "liamwh/tree-sitter-wit", - version = "0.0.24-1" + version = "0.0.30-1" }, { name = "tree-sitter-xcompose", url = "tree-sitter-grammars/tree-sitter-xcompose", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.24-1" + version = "0.0.30-1" + }, { + name = "tree-sitter-xresources", + url = "ValdezFOmar/tree-sitter-xresources", + version = "0.0.3-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-yang", url = "Hubro/tree-sitter-yang", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-yuck", url = "tree-sitter-grammars/tree-sitter-yuck", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-zathurarc", url = "Freed-Wu/tree-sitter-zathurarc", - version = "0.0.24-1" + version = "0.0.29-1" }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.25-1" + version = "0.0.30-1" + }, { + name = "tree-sitter-ziggy", + url = "kristoff-it/ziggy", + version = "0.0.6-1" + }, { + name = "tree-sitter-ziggy_schema", + url = "kristoff-it/ziggy", + version = "0.0.6-1" + }, { + name = "treedoc.nvim", + url = "neo451/treedoc.nvim", + version = "1.0.0-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", @@ -2142,7 +2190,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.3.0-1" + version = "6.4.3-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", From 408449a59adb8c2a31c32fff606676b32ce4552a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 4 Nov 2024 11:46:48 +0100 Subject: [PATCH 111/148] fix(rockspec): allow binary lua files. Fixes #1800 --- lua/lazy/pkg/rockspec.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazy/pkg/rockspec.lua b/lua/lazy/pkg/rockspec.lua index d7ecfdb..e8ece1b 100644 --- a/lua/lazy/pkg/rockspec.lua +++ b/lua/lazy/pkg/rockspec.lua @@ -224,9 +224,10 @@ end ---@return table? function M.parse(file) local ret = {} - return pcall(function() - loadfile(file, "t", ret)() + local ok = pcall(function() + loadfile(file, nil, ret)() end) and ret or nil + return ok and ret or nil end ---@param plugin LazyPlugin From b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Nov 2024 10:49:21 +0000 Subject: [PATCH 112/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 176 ++++++++++++++++++------------ 1 file changed, 108 insertions(+), 68 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index c105756..908d5d7 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -27,6 +27,10 @@ return name = "auto-hlsearch.nvim", url = "asiryk/auto-hlsearch.nvim", version = "1.1.0-1" + }, { + name = "autosave.nvim", + url = "brianhuster/autosave.nvim", + version = "0.1.1-1" }, { name = "banana.nvim", url = "CWood-sdf/banana.nvim", @@ -42,11 +46,11 @@ return }, { name = "better-escape.nvim", url = "max397574/better-escape.nvim", - version = "2.3.2-1" + version = "2.3.3-1" }, { name = "bufferline.nvim", url = "akinsho/bufferline.nvim", - version = "4.7.0-1" + version = "4.8.0-1" }, { name = "care.nvim", url = "max397574/care.nvim", @@ -79,6 +83,10 @@ return name = "colortils.nvim", url = "nvim-colortils/colortils.nvim", version = "1.1.0-1" + }, { + name = "command.nvim", + url = "cultab/command.nvim", + version = "0.1.1-1" }, { name = "commander.nvim", url = "FeiyouG/commander.nvim", @@ -114,11 +122,11 @@ return }, { name = "deadcolumn.nvim", url = "Bekaboo/deadcolumn.nvim", - version = "1.0.0-1" + version = "1.0.1-1" }, { name = "decasify.nvim", url = "alerque/decasify", - version = "0.7.3-1" + version = "0.8.0-1" }, { name = "decipher.nvim", url = "MisanthropicBit/decipher.nvim", @@ -154,7 +162,7 @@ return }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "8.6.1-1" + version = "9.0.0-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -178,7 +186,7 @@ return }, { name = "feed.nvim", url = "neo451/feed.nvim", - version = "1.5.1-1" + version = "1.6.3-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", @@ -238,7 +246,7 @@ return }, { name = "git.nvim", url = "Kibadda/git.nvim", - version = "5.0.1-1" + version = "5.1.0-1" }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", @@ -274,7 +282,7 @@ return }, { name = "guard.nvim", url = "nvimdev/guard.nvim", - version = "1.0.1-1" + version = "1.0.3-1" }, { name = "hardhat.nvim", url = "TheSnakeWitcher/hardhat.nvim", @@ -314,7 +322,7 @@ return }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", - version = "1.7.1-1" + version = "1.8.0-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -330,7 +338,7 @@ return }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.8.2-1" + version = "3.8.3-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -354,7 +362,7 @@ return }, { name = "lean.nvim", url = "Julian/lean.nvim", - version = "2024.9.2-1" + version = "2024.10.1-1" }, { name = "leetcode.nvim", url = "kawre/leetcode.nvim", @@ -367,6 +375,10 @@ return name = "live-command.nvim", url = "smjonas/live-command.nvim", version = "2.2.0-1" + }, { + name = "live-preview.nvim", + url = "brianhuster/live-preview.nvim", + version = "0.8.1-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -411,10 +423,18 @@ return name = "luarocks-build-treesitter-parser-cpp", url = "nvim-neorocks/luarocks-build-treesitter-parser-cpp", version = "2.0.4-1" + }, { + name = "mag-nvim-lsp", + url = "iguanacucumber/mag-nvim-lsp", + version = "0.1-1" + }, { + name = "mag-nvim-lua", + url = "iguanacucumber/mag-nvim-lua", + version = "0.1-1" }, { name = "magazine.nvim", url = "iguanacucumber/magazine.nvim", - version = "0.1-1" + version = "0.2.1-1" }, { name = "mapx.nvim", url = "b0o/mapx.nvim", @@ -522,7 +542,7 @@ return }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.3.0-1" + version = "1.5.0-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", @@ -530,7 +550,11 @@ return }, { name = "neotest-java", url = "rcasia/neotest-java", - version = "0.17.4-1" + version = "0.17.5-1" + }, { + name = "neotest-zig", + url = "lawrence-laz/neotest-zig", + version = "1.3.0-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -546,7 +570,7 @@ return }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.5.2-1" + version = "4.6.0-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -563,6 +587,10 @@ return name = "nvim-a2-pack", url = "dfgordon/nvim-a2-pack", version = "0.2.0-1" + }, { + name = "nvim-best-practices-plugin-template", + url = "ColinKennedy/nvim-best-practices-plugin-template", + version = "1.3.1-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -650,7 +678,7 @@ return }, { name = "nvim-possession", url = "gennaro-tedesco/nvim-possession", - version = "0.0.14-1" + version = "0.0.15-1" }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", @@ -702,7 +730,7 @@ return }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "2.0.0-1" + version = "2.0.1-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -762,7 +790,7 @@ return }, { name = "quarry.nvim", url = "rudionrails/quarry.nvim", - version = "3.0.1-1" + version = "4.0.0-1" }, { name = "quicker.nvim", url = "stevearc/quicker.nvim", @@ -770,7 +798,7 @@ return }, { name = "rainbow-delimiters.nvim", url = "HiPhish/rainbow-delimiters.nvim", - version = "0.6.2-1" + version = "0.7.0-1" }, { name = "remember.nvim", url = "vladdoster/remember.nvim", @@ -802,7 +830,7 @@ return }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "2.4.2-1" + version = "2.5.1-1" }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", @@ -814,7 +842,7 @@ return }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.40.5-1" + version = "2.41.1-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -822,11 +850,11 @@ return }, { name = "runt.nvim", url = "Julian/runt.nvim", - version = "2024.10.1-1" + version = "2024.10.2-1" }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.13.0-1" + version = "5.13.1-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -855,6 +883,10 @@ return name = "smart-splits.nvim", url = "mrjones2014/smart-splits.nvim", version = "1.6.0-1" + }, { + name = "snippets.nvim", + url = "Kibadda/snippets.nvim", + version = "1.0.0-1" }, { name = "sos.nvim", url = "tmillr/sos.nvim", @@ -914,7 +946,7 @@ return }, { name = "tokyonight.nvim", url = "folke/tokyonight.nvim", - version = "4.8.0-1" + version = "4.9.0-1" }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", @@ -950,11 +982,11 @@ return }, { name = "tree-sitter-awk", url = "Beaglefoot/tree-sitter-awk", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", @@ -962,7 +994,7 @@ return }, { name = "tree-sitter-beancount", url = "polarmutex/tree-sitter-beancount", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-bibtex", url = "latex-lsp/tree-sitter-bibtex", @@ -986,7 +1018,7 @@ return }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", @@ -1051,6 +1083,10 @@ return name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", version = "0.0.29-1" + }, { + name = "tree-sitter-cylc", + url = "elliotfontaine/tree-sitter-cylc", + version = "0.0.1-1" }, { name = "tree-sitter-d", url = "gdamore/tree-sitter-d", @@ -1059,6 +1095,10 @@ return name = "tree-sitter-dart", url = "UserNobody14/tree-sitter-dart", version = "0.0.32-1" + }, { + name = "tree-sitter-desktop", + url = "ValdezFOmar/tree-sitter-desktop", + version = "0.0.4-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", @@ -1094,7 +1134,7 @@ return }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", @@ -1110,7 +1150,7 @@ return }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.34-1" + version = "0.0.37-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", @@ -1122,7 +1162,7 @@ return }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", @@ -1142,7 +1182,7 @@ return }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", @@ -1178,7 +1218,7 @@ return }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", @@ -1206,7 +1246,7 @@ return }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", @@ -1226,7 +1266,7 @@ return }, { name = "tree-sitter-gitcommit", url = "gbprod/tree-sitter-gitcommit", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-gitignore", url = "shunsambongi/tree-sitter-gitignore", @@ -1234,7 +1274,7 @@ return }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-glimmer", url = "ember-tooling/tree-sitter-glimmer", @@ -1302,7 +1342,7 @@ return }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-gstlaunch", url = "tree-sitter-grammars/tree-sitter-gstlaunch", @@ -1330,11 +1370,11 @@ return }, { name = "tree-sitter-heex", url = "connorlay/tree-sitter-heex", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-helm", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-hjson", url = "winston0410/tree-sitter-hjson", @@ -1394,7 +1434,7 @@ return }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", @@ -1406,7 +1446,7 @@ return }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", @@ -1442,7 +1482,7 @@ return }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", @@ -1458,7 +1498,7 @@ return }, { name = "tree-sitter-koto", url = "koto-lang/tree-sitter-koto", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-kusto", url = "Willem-J-an/tree-sitter-kusto", @@ -1498,7 +1538,7 @@ return }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", @@ -1522,11 +1562,11 @@ return }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", @@ -1546,7 +1586,7 @@ return }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", @@ -1578,7 +1618,7 @@ return }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.42-1" + version = "0.0.45-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1674,7 +1714,7 @@ return }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", @@ -1778,7 +1818,7 @@ return }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", @@ -1814,15 +1854,15 @@ return }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", @@ -1886,7 +1926,7 @@ return }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", @@ -1906,7 +1946,7 @@ return }, { name = "tree-sitter-styled", url = "mskelton/tree-sitter-styled", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-supercollider", url = "madskjeldgaard/tree-sitter-supercollider", @@ -1914,7 +1954,7 @@ return }, { name = "tree-sitter-superhtml", url = "kristoff-it/superhtml", - version = "0.0.6-1" + version = "0.0.9-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", @@ -1926,7 +1966,7 @@ return }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", @@ -1941,8 +1981,8 @@ return version = "0.0.29-1" }, { name = "tree-sitter-t32", - url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/0f6a5b1e031c97ebf58d3c76eadb2c6bf1e4f780.zip", - version = "0.0.30-1" + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/e455373021812abf4a0b5170caa0d882a9578bab.zip", + version = "0.0.31-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", @@ -1962,7 +2002,7 @@ return }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", @@ -1974,7 +2014,7 @@ return }, { name = "tree-sitter-thrift", url = "tree-sitter-grammars/tree-sitter-thrift", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-tiger", url = "ambroisie/tree-sitter-tiger", @@ -1982,7 +2022,7 @@ return }, { name = "tree-sitter-tlaplus", url = "tlaplus-community/tree-sitter-tlaplus", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-tmux", url = "Freed-Wu/tree-sitter-tmux", @@ -2054,7 +2094,7 @@ return }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-vento", url = "ventojs/tree-sitter-vento", @@ -2066,7 +2106,7 @@ return }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", @@ -2078,7 +2118,7 @@ return }, { name = "tree-sitter-vimdoc", url = "neovim/tree-sitter-vimdoc", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-vrl", url = "belltoy/tree-sitter-vrl", @@ -2110,11 +2150,11 @@ return }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-xresources", url = "ValdezFOmar/tree-sitter-xresources", - version = "0.0.3-1" + version = "0.0.4-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", @@ -2146,7 +2186,7 @@ return }, { name = "treedoc.nvim", url = "neo451/treedoc.nvim", - version = "1.0.0-1" + version = "1.0.1-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", From 60cf258a9ae7fffe04bb31141141a91845158dcc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 10 Nov 2024 07:28:51 +0100 Subject: [PATCH 113/148] fix(docs): always update helptags for local plugins --- lua/lazy/manage/task/plugin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/manage/task/plugin.lua b/lua/lazy/manage/task/plugin.lua index 69a93a5..c8a2bdb 100644 --- a/lua/lazy/manage/task/plugin.lua +++ b/lua/lazy/manage/task/plugin.lua @@ -87,7 +87,7 @@ M.build = { M.docs = { skip = function(plugin) - return not plugin._.dirty + return not plugin._.is_local and not plugin._.dirty end, run = function(self) local docs = self.plugin.dir .. "/doc" From 7967abe55752aa90532e6bb4bd4663fe27a264cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:07:59 +0100 Subject: [PATCH 114/148] chore(main): release 11.14.2 (#1730) :robot: I have created a release *beep* *boop* --- ## [11.14.2](https://github.com/folke/lazy.nvim/compare/v11.14.1...v11.14.2) (2024-11-10) ### Bug Fixes * **bootstrap:** single forward slash. Fixes [#1747](https://github.com/folke/lazy.nvim/issues/1747) ([aca30f6](https://github.com/folke/lazy.nvim/commit/aca30f63619a7492ecdea8833a065cf83c80f764)) * **completion:** check if command string is a prefix of Lazy ([#1760](https://github.com/folke/lazy.nvim/issues/1760)) ([e9fd76e](https://github.com/folke/lazy.nvim/commit/e9fd76e239cc18da289f9a3f80f35fa16b003175)), closes [#1758](https://github.com/folke/lazy.nvim/issues/1758) * **docs:** always update helptags for local plugins ([60cf258](https://github.com/folke/lazy.nvim/commit/60cf258a9ae7fffe04bb31141141a91845158dcc)) * **luarocks:** try to install from root manifest ([#1687](https://github.com/folke/lazy.nvim/issues/1687)) ([591ef40](https://github.com/folke/lazy.nvim/commit/591ef40f2da3a26fbcc0466988cd6fe45ca68cae)) * **rocks:** add lib64 plugin directory to package.cpath ([#1717](https://github.com/folke/lazy.nvim/issues/1717)) ([80da254](https://github.com/folke/lazy.nvim/commit/80da254e645f579c28394ee0f08f75a9c9481744)) * **rockspec:** allow binary lua files. Fixes [#1800](https://github.com/folke/lazy.nvim/issues/1800) ([408449a](https://github.com/folke/lazy.nvim/commit/408449a59adb8c2a31c32fff606676b32ce4552a)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index fe56f44..87f2b31 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.14.1" + ".": "11.14.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 83a3375..f76a332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [11.14.2](https://github.com/folke/lazy.nvim/compare/v11.14.1...v11.14.2) (2024-11-10) + + +### Bug Fixes + +* **bootstrap:** single forward slash. Fixes [#1747](https://github.com/folke/lazy.nvim/issues/1747) ([aca30f6](https://github.com/folke/lazy.nvim/commit/aca30f63619a7492ecdea8833a065cf83c80f764)) +* **completion:** check if command string is a prefix of Lazy ([#1760](https://github.com/folke/lazy.nvim/issues/1760)) ([e9fd76e](https://github.com/folke/lazy.nvim/commit/e9fd76e239cc18da289f9a3f80f35fa16b003175)), closes [#1758](https://github.com/folke/lazy.nvim/issues/1758) +* **docs:** always update helptags for local plugins ([60cf258](https://github.com/folke/lazy.nvim/commit/60cf258a9ae7fffe04bb31141141a91845158dcc)) +* **luarocks:** try to install from root manifest ([#1687](https://github.com/folke/lazy.nvim/issues/1687)) ([591ef40](https://github.com/folke/lazy.nvim/commit/591ef40f2da3a26fbcc0466988cd6fe45ca68cae)) +* **rocks:** add lib64 plugin directory to package.cpath ([#1717](https://github.com/folke/lazy.nvim/issues/1717)) ([80da254](https://github.com/folke/lazy.nvim/commit/80da254e645f579c28394ee0f08f75a9c9481744)) +* **rockspec:** allow binary lua files. Fixes [#1800](https://github.com/folke/lazy.nvim/issues/1800) ([408449a](https://github.com/folke/lazy.nvim/commit/408449a59adb8c2a31c32fff606676b32ce4552a)) + ## [11.14.1](https://github.com/folke/lazy.nvim/compare/v11.14.0...v11.14.1) (2024-07-25) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 5bb1d91..8f56d52 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -241,7 +241,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.14.1" -- x-release-please-version +M.version = "11.14.2" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From e41dffcbafd7123c9c0ffb0bb1624b8e3d08c884 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 20 Nov 2024 09:08:44 +0100 Subject: [PATCH 115/148] docs: fix hl_group docgen --- lua/lazy/docs.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazy/docs.lua b/lua/lazy/docs.lua index 36880a1..7791b62 100644 --- a/lua/lazy/docs.lua +++ b/lua/lazy/docs.lua @@ -131,6 +131,7 @@ function M.colors(opts) { "---", "---", "---" }, } Util.foreach(require(opts.modname).colors, function(group, link) + link = type(link) == "table" and vim.inspect(link) or link lines[#lines + 1] = { "**" .. opts.name .. group .. "**", "***" .. link .. "***", comments[group] or "" } end) return { content = M.table(lines) } From 25749704e442b5c8e2db49a6fe11260760c73d5f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 20 Nov 2024 09:11:45 +0100 Subject: [PATCH 116/148] docs: docgen --- lua/lazy/docs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/docs.lua b/lua/lazy/docs.lua index 7791b62..b3b4d09 100644 --- a/lua/lazy/docs.lua +++ b/lua/lazy/docs.lua @@ -131,7 +131,7 @@ function M.colors(opts) { "---", "---", "---" }, } Util.foreach(require(opts.modname).colors, function(group, link) - link = type(link) == "table" and vim.inspect(link) or link + link = type(link) == "table" and vim.inspect(link):gsub("%s+", " ") or link lines[#lines + 1] = { "**" .. opts.name .. group .. "**", "***" .. link .. "***", comments[group] or "" } end) return { content = M.table(lines) } From 8e11d208d63de693127761cd9a5621117bf6c625 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 08:13:59 +0000 Subject: [PATCH 117/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 61 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index c2c9695..7722a40 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -646,24 +646,42 @@ will be added to the plugin’s spec. -- then set the below to false. This should work, but is NOT supported and will -- increase downloads a lot. filter = true, + -- rate of network related git operations (clone, fetch, checkout) + throttle = { + enabled = false, -- not enabled by default + -- max 2 ops every 5 seconds + rate = 2, + duration = 5 * 1000, -- in ms + }, + -- Time in seconds to wait before running fetch again for a plugin. + -- Repeated update/check operations will not run again until this + -- cooldown period has passed. + cooldown = 0, }, pkg = { enabled = true, cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", - versions = true, -- Honor versions in pkg sources -- the first package source that is found for a plugin will be used. sources = { "lazy", - "rockspec", + "rockspec", -- will only be used when rocks.enabled is true "packspec", }, }, rocks = { + enabled = true, root = vim.fn.stdpath("data") .. "/lazy-rocks", server = "https://nvim-neorocks.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 + -- set to `false` to always use luarocks + hererocks = nil, }, dev = { - ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + -- Directory where you store your local plugin projects. If a function is used, + -- the plugin directory (e.g. `~/projects/plugin-name`) must be returned. + ---@type string | fun(plugin: LazyPlugin): string path = "~/projects", ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub patterns = {}, -- For example {"folke"} @@ -715,7 +733,7 @@ will be added to the plugin’s spec. -- leave nil, to automatically select a browser depending on your OS. -- If you want to use a specific browser, you can define it here browser = nil, ---@type string? - throttle = 20, -- how frequently should the ui process render events + throttle = 1000 / 30, -- how frequently should the ui process render events custom_keys = { -- You can define custom key maps here. If present, the description will -- be shown in the help menu. @@ -730,6 +748,16 @@ will be added to the plugin’s spec. desc = "Open lazygit log", }, + ["i"] = { + function(plugin) + Util.notify(vim.inspect(plugin), { + title = "Inspect " .. plugin.name, + lang = "lua", + }) + end, + desc = "Inspect Plugin", + }, + ["t"] = { function(plugin) require("lazy.util").float_term(nil, { @@ -740,6 +768,17 @@ will be added to the plugin’s spec. }, }, }, + -- Output options for headless mode + headless = { + -- show the output from process commands like git + process = true, + -- show log messages + log = true, + -- show task start/end + task = true, + -- use ansi colors + colors = true, + }, diff = { -- diff command can be one of: -- * browser: opens the github compare view. Note that this is always mapped to as well, @@ -791,7 +830,7 @@ will be added to the plugin’s spec. enabled = true, root = vim.fn.stdpath("state") .. "/lazy/readme", files = { "README.md", "lua/**/README.md" }, - -- only generate markdown helptags for plugins that dont have docs + -- only generate markdown helptags for plugins that don't have docs skip_if_doc_exists = true, }, state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things @@ -837,6 +876,8 @@ If you don’t want to use a Nerd Font, you can replace the icons with Unicode s ----------------------------------------------------------------------- Highlight Group Default Group Description ----------------------- ----------------------- ----------------------- + LazyBold { bold = true } + LazyButton CursorLine LazyButtonActive Visual @@ -857,10 +898,16 @@ If you don’t want to use a Nerd Font, you can replace the icons with Unicode s LazyDir @markup.link directory + LazyError DiagnosticError task errors + LazyH1 IncSearch home button LazyH2 Bold titles + LazyInfo DiagnosticInfo task errors + + LazyItalic { italic = true } + LazyLocal Constant LazyNoCond DiagnosticWarn unloaded icon for a @@ -897,13 +944,13 @@ If you don’t want to use a Nerd Font, you can replace the icons with Unicode s LazySpecial @punctuation.special - LazyTaskError ErrorMsg task errors - LazyTaskOutput MsgArea task output LazyUrl @markup.link url LazyValue @string value of a property + + LazyWarning DiagnosticWarn task errors ----------------------------------------------------------------------- ============================================================================== From 7d0fe7615a600e72c920dd0099181ae64c96ddb0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 20 Nov 2024 09:24:25 +0100 Subject: [PATCH 118/148] ci: docgen fixes --- lua/lazy/docs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/docs.lua b/lua/lazy/docs.lua index b3b4d09..afee2d4 100644 --- a/lua/lazy/docs.lua +++ b/lua/lazy/docs.lua @@ -131,8 +131,8 @@ function M.colors(opts) { "---", "---", "---" }, } Util.foreach(require(opts.modname).colors, function(group, link) - link = type(link) == "table" and vim.inspect(link):gsub("%s+", " ") or link - lines[#lines + 1] = { "**" .. opts.name .. group .. "**", "***" .. link .. "***", comments[group] or "" } + link = type(link) == "table" and "`" .. vim.inspect(link):gsub("%s+", " ") .. "`" or "***" .. link .. "***" + lines[#lines + 1] = { "**" .. opts.name .. group .. "**", link, comments[group] or "" } end) return { content = M.table(lines) } end From 56ead98e05bb37a4ec28930a54d836d033cf00f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 08:28:09 +0000 Subject: [PATCH 119/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 256 +++++++++++++++++------------- 1 file changed, 148 insertions(+), 108 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 908d5d7..5c2bed1 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -10,11 +10,15 @@ return }, { name = "adopure.nvim", url = "Willem-J-an/adopure.nvim", - version = "1.1.2-1" + version = "1.2.0-1" }, { name = "aerial.nvim", url = "stevearc/aerial.nvim", version = "2.3.1-1" + }, { + name = "age.nvim", + url = "KingMichaelPark/age.nvim", + version = "0.1.0-1" }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", @@ -30,7 +34,7 @@ return }, { name = "autosave.nvim", url = "brianhuster/autosave.nvim", - version = "0.1.1-1" + version = "0.4.1-1" }, { name = "banana.nvim", url = "CWood-sdf/banana.nvim", @@ -106,7 +110,11 @@ return }, { name = "conform.nvim", url = "stevearc/conform.nvim", - version = "8.1.0-1" + version = "8.2.0-1" + }, { + name = "cursor-text-objects.nvim", + url = "ColinKennedy/cursor-text-objects.nvim", + version = "1.1.0-1" }, { name = "cybu.nvim", url = "ghillb/cybu.nvim", @@ -154,15 +162,15 @@ return }, { name = "doris.nvim", url = "jackokring/doris.nvim", - version = "0.0.0-1" + version = "0.2.0-1" }, { name = "dressing.nvim", url = "stevearc/dressing.nvim", - version = "3.0.0-1" + version = "3.1.0-1" }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "9.0.0-1" + version = "9.0.1-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -178,19 +186,23 @@ return }, { name = "efmls-configs-nvim", url = "creativenull/efmls-configs-nvim", - version = "1.7.0-1" + version = "1.8.0-1" }, { name = "elixir-tools.nvim", url = "elixir-tools/elixir-tools.nvim", version = "0.16.1-1" + }, { + name = "fake.nvim", + url = "Kibadda/fake.nvim", + version = "1.0.0-1" }, { name = "feed.nvim", url = "neo451/feed.nvim", - version = "1.6.3-1" + version = "1.9.1-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", - version = "1.6.3-1" + version = "1.7.0-1" }, { name = "fidget.nvim", url = "j-hui/fidget.nvim", @@ -302,7 +314,7 @@ return }, { name = "heirline.nvim", url = "rebelot/heirline.nvim", - version = "1.0.6-1" + version = "1.0.7-1" }, { name = "helpview.nvim", url = "OXY2DEV/helpview.nvim", @@ -322,7 +334,7 @@ return }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", - version = "1.8.0-1" + version = "2.0.0-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -338,7 +350,7 @@ return }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.8.3-1" + version = "3.8.5-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -354,7 +366,7 @@ return }, { name = "lazy.nvim", url = "folke/lazy.nvim", - version = "11.14.1-1" + version = "11.14.2-1" }, { name = "lazydev.nvim", url = "folke/lazydev.nvim", @@ -378,7 +390,7 @@ return }, { name = "live-preview.nvim", url = "brianhuster/live-preview.nvim", - version = "0.8.1-1" + version = "0.8.3-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -403,6 +415,10 @@ return name = "ltreesitter", url = "euclidianAce/ltreesitter", version = "0.0.7-1" + }, { + name = "lua-console.nvim", + url = "YaroSpace/lua-console.nvim", + version = "1.1.0-1" }, { name = "lua-obfuscator.nvim", url = "git+ssh://git@github.com/kdssoftware/lua-obfuscator.nvim.git", @@ -434,7 +450,7 @@ return }, { name = "magazine.nvim", url = "iguanacucumber/magazine.nvim", - version = "0.2.1-1" + version = "0.4.1-1" }, { name = "mapx.nvim", url = "b0o/mapx.nvim", @@ -538,7 +554,7 @@ return }, { name = "neotest-busted", url = "MisanthropicBit/neotest-busted", - version = "0.2.1-1" + version = "0.3.0-1" }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", @@ -550,11 +566,11 @@ return }, { name = "neotest-java", url = "rcasia/neotest-java", - version = "0.17.5-1" + version = "0.17.6-1" }, { name = "neotest-zig", url = "lawrence-laz/neotest-zig", - version = "1.3.0-1" + version = "1.3.1-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -570,7 +586,7 @@ return }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.6.0-1" + version = "4.7.2-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -586,11 +602,11 @@ return }, { name = "nvim-a2-pack", url = "dfgordon/nvim-a2-pack", - version = "0.2.0-1" + version = "0.3.0-1" }, { name = "nvim-best-practices-plugin-template", url = "ColinKennedy/nvim-best-practices-plugin-template", - version = "1.3.1-1" + version = "1.3.2-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -726,11 +742,11 @@ return }, { name = "oil.nvim", url = "stevearc/oil.nvim", - version = "2.12.2-1" + version = "2.13.0-1" }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "2.0.1-1" + version = "2.3.0-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -742,7 +758,7 @@ return }, { name = "overseer.nvim", url = "stevearc/overseer.nvim", - version = "1.4.0-1" + version = "1.5.0-1" }, { name = "oz.nvim", url = "luxluth/oz.nvim", @@ -794,7 +810,7 @@ return }, { name = "quicker.nvim", url = "stevearc/quicker.nvim", - version = "1.1.1-1" + version = "1.2.0-1" }, { name = "rainbow-delimiters.nvim", url = "HiPhish/rainbow-delimiters.nvim", @@ -810,11 +826,11 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.4.0-1" + version = "7.5.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.8.3-1" + version = "3.8.4-1" }, { name = "rime.nvim", url = "Freed-Wu/rime.nvim", @@ -838,11 +854,11 @@ return }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", - version = "1.1.3-1" + version = "1.2.0-1" }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.41.1-1" + version = "2.42.2-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -854,7 +870,7 @@ return }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.13.1-1" + version = "5.15.0-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -874,7 +890,7 @@ return }, { name = "sf.nvim", url = "xixiaofinland/sf.nvim", - version = "1.8.0-1" + version = "1.9.0-1" }, { name = "sg.nvim", url = "sourcegraph/sg.nvim", @@ -884,9 +900,9 @@ return url = "mrjones2014/smart-splits.nvim", version = "1.6.0-1" }, { - name = "snippets.nvim", - url = "Kibadda/snippets.nvim", - version = "1.0.0-1" + name = "snacks.nvim", + url = "folke/snacks.nvim", + version = "2.4.0-1" }, { name = "sos.nvim", url = "tmillr/sos.nvim", @@ -927,6 +943,10 @@ return name = "tangerine.nvim", url = "udayvir-singh/tangerine.nvim", version = "2.9-1" + }, { + name = "teacup.neovim", + url = "Clivern/teacup.neovim", + version = "0.0.1-1" }, { name = "telescope-zf-native.nvim", url = "natecraddock/telescope-zf-native.nvim", @@ -942,11 +962,11 @@ return }, { name = "toggleterm.nvim", url = "akinsho/toggleterm.nvim", - version = "2.12.0-1" + version = "2.13.0-1" }, { name = "tokyonight.nvim", url = "folke/tokyonight.nvim", - version = "4.9.0-1" + version = "4.10.0-1" }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", @@ -954,7 +974,7 @@ return }, { name = "tree-sitter-agda", url = "tree-sitter/tree-sitter-agda", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-angular", url = "dlvandenberg/tree-sitter-angular", @@ -986,7 +1006,7 @@ return }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.32-1" + version = "0.0.35-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", @@ -1018,11 +1038,11 @@ return }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", @@ -1066,11 +1086,11 @@ return }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.32-1" + version = "0.0.35-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", @@ -1094,19 +1114,19 @@ return }, { name = "tree-sitter-dart", url = "UserNobody14/tree-sitter-dart", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-desktop", url = "ValdezFOmar/tree-sitter-desktop", - version = "0.0.4-1" + version = "0.0.6-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-dhall", url = "jbellerb/tree-sitter-dhall", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-diff", url = "the-mikedavis/tree-sitter-diff", @@ -1134,11 +1154,11 @@ return }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", @@ -1150,7 +1170,7 @@ return }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.37-1" + version = "0.0.41-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", @@ -1178,7 +1198,7 @@ return }, { name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", @@ -1210,7 +1230,7 @@ return }, { name = "tree-sitter-foam", url = "FoamScience/tree-sitter-foam", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-forth", url = "AlexanderBrevig/tree-sitter-forth", @@ -1246,7 +1266,7 @@ return }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", @@ -1262,7 +1282,7 @@ return }, { name = "tree-sitter-gitattributes", url = "tree-sitter-grammars/tree-sitter-gitattributes", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-gitcommit", url = "gbprod/tree-sitter-gitcommit", @@ -1302,7 +1322,7 @@ return }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.31-1" + version = "0.0.34-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", @@ -1338,7 +1358,7 @@ return }, { name = "tree-sitter-gren", url = "MaeBrooks/tree-sitter-gren", - version = "0.0.2-1" + version = "0.0.3-1" }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", @@ -1358,7 +1378,7 @@ return }, { name = "tree-sitter-haskell", url = "tree-sitter/tree-sitter-haskell", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-haskell_persistent", url = "MercuryTechnologies/tree-sitter-haskell-persistent", @@ -1398,7 +1418,7 @@ return }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", @@ -1422,7 +1442,7 @@ return }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-ini", url = "justinmk/tree-sitter-ini", @@ -1430,7 +1450,7 @@ return }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", @@ -1442,11 +1462,11 @@ return }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", @@ -1454,11 +1474,11 @@ return }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", @@ -1478,11 +1498,11 @@ return }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.30-1" + version = "0.0.34-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", @@ -1510,7 +1530,7 @@ return }, { name = "tree-sitter-latex", url = "latex-lsp/tree-sitter-latex", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-ledger", url = "cbarrete/tree-sitter-ledger", @@ -1586,7 +1606,7 @@ return }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.35-1" + version = "0.0.38-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", @@ -1618,7 +1638,7 @@ return }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.45-1" + version = "0.0.50-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1631,6 +1651,10 @@ return name = "tree-sitter-nqc", url = "tree-sitter-grammars/tree-sitter-nqc", version = "0.0.30-1" + }, { + name = "tree-sitter-nu", + url = "nushell/tree-sitter-nu", + version = "0.0.12-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", @@ -1642,11 +1666,11 @@ return }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", @@ -1678,15 +1702,15 @@ return }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", @@ -1718,7 +1742,7 @@ return }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", @@ -1738,7 +1762,7 @@ return }, { name = "tree-sitter-properties", url = "tree-sitter-grammars/tree-sitter-properties", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-proto", url = "treywood/tree-sitter-proto", @@ -1754,7 +1778,7 @@ return }, { name = "tree-sitter-pug", url = "zealot128/tree-sitter-pug", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-puppet", url = "tree-sitter-grammars/tree-sitter-puppet", @@ -1770,11 +1794,11 @@ return }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-qmldir", url = "tree-sitter-grammars/tree-sitter-qmldir", @@ -1786,11 +1810,11 @@ return }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-racket", url = "6cdh/tree-sitter-racket", @@ -1818,7 +1842,7 @@ return }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.33-1" + version = "0.0.37-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", @@ -1858,15 +1882,19 @@ return }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.32-1" + version = "0.0.33-1" + }, { + name = "tree-sitter-runescript", + url = "2004Scape/tree-sitter-runescript", + version = "0.0.1-1" }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.36-1" + version = "0.0.37-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", @@ -1926,7 +1954,7 @@ return }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", @@ -1934,7 +1962,7 @@ return }, { name = "tree-sitter-ssh_config", url = "tree-sitter-grammars/tree-sitter-ssh-config", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-starlark", url = "tree-sitter-grammars/tree-sitter-starlark", @@ -1954,7 +1982,7 @@ return }, { name = "tree-sitter-superhtml", url = "kristoff-it/superhtml", - version = "0.0.9-1" + version = "0.0.10-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", @@ -1963,10 +1991,14 @@ return name = "tree-sitter-svelte", url = "tree-sitter-grammars/tree-sitter-svelte", version = "0.0.32-1" + }, { + name = "tree-sitter-sway", + url = "FuelLabs/tree-sitter-sway", + version = "0.0.3-1" }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.36-1" + version = "0.0.38-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", @@ -1981,8 +2013,8 @@ return version = "0.0.29-1" }, { name = "tree-sitter-t32", - url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/e455373021812abf4a0b5170caa0d882a9578bab.zip", - version = "0.0.31-1" + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/476f0d8ab4b012d3b6f9598890217ada70f1a8ba.zip", + version = "0.0.34-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", @@ -1994,15 +2026,15 @@ return }, { name = "tree-sitter-tcl", url = "tree-sitter-grammars/tree-sitter-tcl", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.34-1" + version = "0.0.37-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", @@ -2042,7 +2074,7 @@ return }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", @@ -2054,7 +2086,7 @@ return }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", @@ -2066,11 +2098,11 @@ return }, { name = "tree-sitter-typst", url = "uben0/tree-sitter-typst", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-udev", url = "tree-sitter-grammars/tree-sitter-udev", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-ungrammar", url = "tree-sitter-grammars/tree-sitter-ungrammar", @@ -2078,7 +2110,7 @@ return }, { name = "tree-sitter-unison", url = "kylegoetz/tree-sitter-unison", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-usd", url = "ColinKennedy/tree-sitter-usd", @@ -2090,7 +2122,7 @@ return }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", @@ -2106,7 +2138,7 @@ return }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", @@ -2130,7 +2162,7 @@ return }, { name = "tree-sitter-wgsl", url = "szebniok/tree-sitter-wgsl", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-wgsl_bevy", url = "tree-sitter-grammars/tree-sitter-wgsl-bevy", @@ -2150,11 +2182,11 @@ return }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-xresources", url = "ValdezFOmar/tree-sitter-xresources", - version = "0.0.4-1" + version = "0.0.10-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", @@ -2174,19 +2206,19 @@ return }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-ziggy", url = "kristoff-it/ziggy", - version = "0.0.6-1" + version = "0.0.7-1" }, { name = "tree-sitter-ziggy_schema", url = "kristoff-it/ziggy", - version = "0.0.6-1" + version = "0.0.7-1" }, { name = "treedoc.nvim", url = "neo451/treedoc.nvim", - version = "1.0.1-1" + version = "1.0.3-1" }, { name = "trouble.nvim", url = "folke/trouble.nvim", @@ -2203,6 +2235,10 @@ return name = "twilight.nvim", url = "folke/twilight.nvim", version = "1.0.0-1" + }, { + name = "u.nvim", + url = "jrop/u.nvim", + version = "0.2.0-1" }, { name = "unimpaired.nvim", url = "tummetott/unimpaired.nvim", @@ -2219,6 +2255,10 @@ return name = "windline.nvim", url = "windwp/windline.nvim", version = "1.1.0-1" + }, { + name = "wormhole.nvim", + url = "NStefan002/wormhole.nvim", + version = "1.1.1-1" }, { name = "wrapping-paper.nvim", url = "benlubas/wrapping-paper.nvim", @@ -2230,7 +2270,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.4.3-1" + version = "6.6.0-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", From 9570a5ae7b17dcde4718c7458fd986c10f015a99 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 5 Dec 2024 09:06:28 +0100 Subject: [PATCH 120/148] feat(plugin): show error for local plugins that don't exist. Fixes #1773 --- lua/lazy/core/plugin.lua | 1 + lua/lazy/manage/init.lua | 3 +++ lua/lazy/manage/task/plugin.lua | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 97347a7..a282132 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -243,6 +243,7 @@ function M.update_state() else plugin._.is_local = true plugin._.installed = true -- local plugins are managed by the user + plugin._.installed = vim.fn.isdirectory(plugin.dir) == 1 end end diff --git a/lua/lazy/manage/init.lua b/lua/lazy/manage/init.lua index ac9ba14..e28d9dd 100644 --- a/lua/lazy/manage/init.lua +++ b/lua/lazy/manage/init.lua @@ -80,6 +80,7 @@ function M.install(opts) opts = M.opts(opts, { mode = "install" }) return M.run({ pipeline = { + "plugin.exists", "git.clone", { "git.checkout", lockfile = opts.lockfile }, "plugin.docs", @@ -108,6 +109,7 @@ function M.update(opts) opts = M.opts(opts, { mode = "update" }) return M.run({ pipeline = { + "plugin.exists", "git.origin", "git.branch", "git.fetch", @@ -147,6 +149,7 @@ function M.check(opts) opts = opts or {} return M.run({ pipeline = { + "plugin.exists", { "git.origin", check = true }, "git.fetch", "git.status", diff --git a/lua/lazy/manage/task/plugin.lua b/lua/lazy/manage/task/plugin.lua index c8a2bdb..841cc6c 100644 --- a/lua/lazy/manage/task/plugin.lua +++ b/lua/lazy/manage/task/plugin.lua @@ -97,4 +97,15 @@ M.docs = { end, } +M.exists = { + skip = function(plugin) + return not plugin._.is_local + end, + run = function(self) + if not Util.file_exists(self.plugin.dir) then + self:error("Local plugin does not exist at `" .. self.plugin.dir .. "`") + end + end, +} + return M From a44e9cd165e11fa61ccfbea2a3cc1aaa3bcfc4f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:10:16 +0100 Subject: [PATCH 121/148] chore(main): release 11.15.0 (#1835) :robot: I have created a release *beep* *boop* --- ## [11.15.0](https://github.com/folke/lazy.nvim/compare/v11.14.2...v11.15.0) (2024-12-05) ### Features * **plugin:** show error for local plugins that don't exist. Fixes [#1773](https://github.com/folke/lazy.nvim/issues/1773) ([9570a5a](https://github.com/folke/lazy.nvim/commit/9570a5ae7b17dcde4718c7458fd986c10f015a99)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 87f2b31..23b0e13 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.14.2" + ".": "11.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f76a332..6ec2c9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.15.0](https://github.com/folke/lazy.nvim/compare/v11.14.2...v11.15.0) (2024-12-05) + + +### Features + +* **plugin:** show error for local plugins that don't exist. Fixes [#1773](https://github.com/folke/lazy.nvim/issues/1773) ([9570a5a](https://github.com/folke/lazy.nvim/commit/9570a5ae7b17dcde4718c7458fd986c10f015a99)) + ## [11.14.2](https://github.com/folke/lazy.nvim/compare/v11.14.1...v11.14.2) (2024-11-10) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 8f56d52..3b32f5c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -241,7 +241,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.14.2" -- x-release-please-version +M.version = "11.15.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 3388a26417c48b15d5266d954f62a4d47fe99490 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Dec 2024 08:11:36 +0000 Subject: [PATCH 122/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 184 ++++++++++++++++-------------- 1 file changed, 100 insertions(+), 84 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 5c2bed1..6cfdb3f 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -34,7 +34,7 @@ return }, { name = "autosave.nvim", url = "brianhuster/autosave.nvim", - version = "0.4.1-1" + version = "0.4.2-1" }, { name = "banana.nvim", url = "CWood-sdf/banana.nvim", @@ -54,7 +54,7 @@ return }, { name = "bufferline.nvim", url = "akinsho/bufferline.nvim", - version = "4.8.0-1" + version = "4.9.0-1" }, { name = "care.nvim", url = "max397574/care.nvim", @@ -106,7 +106,7 @@ return }, { name = "commons.nvim", url = "linrongbin16/commons.nvim", - version = "19.0.0-1" + version = "21.1.0-1" }, { name = "conform.nvim", url = "stevearc/conform.nvim", @@ -114,7 +114,7 @@ return }, { name = "cursor-text-objects.nvim", url = "ColinKennedy/cursor-text-objects.nvim", - version = "1.1.0-1" + version = "1.3.0-1" }, { name = "cybu.nvim", url = "ghillb/cybu.nvim", @@ -162,7 +162,7 @@ return }, { name = "doris.nvim", url = "jackokring/doris.nvim", - version = "0.2.0-1" + version = "0.3.2-1" }, { name = "dressing.nvim", url = "stevearc/dressing.nvim", @@ -170,7 +170,7 @@ return }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "9.0.1-1" + version = "9.0.2-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -198,7 +198,7 @@ return }, { name = "feed.nvim", url = "neo451/feed.nvim", - version = "1.9.1-1" + version = "1.12.0-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", @@ -242,7 +242,7 @@ return }, { name = "fzfx.nvim", url = "linrongbin16/fzfx.nvim", - version = "6.4.0-1" + version = "7.0.0-1" }, { name = "galileo.nvim", url = "S1M0N38/galileo.nvim", @@ -266,7 +266,7 @@ return }, { name = "gitlinker.nvim", url = "linrongbin16/gitlinker.nvim", - version = "4.13.2-1" + version = "5.0.0-1" }, { name = "gitsigns.nvim", url = "lewis6991/gitsigns.nvim", @@ -294,7 +294,7 @@ return }, { name = "guard.nvim", url = "nvimdev/guard.nvim", - version = "1.0.3-1" + version = "1.0.4-1" }, { name = "hardhat.nvim", url = "TheSnakeWitcher/hardhat.nvim", @@ -306,7 +306,7 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "4.3.1-1" + version = "4.3.2-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", @@ -350,7 +350,7 @@ return }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.8.5-1" + version = "3.8.6-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -370,7 +370,7 @@ return }, { name = "lazydev.nvim", url = "folke/lazydev.nvim", - version = "1.8.0-1" + version = "1.9.0-1" }, { name = "lean.nvim", url = "Julian/lean.nvim", @@ -415,6 +415,10 @@ return name = "ltreesitter", url = "euclidianAce/ltreesitter", version = "0.0.7-1" + }, { + name = "ltreesitter-ts", + url = "FourierTransformer/ltreesitter-ts", + version = "0.0.1-1" }, { name = "lua-console.nvim", url = "YaroSpace/lua-console.nvim", @@ -431,6 +435,10 @@ return name = "lua-utils.nvim", url = "nvim-neorg/lua-utils.nvim", version = "1.0.2-1" + }, { + name = "luarocks-build-tree-sitter-cli", + url = "FourierTransformer/luarocks-build-tree-sitter-cli", + version = "0.0.2-1" }, { name = "luarocks-build-treesitter-parser", url = "nvim-neorocks/luarocks-build-treesitter-parser", @@ -530,7 +538,7 @@ return }, { name = "neorg-interim-ls", url = "benlubas/neorg-interim-ls", - version = "1.2.1-1" + version = "1.3.0-1" }, { name = "neorg-se", url = "benlubas/neorg-se", @@ -582,7 +590,7 @@ return }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "2.0.6-1" + version = "2.1.3-1" }, { name = "noice.nvim", url = "folke/noice.nvim", @@ -606,7 +614,7 @@ return }, { name = "nvim-best-practices-plugin-template", url = "ColinKennedy/nvim-best-practices-plugin-template", - version = "1.3.2-1" + version = "1.4.0-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -826,7 +834,7 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.5.0-1" + version = "7.6.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", @@ -838,7 +846,7 @@ return }, { name = "rocks-config.nvim", url = "nvim-neorocks/rocks-config.nvim", - version = "3.0.0-1" + version = "3.1.0-1" }, { name = "rocks-dev.nvim", url = "nvim-neorocks/rocks-dev.nvim", @@ -870,7 +878,7 @@ return }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.15.0-1" + version = "5.17.1-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -898,11 +906,11 @@ return }, { name = "smart-splits.nvim", url = "mrjones2014/smart-splits.nvim", - version = "1.6.0-1" + version = "1.7.0-1" }, { name = "snacks.nvim", url = "folke/snacks.nvim", - version = "2.4.0-1" + version = "2.6.0-1" }, { name = "sos.nvim", url = "tmillr/sos.nvim", @@ -982,11 +990,11 @@ return }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.36-1" + version = "0.0.39-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-asm", url = "RubixDev/tree-sitter-asm", @@ -994,7 +1002,7 @@ return }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-authzed", url = "mleonidas/tree-sitter-authzed", @@ -1006,7 +1014,7 @@ return }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", @@ -1042,7 +1050,7 @@ return }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", @@ -1054,7 +1062,11 @@ return }, { name = "tree-sitter-chatito", url = "tree-sitter-grammars/tree-sitter-chatito", - version = "0.0.29-1" + version = "0.0.30-1" + }, { + name = "tree-sitter-cli", + url = "FourierTransformer/tree-sitter-cli", + version = "0.24.4-1" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", @@ -1154,7 +1166,7 @@ return }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", @@ -1170,7 +1182,7 @@ return }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.41-1" + version = "0.0.44-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", @@ -1182,7 +1194,7 @@ return }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", @@ -1238,7 +1250,7 @@ return }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", @@ -1294,7 +1306,7 @@ return }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-glimmer", url = "ember-tooling/tree-sitter-glimmer", @@ -1322,7 +1334,7 @@ return }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", @@ -1334,7 +1346,7 @@ return }, { name = "tree-sitter-gomod", url = "camdencheek/tree-sitter-go-mod", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-gosum", url = "tree-sitter-grammars/tree-sitter-go-sum", @@ -1350,7 +1362,7 @@ return }, { name = "tree-sitter-gpg", url = "tree-sitter-grammars/tree-sitter-gpg-config", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-graphql", url = "bkegley/tree-sitter-graphql", @@ -1414,7 +1426,7 @@ return }, { name = "tree-sitter-hoon", url = "urbit-pilled/tree-sitter-hoon", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", @@ -1430,7 +1442,7 @@ return }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", @@ -1450,7 +1462,7 @@ return }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.32-1" + version = "0.0.36-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", @@ -1462,7 +1474,7 @@ return }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", @@ -1474,7 +1486,7 @@ return }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", @@ -1498,11 +1510,11 @@ return }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", @@ -1534,7 +1546,7 @@ return }, { name = "tree-sitter-ledger", url = "cbarrete/tree-sitter-ledger", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-leo", url = "r001/tree-sitter-leo", @@ -1582,11 +1594,11 @@ return }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", @@ -1606,7 +1618,7 @@ return }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.38-1" + version = "0.0.40-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", @@ -1614,7 +1626,7 @@ return }, { name = "tree-sitter-nasm", url = "naclsn/tree-sitter-nasm", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-nginx", url = "opa-oz/tree-sitter-nginx", @@ -1638,7 +1650,7 @@ return }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.50-1" + version = "0.0.51-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1654,7 +1666,7 @@ return }, { name = "tree-sitter-nu", url = "nushell/tree-sitter-nu", - version = "0.0.12-1" + version = "0.0.20-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", @@ -1698,19 +1710,19 @@ return }, { name = "tree-sitter-pem", url = "tree-sitter-grammars/tree-sitter-pem", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.36-1" + version = "0.0.37-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", @@ -1730,7 +1742,7 @@ return }, { name = "tree-sitter-poe_filter", url = "tree-sitter-grammars/tree-sitter-poe-filter", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-pony", url = "tree-sitter-grammars/tree-sitter-pony", @@ -1738,7 +1750,7 @@ return }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", @@ -1794,7 +1806,7 @@ return }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", @@ -1814,7 +1826,7 @@ return }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-racket", url = "6cdh/tree-sitter-racket", @@ -1862,7 +1874,7 @@ return }, { name = "tree-sitter-robot", url = "Hubro/tree-sitter-robot", - version = "0.0.29-1" + version = "0.0.32-1" }, { name = "tree-sitter-robots", url = "opa-oz/tree-sitter-robots-txt", @@ -1890,11 +1902,11 @@ return }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.35-1" + version = "0.0.37-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.37-1" + version = "0.0.39-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", @@ -1910,7 +1922,7 @@ return }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", @@ -1934,15 +1946,15 @@ return }, { name = "tree-sitter-solidity", url = "JoranHonig/tree-sitter-solidity", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.35-1" + version = "0.0.37-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", @@ -1954,7 +1966,7 @@ return }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.33-1" + version = "0.0.37-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", @@ -1974,7 +1986,7 @@ return }, { name = "tree-sitter-styled", url = "mskelton/tree-sitter-styled", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-supercollider", url = "madskjeldgaard/tree-sitter-supercollider", @@ -1982,7 +1994,7 @@ return }, { name = "tree-sitter-superhtml", url = "kristoff-it/superhtml", - version = "0.0.10-1" + version = "0.0.11-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", @@ -1998,7 +2010,7 @@ return }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.38-1" + version = "0.0.41-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", @@ -2013,8 +2025,8 @@ return version = "0.0.29-1" }, { name = "tree-sitter-t32", - url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/476f0d8ab4b012d3b6f9598890217ada70f1a8ba.zip", - version = "0.0.34-1" + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/7c8579685e34116c61971240780b316c54be698b.zip", + version = "0.0.37-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", @@ -2030,11 +2042,11 @@ return }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.37-1" + version = "0.0.38-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", @@ -2066,7 +2078,7 @@ return }, { name = "tree-sitter-toml", url = "tree-sitter-grammars/tree-sitter-toml", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-tsv", url = "tree-sitter-grammars/tree-sitter-csv", @@ -2090,7 +2102,7 @@ return }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-typoscript", url = "Teddytrombone/tree-sitter-typoscript", @@ -2134,11 +2146,11 @@ return }, { name = "tree-sitter-verilog", url = "gmlarumbe/tree-sitter-systemverilog", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", @@ -2146,7 +2158,7 @@ return }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-vimdoc", url = "neovim/tree-sitter-vimdoc", @@ -2182,15 +2194,15 @@ return }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-xresources", url = "ValdezFOmar/tree-sitter-xresources", - version = "0.0.10-1" + version = "0.0.12-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-yang", url = "Hubro/tree-sitter-yang", @@ -2206,7 +2218,7 @@ return }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-ziggy", url = "kristoff-it/ziggy", @@ -2250,11 +2262,15 @@ return }, { name = "which-key.nvim", url = "folke/which-key.nvim", - version = "3.13.3-1" + version = "3.14.1-1" }, { name = "windline.nvim", url = "windwp/windline.nvim", version = "1.1.0-1" + }, { + name = "winmove.nvim", + url = "MisanthropicBit/winmove.nvim", + version = "0.1.0-1" }, { name = "wormhole.nvim", url = "NStefan002/wormhole.nvim", @@ -2270,7 +2286,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.6.0-1" + version = "6.6.1-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", @@ -2278,5 +2294,5 @@ return }, { name = "zk-nvim", url = "zk-org/zk-nvim", - version = "0.1.0-1" + version = "0.1.1-1" } } \ No newline at end of file From ee64abc76be2b237b95d241a924b0323005b868a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 6 Dec 2024 20:28:50 +0100 Subject: [PATCH 123/148] feat(plugin): added support for virtual plugins. Closes #1836 --- lua/lazy/core/loader.lua | 8 ++++++-- lua/lazy/core/meta.lua | 2 ++ lua/lazy/core/plugin.lua | 6 ++++-- lua/lazy/core/util.lua | 2 +- lua/lazy/types.lua | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index c6a7271..1501efd 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -341,7 +341,9 @@ function M._load(plugin, reason, opts) Util.track({ plugin = plugin.name, start = reason.start }) Handler.disable(plugin) - M.add_to_rtp(plugin) + if not plugin.virtual then + M.add_to_rtp(plugin) + end if plugin._.pkg and plugin._.pkg.source == "rockspec" then M.add_to_luapath(plugin) @@ -353,7 +355,9 @@ function M._load(plugin, reason, opts) end, "Failed to load deps for " .. plugin.name) end - M.packadd(plugin.dir) + if not plugin.virtual then + M.packadd(plugin.dir) + end if plugin.config or plugin.opts then M.config(plugin) end diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 6e781a0..abb2508 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -213,6 +213,8 @@ function M:_rebuild(name) plugin.dir = super.dir if plugin.dir then plugin.dir = Util.norm(plugin.dir) + elseif super.virtual then + plugin.dir = Util.norm("/dev/null/" .. plugin.name) else if plugin.dev == nil and plugin.url then for _, pattern in ipairs(Config.options.dev.patterns) do diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index a282132..37d1a8f 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -237,12 +237,14 @@ function M.update_state() or plugin.cmd plugin.lazy = lazy and true or false end - if plugin.dir:find(Config.options.root, 1, true) == 1 then + 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 plugin._.installed = installed[plugin.name] ~= nil installed[plugin.name] = nil else plugin._.is_local = true - plugin._.installed = true -- local plugins are managed by the user plugin._.installed = vim.fn.isdirectory(plugin.dir) == 1 end end diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index bdd42dd..9db7f14 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -270,7 +270,7 @@ function M.get_unloaded_rtp(modname, opts) local Config = require("lazy.core.config") if Config.spec then for _, plugin in pairs(Config.spec.plugins) do - if not (plugin._.loaded or plugin.module == false) then + if not (plugin._.loaded or plugin.module == false or plugin.virtual) then if norm == M.normname(plugin.name) then table.insert(rtp, 1, plugin.dir) else diff --git a/lua/lazy/types.lua b/lua/lazy/types.lua index 5921169..0dbba9a 100644 --- a/lua/lazy/types.lua +++ b/lua/lazy/types.lua @@ -60,6 +60,7 @@ ---@field priority? number Only useful for lazy=false plugins to force loading certain plugins first. Default priority is 50 ---@field dev? boolean If set, then link to the respective folder under your ~/projects ---@field rocks? string[] +---@field virtual? boolean virtual plugins won't be installed or added to the rtp. ---@class LazyPlugin: LazyPluginBase,LazyPluginHandlers,LazyPluginHooks,LazyPluginRef ---@field dependencies? string[] From b08dba8107b5bdaaa007f18cf6c0cc0e0fd576aa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 7 Dec 2024 07:57:03 +0100 Subject: [PATCH 124/148] fix(render): show correct key for home. Fixes #1796 --- lua/lazy/view/render.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index e1eec6c..16c6659 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -144,8 +144,6 @@ function M:title() if mode.name == "home" then if self.view.state.mode == "home" then title = " lazy.nvim " .. Config.options.ui.icons.lazy - else - title = " lazy.nvim (H) " end end From 656cf4309396b7b8b62984e923bf8d8a0013f7d7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 7 Dec 2024 11:52:43 +0100 Subject: [PATCH 125/148] fix(plugin): don't check if dir exists for virtual plugins --- lua/lazy/manage/task/plugin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/manage/task/plugin.lua b/lua/lazy/manage/task/plugin.lua index 841cc6c..cec9762 100644 --- a/lua/lazy/manage/task/plugin.lua +++ b/lua/lazy/manage/task/plugin.lua @@ -99,7 +99,7 @@ M.docs = { M.exists = { skip = function(plugin) - return not plugin._.is_local + return not plugin._.is_local or plugin.virtual end, run = function(self) if not Util.file_exists(self.plugin.dir) then From 014d1d6d78df4e58f962158e6e00261d8632612c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:44:18 +0100 Subject: [PATCH 126/148] chore(main): release 11.16.0 (#1838) :robot: I have created a release *beep* *boop* --- ## [11.16.0](https://github.com/folke/lazy.nvim/compare/v11.15.0...v11.16.0) (2024-12-07) ### Features * **plugin:** added support for virtual plugins. Closes [#1836](https://github.com/folke/lazy.nvim/issues/1836) ([ee64abc](https://github.com/folke/lazy.nvim/commit/ee64abc76be2b237b95d241a924b0323005b868a)) ### Bug Fixes * **plugin:** don't check if dir exists for virtual plugins ([656cf43](https://github.com/folke/lazy.nvim/commit/656cf4309396b7b8b62984e923bf8d8a0013f7d7)) * **render:** show correct key for home. Fixes [#1796](https://github.com/folke/lazy.nvim/issues/1796) ([b08dba8](https://github.com/folke/lazy.nvim/commit/b08dba8107b5bdaaa007f18cf6c0cc0e0fd576aa)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 23b0e13..228572b 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.15.0" + ".": "11.16.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec2c9c..009055b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [11.16.0](https://github.com/folke/lazy.nvim/compare/v11.15.0...v11.16.0) (2024-12-07) + + +### Features + +* **plugin:** added support for virtual plugins. Closes [#1836](https://github.com/folke/lazy.nvim/issues/1836) ([ee64abc](https://github.com/folke/lazy.nvim/commit/ee64abc76be2b237b95d241a924b0323005b868a)) + + +### Bug Fixes + +* **plugin:** don't check if dir exists for virtual plugins ([656cf43](https://github.com/folke/lazy.nvim/commit/656cf4309396b7b8b62984e923bf8d8a0013f7d7)) +* **render:** show correct key for home. Fixes [#1796](https://github.com/folke/lazy.nvim/issues/1796) ([b08dba8](https://github.com/folke/lazy.nvim/commit/b08dba8107b5bdaaa007f18cf6c0cc0e0fd576aa)) + ## [11.15.0](https://github.com/folke/lazy.nvim/compare/v11.14.2...v11.15.0) (2024-12-05) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 3b32f5c..9a49aaa 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -241,7 +241,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.15.0" -- x-release-please-version +M.version = "11.16.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 703be1dda35e142e76e94e7503cf67d6b98a1d35 Mon Sep 17 00:00:00 2001 From: Daemon Date: Mon, 9 Dec 2024 13:40:21 -0800 Subject: [PATCH 127/148] fix(types): ensure all fields for `LazyPluginSpec` are optional (#1843) > After updating lua_ls to [v3.13.3](https://github.com/LuaLS/lua-language-server/releases/tag/3.13.3) noticed my plugin scripts using `@type LazyPluginSpec` now have `missing-fields` warnings. It seems they have changed how `missing-fields` diagnostics work with inherited types: https://github.com/LuaLS/lua-language-server/commit/7b2d58537fea87d1fefec894ac17b3bd73681e63. Duplicate offending fields as optional in type `LazyPluginSpec` Closes: #1842 --- lua/lazy/types.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazy/types.lua b/lua/lazy/types.lua index 0dbba9a..6e406bb 100644 --- a/lua/lazy/types.lua +++ b/lua/lazy/types.lua @@ -75,6 +75,8 @@ ---@field module? false ---@class LazyPluginSpec: LazyPluginBase,LazyPluginSpecHandlers,LazyPluginHooks,LazyPluginRef +---@field name? string display name and name used for plugin config files +---@field dir? string ---@field dependencies? string|string[]|LazyPluginSpec[] ---@field specs? string|string[]|LazyPluginSpec[] From b97ee167f594c69656f985f919a00435a7bc7045 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Dec 2024 05:18:15 +0000 Subject: [PATCH 128/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 7722a40..68bbee4 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -540,9 +540,7 @@ function. keys = { { "ft", "Neotree toggle", desc = "NeoTree" }, }, - config = function() - require("neo-tree").setup() - end, + opts = {}, } < From 7c493713bc2cb392706866eeba53aaef6c8e9fc6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:12:21 +0100 Subject: [PATCH 129/148] chore(main): release 11.16.1 (#1844) :robot: I have created a release *beep* *boop* --- ## [11.16.1](https://github.com/folke/lazy.nvim/compare/v11.16.0...v11.16.1) (2024-12-09) ### Bug Fixes * **types:** ensure all fields for `LazyPluginSpec` are optional ([#1843](https://github.com/folke/lazy.nvim/issues/1843)) ([703be1d](https://github.com/folke/lazy.nvim/commit/703be1dda35e142e76e94e7503cf67d6b98a1d35)), closes [#1842](https://github.com/folke/lazy.nvim/issues/1842) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 228572b..b82a64f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.16.0" + ".": "11.16.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 009055b..f65347f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [11.16.1](https://github.com/folke/lazy.nvim/compare/v11.16.0...v11.16.1) (2024-12-09) + + +### Bug Fixes + +* **types:** ensure all fields for `LazyPluginSpec` are optional ([#1843](https://github.com/folke/lazy.nvim/issues/1843)) ([703be1d](https://github.com/folke/lazy.nvim/commit/703be1dda35e142e76e94e7503cf67d6b98a1d35)), closes [#1842](https://github.com/folke/lazy.nvim/issues/1842) + ## [11.16.0](https://github.com/folke/lazy.nvim/compare/v11.15.0...v11.16.0) (2024-12-07) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 9a49aaa..335b664 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -241,7 +241,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.16.0" -- x-release-please-version +M.version = "11.16.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 805b85c2ea3bd6f9506ef22cbd6e3a39172b5b08 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 19:56:52 +0100 Subject: [PATCH 130/148] fix(meta): when a plugin is both optional and disabled, then just delete it from the list --- lua/lazy/core/meta.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index abb2508..88263a2 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -305,7 +305,11 @@ function M:fix_disabled() 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) + if plugin.optional then + self:del(plugin.name) + else + self:disable(plugin) + end end end self:rebuild() From 7e6c863bc7563efbdd757a310d17ebc95166cef3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:58:17 +0100 Subject: [PATCH 131/148] chore(main): release 11.16.2 (#1854) :robot: 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](https://github.com/folke/lazy.nvim/commit/805b85c2ea3bd6f9506ef22cbd6e3a39172b5b08)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b82a64f..d5dbcb3 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.16.1" + ".": "11.16.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f65347f..015288e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 335b664..2ae4079 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -241,7 +241,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.16.1" -- x-release-please-version +M.version = "11.16.2" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From a9c660d6ef1b396869d3d951760aa7a3dbfe575f Mon Sep 17 00:00:00 2001 From: Shihua Zeng <76579810+Bekaboo@users.noreply.github.com> Date: Sat, 4 Jan 2025 22:40:44 -0700 Subject: [PATCH 132/148] feat(config,render): allow customizing the debug icon (#1863) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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) --- lua/lazy/core/config.lua | 1 + lua/lazy/view/render.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 2ae4079..9939763 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -96,6 +96,7 @@ M.defaults = { icons = { cmd = "ξ―‡ ", config = "", + debug = "●", event = "ξͺ† ", favorite = "ο€… ", ft = "ο€– ", diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index 16c6659..8c49a1b 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -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 From 72aa3a2624be5dc240646084f7b6a38eb99eb2ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 5 Jan 2025 05:41:31 +0000 Subject: [PATCH 133/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 68bbee4..6870e89 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -706,6 +706,7 @@ will be added to the plugin’s spec. icons = { cmd = "ξ―‡ ", config = "", + debug = "●", event = "ξͺ† ", favorite = "ο€… ", ft = "ο€– ", From 4df5c4d65a3bbf801edd9ec55fb1ae55cfa72dd0 Mon Sep 17 00:00:00 2001 From: Eduardo Bray Date: Mon, 6 Jan 2025 17:14:06 -0300 Subject: [PATCH 134/148] 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) --- lua/lazy/core/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 9939763..49339e5 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -96,7 +96,7 @@ M.defaults = { icons = { cmd = "ξ―‡ ", config = "", - debug = "●", + debug = "● ", event = "ξͺ† ", favorite = "ο€… ", ft = "ο€– ", From d8f26efd456190241afd1b0f5235fe6fdba13d4a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Jan 2025 20:14:50 +0000 Subject: [PATCH 135/148] chore(build): auto-generate docs --- doc/lazy.nvim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 6870e89..2ae3b36 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -706,7 +706,7 @@ will be added to the plugin’s spec. icons = { cmd = "ξ―‡ ", config = "", - debug = "●", + debug = "● ", event = "ξͺ† ", favorite = "ο€… ", ft = "ο€– ", From 4f30c61b64d3fb8a04fd6660989b09241aa1b127 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 20:13:53 +0100 Subject: [PATCH 136/148] ci: check --- lua/lazy/core/meta.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 88263a2..58397fd 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -14,6 +14,9 @@ local Util = require("lazy.core.util") ---@field pkgs table local M = {} +if false then + dd("foo") +end ---@param spec LazySpecLoader ---@return LazyMeta function M.new(spec) From 5586fda88de57b33b723f75d5327b36165663077 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 20:14:57 +0100 Subject: [PATCH 137/148] ci: remove debug --- lua/lazy/core/meta.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 58397fd..88263a2 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -14,9 +14,6 @@ local Util = require("lazy.core.util") ---@field pkgs table local M = {} -if false then - dd("foo") -end ---@param spec LazySpecLoader ---@return LazyMeta function M.new(spec) From 7527af40ddd4a93a02911be570b32609b9d4ea53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Jan 2025 19:19:03 +0000 Subject: [PATCH 138/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 504 +++++++++++++++++------------- 1 file changed, 292 insertions(+), 212 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index 6cfdb3f..d3ba8f6 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -10,11 +10,11 @@ return }, { name = "adopure.nvim", url = "Willem-J-an/adopure.nvim", - version = "1.2.0-1" + version = "2.1.0-1" }, { name = "aerial.nvim", url = "stevearc/aerial.nvim", - version = "2.3.1-1" + version = "2.4.0-1" }, { name = "age.nvim", url = "KingMichaelPark/age.nvim", @@ -22,7 +22,7 @@ return }, { name = "ai.nvim", url = "S1M0N38/ai.nvim", - version = "1.3.0-1" + version = "1.5.0-1" }, { name = "astral.nvim", url = "rootiest/astral.nvim", @@ -35,10 +35,14 @@ return name = "autosave.nvim", url = "brianhuster/autosave.nvim", version = "0.4.2-1" + }, { + name = "avante.nvim", + url = "yetone/avante.nvim", + version = "0.0.15-1" }, { name = "banana.nvim", url = "CWood-sdf/banana.nvim", - version = "0.1.0-1" + version = "0.2.0-1" }, { name = "bars-n-lines.nvim", url = "OXY2DEV/bars-N-lines.nvim", @@ -54,7 +58,7 @@ return }, { name = "bufferline.nvim", url = "akinsho/bufferline.nvim", - version = "4.9.0-1" + version = "4.9.1-1" }, { name = "care.nvim", url = "max397574/care.nvim", @@ -62,7 +66,11 @@ return }, { name = "ccc.nvim", url = "uga-rosa/ccc.nvim", - version = "1.6.0-1" + version = "2.0.3-1" + }, { + name = "chatml.nvim", + url = "S1M0N38/chatml.nvim", + version = "1.0.0-1" }, { name = "ci-template.nvim", url = "linrongbin16/ci-template.nvim", @@ -74,7 +82,7 @@ return }, { name = "cmp-rg", url = "lukas-reineke/cmp-rg", - version = "1.3.9-1" + version = "1.3.11-1" }, { name = "colorbox.nvim", url = "linrongbin16/colorbox.nvim", @@ -86,7 +94,7 @@ return }, { name = "colortils.nvim", url = "nvim-colortils/colortils.nvim", - version = "1.1.0-1" + version = "1.2.0-1" }, { name = "command.nvim", url = "cultab/command.nvim", @@ -106,11 +114,23 @@ return }, { name = "commons.nvim", url = "linrongbin16/commons.nvim", - version = "21.1.0-1" + version = "26.0.0-1" }, { name = "conform.nvim", url = "stevearc/conform.nvim", - version = "8.2.0-1" + version = "8.4.0-1" + }, { + name = "coop.nvim", + url = "gregorias/coop.nvim", + version = "1.0.1-0" + }, { + name = "copy-diagnostics.nvim", + url = "NickStafford2/copy-diagnostics.nvim", + version = "main-1" + }, { + name = "cord.nvim", + url = "vyfor/cord.nvim", + version = "2.0.0beta-9" }, { name = "cursor-text-objects.nvim", url = "ColinKennedy/cursor-text-objects.nvim", @@ -122,7 +142,7 @@ return }, { name = "dante.nvim", url = "S1M0N38/dante.nvim", - version = "1.2.0-1" + version = "1.3.1-1" }, { name = "daylight.nvim", url = "NTBBloodbath/daylight.nvim", @@ -159,18 +179,26 @@ return name = "donut.nvim", url = "NStefan002/donut.nvim", version = "2.2.1-1" + }, { + name = "donutlify.nvim", + url = "NStefan002/donutlify.nvim", + version = "1.0.0-1" }, { name = "doris.nvim", url = "jackokring/doris.nvim", version = "0.3.2-1" + }, { + name = "down.nvim", + url = "clpi/down.nvim", + version = "master-1" }, { name = "dressing.nvim", url = "stevearc/dressing.nvim", - version = "3.1.0-1" + version = "3.1.1-1" }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "9.0.2-1" + version = "11.0.0-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -186,23 +214,23 @@ return }, { name = "efmls-configs-nvim", url = "creativenull/efmls-configs-nvim", - version = "1.8.0-1" + version = "1.9.0-1" }, { name = "elixir-tools.nvim", url = "elixir-tools/elixir-tools.nvim", - version = "0.16.1-1" + version = "0.17.0-1" }, { name = "fake.nvim", url = "Kibadda/fake.nvim", - version = "1.0.0-1" + version = "4.0.1-1" }, { name = "feed.nvim", url = "neo451/feed.nvim", - version = "1.12.0-1" + version = "1.16.4-1" }, { name = "feline.nvim", url = "freddiehaddad/feline.nvim", - version = "1.7.0-1" + version = "1.7.1-1" }, { name = "fidget.nvim", url = "j-hui/fidget.nvim", @@ -242,7 +270,7 @@ return }, { name = "fzfx.nvim", url = "linrongbin16/fzfx.nvim", - version = "7.0.0-1" + version = "8.0.0-1" }, { name = "galileo.nvim", url = "S1M0N38/galileo.nvim", @@ -262,11 +290,11 @@ return }, { name = "github-nvim-theme", url = "projekt0n/github-nvim-theme", - version = "1.0.2-1" + version = "1.1.2-1" }, { name = "gitlinker.nvim", url = "linrongbin16/gitlinker.nvim", - version = "5.0.0-1" + version = "5.0.1-1" }, { name = "gitsigns.nvim", url = "lewis6991/gitsigns.nvim", @@ -294,7 +322,7 @@ return }, { name = "guard.nvim", url = "nvimdev/guard.nvim", - version = "1.0.4-1" + version = "2.1.2-1" }, { name = "hardhat.nvim", url = "TheSnakeWitcher/hardhat.nvim", @@ -306,11 +334,11 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "4.3.2-1" + version = "4.4.0-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", - version = "4.0.2-1" + version = "5.0.0-1" }, { name = "heirline.nvim", url = "rebelot/heirline.nvim", @@ -326,7 +354,7 @@ return }, { name = "hlchunk.nvim", url = "shellRaining/hlchunk.nvim", - version = "1.1.0-1" + version = "1.3.0-1" }, { name = "hotpot.nvim", url = "rktjmp/hotpot.nvim", @@ -334,7 +362,7 @@ return }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", - version = "2.0.0-1" + version = "2.0.1-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -346,11 +374,11 @@ return }, { name = "incline.nvim", url = "b0o/incline.nvim", - version = "0.0.1-1" + version = "0.0.3-1" }, { name = "indent-blankline.nvim", url = "lukas-reineke/indent-blankline.nvim", - version = "3.8.6-1" + version = "3.8.7-1" }, { name = "kai.nvim", url = "Kamilcuk/kai.nvim", @@ -366,7 +394,7 @@ return }, { name = "lazy.nvim", url = "folke/lazy.nvim", - version = "11.14.2-1" + version = "11.16.2-1" }, { name = "lazydev.nvim", url = "folke/lazydev.nvim", @@ -374,15 +402,15 @@ return }, { name = "lean.nvim", url = "Julian/lean.nvim", - version = "2024.10.1-1" + version = "2024.12.2-1" }, { name = "leetcode.nvim", url = "kawre/leetcode.nvim", - version = "0.2.0-1" + version = "0.3.0-1" }, { name = "legendary.nvim", url = "mrjones2014/legendary.nvim", - version = "2.13.11-1" + version = "2.13.13-1" }, { name = "live-command.nvim", url = "smjonas/live-command.nvim", @@ -390,7 +418,7 @@ return }, { name = "live-preview.nvim", url = "brianhuster/live-preview.nvim", - version = "0.8.3-1" + version = "0.9.4-1" }, { name = "logging.nvim", url = "NTBBloodbath/logging.nvim", @@ -422,7 +450,7 @@ return }, { name = "lua-console.nvim", url = "YaroSpace/lua-console.nvim", - version = "1.1.0-1" + version = "1.2.3-1" }, { name = "lua-obfuscator.nvim", url = "git+ssh://git@github.com/kdssoftware/lua-obfuscator.nvim.git", @@ -442,7 +470,7 @@ return }, { name = "luarocks-build-treesitter-parser", url = "nvim-neorocks/luarocks-build-treesitter-parser", - version = "5.0.2-1" + version = "6.0.0-1" }, { name = "luarocks-build-treesitter-parser-cpp", url = "nvim-neorocks/luarocks-build-treesitter-parser-cpp", @@ -450,7 +478,7 @@ return }, { name = "mag-nvim-lsp", url = "iguanacucumber/mag-nvim-lsp", - version = "0.1-1" + version = "0.2-1" }, { name = "mag-nvim-lua", url = "iguanacucumber/mag-nvim-lua", @@ -458,19 +486,15 @@ return }, { name = "magazine.nvim", url = "iguanacucumber/magazine.nvim", - version = "0.4.1-1" + version = "0.4.4-1" }, { name = "mapx.nvim", url = "b0o/mapx.nvim", version = "0.2.1-1" - }, { - name = "markdown.nvim", - url = "MeanderingProgrammer/render-markdown.nvim", - version = "5.0.1-1" }, { name = "markview.nvim", url = "OXY2DEV/markview.nvim", - version = "24.0.0-1" + version = "25.1.0-1" }, { name = "mason-lspconfig.nvim", url = "williamboman/mason-lspconfig.nvim", @@ -483,10 +507,14 @@ return name = "mason.nvim", url = "williamboman/mason.nvim", version = "1.10.0-1" + }, { + name = "melange-nvim", + url = "savq/melange-nvim", + version = "0.9.0-1" }, { name = "mini.nvim", url = "echasnovski/mini.nvim", - version = "0.9.0-1" + version = "0.15.0-1" }, { name = "mkdnflow.nvim", url = "jakewvincent/mkdnflow.nvim", @@ -510,11 +538,11 @@ return }, { name = "neo-tree.nvim", url = "nvim-neo-tree/neo-tree.nvim", - version = "3.26-1" + version = "3.29-1" }, { name = "neoconf.nvim", url = "folke/neoconf.nvim", - version = "1.3.3-1" + version = "1.4.0-1" }, { name = "neodev.nvim", url = "folke/neodev.nvim", @@ -522,15 +550,19 @@ return }, { name = "neogen", url = "danymat/neogen", - version = "2.19.4-1" + version = "2.20.0-1" }, { name = "neogit", url = "NeogitOrg/neogit", - version = "1.0.0-1" + version = "2.0.0-1" }, { name = "neorg", url = "nvim-neorg/neorg", - version = "9.1.1-1" + version = "9.2.0-1" + }, { + name = "neorg-archive", + url = "bottd/neorg-archive", + version = "1.0.0-1" }, { name = "neorg-conceal-wrap", url = "benlubas/neorg-conceal-wrap", @@ -538,7 +570,11 @@ return }, { name = "neorg-interim-ls", url = "benlubas/neorg-interim-ls", - version = "1.3.0-1" + version = "2.1.0-1" + }, { + name = "neorg-query", + url = "benlubas/neorg-query", + version = "1.2.0-1" }, { name = "neorg-se", url = "benlubas/neorg-se", @@ -558,19 +594,23 @@ return }, { name = "neotest", url = "nvim-neotest/neotest", - version = "5.6.1-1" + version = "5.8.0-1" }, { name = "neotest-busted", url = "MisanthropicBit/neotest-busted", - version = "0.3.0-1" + version = "0.5.0-1" + }, { + name = "neotest-dotnet", + url = "Issafalcon/neotest-dotnet", + version = "stable-1" }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.5.0-1" + version = "1.9.1-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", - version = "2.1.0-1" + version = "2.1.1-1" }, { name = "neotest-java", url = "rcasia/neotest-java", @@ -579,6 +619,10 @@ return name = "neotest-zig", url = "lawrence-laz/neotest-zig", version = "1.3.1-1" + }, { + name = "nerdy.nvim", + url = "2KAbhishek/nerdy.nvim", + version = "1.4-1" }, { name = "netman.nvim", url = "miversen33/netman.nvim", @@ -590,11 +634,11 @@ return }, { name = "no-neck-pain.nvim", url = "shortcuts/no-neck-pain.nvim", - version = "2.1.3-1" + version = "2.1.5-1" }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.7.2-1" + version = "4.9.0-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -610,11 +654,11 @@ return }, { name = "nvim-a2-pack", url = "dfgordon/nvim-a2-pack", - version = "0.3.0-1" + version = "0.3.1-1" }, { name = "nvim-best-practices-plugin-template", url = "ColinKennedy/nvim-best-practices-plugin-template", - version = "1.4.0-1" + version = "1.6.0-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -634,7 +678,7 @@ return }, { name = "nvim-dap", url = "mfussenegger/nvim-dap", - version = "0.8.0-1" + version = "0.9.0-1" }, { name = "nvim-dap-ui", url = "rcarriga/nvim-dap-ui", @@ -647,6 +691,10 @@ return name = "nvim-dev-container", url = "esensar/nvim-dev-container", version = "0.2.0-1" + }, { + name = "nvim-faker", + url = "git+ssh://git@github.com/tehdb/nvim-faker.git", + version = "1.0.0-1" }, { name = "nvim-java", url = "nvim-java/nvim-java", @@ -678,7 +726,7 @@ return }, { name = "nvim-lspconfig", url = "neovim/nvim-lspconfig", - version = "1.0.0-1" + version = "1.6.0-1" }, { name = "nvim-metals", url = "scalameta/nvim-metals", @@ -686,11 +734,11 @@ return }, { name = "nvim-nio", url = "nvim-neotest/nvim-nio", - version = "1.10.0-1" + version = "1.10.1-1" }, { name = "nvim-notify", url = "rcarriga/nvim-notify", - version = "3.14.0-1" + version = "3.15.0-1" }, { name = "nvim-parinfer", url = "gpanders/nvim-parinfer", @@ -702,7 +750,7 @@ return }, { name = "nvim-possession", url = "gennaro-tedesco/nvim-possession", - version = "0.0.15-1" + version = "0.0.17-1" }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", @@ -710,7 +758,7 @@ return }, { name = "nvim-smuggler", url = "Klafyvel/nvim-smuggler", - version = "0.4.2-1" + version = "0.5.0-1" }, { name = "nvim-snippets", url = "garymjr/nvim-snippets", @@ -723,6 +771,10 @@ return name = "nvim-surround", url = "kylechui/nvim-surround", version = "2.1.5-1" + }, { + name = "nvim-telescope-cycler", + url = "heindsight/nvim-telescope-cycler", + version = "0.1.0-1" }, { name = "nvim-tree.lua", url = "nvim-tree/nvim-tree.lua", @@ -742,7 +794,11 @@ return }, { name = "nvim-window-picker", url = "s1n7ax/nvim-window-picker", - version = "2.0.3-1" + version = "2.3.1-1" + }, { + name = "obazel.nvim", + url = "glindstedt/obazel.nvim", + version = "0.1.1-1" }, { name = "obsidian.nvim", url = "epwalsh/obsidian.nvim", @@ -750,11 +806,11 @@ return }, { name = "oil.nvim", url = "stevearc/oil.nvim", - version = "2.13.0-1" + version = "2.14.0-1" }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "2.3.0-1" + version = "2.8.0-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -762,7 +818,7 @@ return }, { name = "otter.nvim", url = "jmbuhr/otter.nvim", - version = "2.5.0-1" + version = "2.6.0-1" }, { name = "overseer.nvim", url = "stevearc/overseer.nvim", @@ -770,7 +826,7 @@ return }, { name = "oz.nvim", url = "luxluth/oz.nvim", - version = "0.0.3-1" + version = "0.0.4-1" }, { name = "package-info.nvim", url = "vuki656/package-info.nvim", @@ -794,7 +850,7 @@ return }, { name = "persisted.nvim", url = "olimorris/persisted.nvim", - version = "2.0.1-1" + version = "2.0.2-1" }, { name = "persistence.nvim", url = "folke/persistence.nvim", @@ -818,11 +874,11 @@ return }, { name = "quicker.nvim", url = "stevearc/quicker.nvim", - version = "1.2.0-1" + version = "1.3.0-1" }, { name = "rainbow-delimiters.nvim", url = "HiPhish/rainbow-delimiters.nvim", - version = "0.7.0-1" + version = "0.8.0-1" }, { name = "remember.nvim", url = "vladdoster/remember.nvim", @@ -834,11 +890,11 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.6.0-1" + version = "7.8.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.8.4-1" + version = "3.9.1-1" }, { name = "rime.nvim", url = "Freed-Wu/rime.nvim", @@ -854,19 +910,19 @@ return }, { name = "rocks-git.nvim", url = "nvim-neorocks/rocks-git.nvim", - version = "2.5.1-1" + version = "2.5.2-1" }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", - version = "1.1.1-1" + version = "1.1.2-1" }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", - version = "1.2.0-1" + version = "1.3.0-1" }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.42.2-1" + version = "2.43.0-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -878,7 +934,7 @@ return }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.17.1-1" + version = "5.24.2-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -886,7 +942,7 @@ return }, { name = "screenkey.nvim", url = "NStefan002/screenkey.nvim", - version = "2.2.1-1" + version = "2.4.2-1" }, { name = "scrollbar.nvim", url = "Xuyuanp/scrollbar.nvim", @@ -906,11 +962,11 @@ return }, { name = "smart-splits.nvim", url = "mrjones2014/smart-splits.nvim", - version = "1.7.0-1" + version = "1.8.1-1" }, { name = "snacks.nvim", url = "folke/snacks.nvim", - version = "2.6.0-1" + version = "2.15.0-1" }, { name = "sos.nvim", url = "tmillr/sos.nvim", @@ -946,7 +1002,7 @@ return }, { name = "tabby.nvim", url = "nanozuki/tabby.nvim", - version = "2.5.1-1" + version = "2.7.4-1" }, { name = "tangerine.nvim", url = "udayvir-singh/tangerine.nvim", @@ -955,6 +1011,14 @@ return name = "teacup.neovim", url = "Clivern/teacup.neovim", version = "0.0.1-1" + }, { + name = "telescope-cmdline.nvim", + url = "jonarrien/telescope-cmdline.nvim", + version = "0.2.1-1" + }, { + name = "telescope-frecency.nvim", + url = "nvim-telescope/telescope-frecency.nvim", + version = "1.0.5-1" }, { name = "telescope-zf-native.nvim", url = "natecraddock/telescope-zf-native.nvim", @@ -970,11 +1034,11 @@ return }, { name = "toggleterm.nvim", url = "akinsho/toggleterm.nvim", - version = "2.13.0-1" + version = "2.13.1-1" }, { name = "tokyonight.nvim", url = "folke/tokyonight.nvim", - version = "4.10.0-1" + version = "4.11.0-1" }, { name = "tree-sitter-ada", url = "briot/tree-sitter-ada", @@ -990,7 +1054,7 @@ return }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.39-1" + version = "0.0.45-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", @@ -1002,7 +1066,7 @@ return }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-authzed", url = "mleonidas/tree-sitter-authzed", @@ -1010,11 +1074,11 @@ return }, { name = "tree-sitter-awk", url = "Beaglefoot/tree-sitter-awk", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.36-1" + version = "0.0.39-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", @@ -1030,7 +1094,7 @@ return }, { name = "tree-sitter-bicep", url = "tree-sitter-grammars/tree-sitter-bicep", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-bitbake", url = "tree-sitter-grammars/tree-sitter-bitbake", @@ -1042,15 +1106,15 @@ return }, { name = "tree-sitter-bp", url = "ambroisie/tree-sitter-bp", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", @@ -1063,10 +1127,14 @@ return name = "tree-sitter-chatito", url = "tree-sitter-grammars/tree-sitter-chatito", version = "0.0.30-1" + }, { + name = "tree-sitter-circom", + url = "Decurity/tree-sitter-circom", + version = "0.0.1-1" }, { name = "tree-sitter-cli", url = "FourierTransformer/tree-sitter-cli", - version = "0.24.4-1" + version = "0.24.5-1" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", @@ -1098,11 +1166,11 @@ return }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.35-1" + version = "0.0.39-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.31-1" + version = "0.0.35-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", @@ -1110,7 +1178,7 @@ return }, { name = "tree-sitter-cuda", url = "tree-sitter-grammars/tree-sitter-cuda", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", @@ -1142,7 +1210,7 @@ return }, { name = "tree-sitter-diff", url = "the-mikedavis/tree-sitter-diff", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-disassembly", url = "ColinKennedy/tree-sitter-disassembly", @@ -1150,11 +1218,11 @@ return }, { name = "tree-sitter-djot", url = "treeman/tree-sitter-djot", - version = "0.0.29-1" + version = "0.0.33-1" }, { name = "tree-sitter-dockerfile", url = "camdencheek/tree-sitter-dockerfile", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-dot", url = "rydesun/tree-sitter-dot", @@ -1170,7 +1238,7 @@ return }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", @@ -1182,7 +1250,7 @@ return }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", - version = "0.0.44-1" + version = "0.0.47-1" }, { name = "tree-sitter-eds", url = "uyha/tree-sitter-eds", @@ -1194,11 +1262,11 @@ return }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.35-1" + version = "0.0.38-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-elsa", url = "glapa-grossklag/tree-sitter-elsa", @@ -1210,15 +1278,15 @@ return }, { name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.33-1" + version = "0.0.36-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-faust", url = "khiner/tree-sitter-faust", @@ -1238,7 +1306,7 @@ return }, { name = "tree-sitter-fish", url = "ram02z/tree-sitter-fish", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-foam", url = "FoamScience/tree-sitter-foam", @@ -1250,7 +1318,7 @@ return }, { name = "tree-sitter-fortran", url = "stadelmanma/tree-sitter-fortran", - version = "0.0.36-1" + version = "0.0.41-1" }, { name = "tree-sitter-fsh", url = "mgramigna/tree-sitter-fsh", @@ -1258,7 +1326,7 @@ return }, { name = "tree-sitter-fsharp", url = "ionide/tree-sitter-fsharp", - version = "0.0.9-1" + version = "0.0.10-1" }, { name = "tree-sitter-func", url = "tree-sitter-grammars/tree-sitter-func", @@ -1270,15 +1338,15 @@ return }, { name = "tree-sitter-gap", url = "gap-system/tree-sitter-gap", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-gaptst", url = "gap-system/tree-sitter-gaptst", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-gdscript", url = "PrestonKnopp/tree-sitter-gdscript", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-gdshader", url = "GodOfAvacyn/tree-sitter-gdshader", @@ -1330,11 +1398,11 @@ return }, { name = "tree-sitter-gnuplot", url = "dpezto/tree-sitter-gnuplot", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.35-1" + version = "0.0.38-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", @@ -1342,11 +1410,11 @@ return }, { name = "tree-sitter-godot_resource", url = "PrestonKnopp/tree-sitter-godot-resource", - version = "0.0.29-1" + version = "0.0.32-1" }, { name = "tree-sitter-gomod", url = "camdencheek/tree-sitter-go-mod", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-gosum", url = "tree-sitter-grammars/tree-sitter-go-sum", @@ -1354,7 +1422,7 @@ return }, { name = "tree-sitter-gotmpl", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.30-1" + version = "0.0.35-1" }, { name = "tree-sitter-gowork", url = "omertuc/tree-sitter-go-work", @@ -1370,11 +1438,11 @@ return }, { name = "tree-sitter-gren", url = "MaeBrooks/tree-sitter-gren", - version = "0.0.3-1" + version = "0.0.6-1" }, { name = "tree-sitter-groovy", url = "murtaza64/tree-sitter-groovy", - version = "0.0.30-1" + version = "0.0.33-1" }, { name = "tree-sitter-gstlaunch", url = "tree-sitter-grammars/tree-sitter-gstlaunch", @@ -1382,7 +1450,7 @@ return }, { name = "tree-sitter-hack", url = "slackhq/tree-sitter-hack", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-hare", url = "tree-sitter-grammars/tree-sitter-hare", @@ -1402,11 +1470,11 @@ return }, { name = "tree-sitter-heex", url = "connorlay/tree-sitter-heex", - version = "0.0.30-1" + version = "0.0.34-1" }, { name = "tree-sitter-helm", url = "ngalaiko/tree-sitter-go-template", - version = "0.0.31-1" + version = "0.0.35-1" }, { name = "tree-sitter-hjson", url = "winston0410/tree-sitter-hjson", @@ -1426,11 +1494,11 @@ return }, { name = "tree-sitter-hoon", url = "urbit-pilled/tree-sitter-hoon", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", @@ -1442,7 +1510,7 @@ return }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", @@ -1450,11 +1518,15 @@ return }, { name = "tree-sitter-hyprlang", url = "tree-sitter-grammars/tree-sitter-hyprlang", - version = "0.0.29-1" + version = "0.0.33-1" }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", version = "0.0.31-1" + }, { + name = "tree-sitter-idris", + url = "kayhide/tree-sitter-idris", + version = "0.0.1-1" }, { name = "tree-sitter-ini", url = "justinmk/tree-sitter-ini", @@ -1462,7 +1534,11 @@ return }, { name = "tree-sitter-inko", url = "inko-lang/tree-sitter-inko", - version = "0.0.36-1" + version = "0.0.38-1" + }, { + name = "tree-sitter-ipkg", + url = "srghma/tree-sitter-ipkg", + version = "0.0.1-1" }, { name = "tree-sitter-ispc", url = "tree-sitter-grammars/tree-sitter-ispc", @@ -1470,15 +1546,15 @@ return }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", - version = "0.0.29-1" + version = "0.0.32-1" }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.35-1" + version = "0.0.39-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", @@ -1486,11 +1562,11 @@ return }, { name = "tree-sitter-jsdoc", url = "tree-sitter/tree-sitter-jsdoc", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", @@ -1510,15 +1586,15 @@ return }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.38-1" + version = "0.0.40-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-kconfig", url = "tree-sitter-grammars/tree-sitter-kconfig", - version = "0.0.29-1" + version = "0.0.32-1" }, { name = "tree-sitter-kdl", url = "tree-sitter-grammars/tree-sitter-kdl", @@ -1526,11 +1602,11 @@ return }, { name = "tree-sitter-kotlin", url = "fwcd/tree-sitter-kotlin", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-koto", url = "koto-lang/tree-sitter-koto", - version = "0.0.33-1" + version = "0.0.37-1" }, { name = "tree-sitter-kusto", url = "Willem-J-an/tree-sitter-kusto", @@ -1538,7 +1614,7 @@ return }, { name = "tree-sitter-lalrpop", url = "traxys/tree-sitter-lalrpop", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-latex", url = "latex-lsp/tree-sitter-latex", @@ -1550,7 +1626,7 @@ return }, { name = "tree-sitter-leo", url = "r001/tree-sitter-leo", - version = "0.0.29-1" + version = "0.0.33-1" }, { name = "tree-sitter-linkerscript", url = "tree-sitter-grammars/tree-sitter-linkerscript", @@ -1562,7 +1638,7 @@ return }, { name = "tree-sitter-liquidsoap", url = "savonet/tree-sitter-liquidsoap", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-llvm", url = "benwilliamgraham/tree-sitter-llvm", @@ -1570,7 +1646,7 @@ return }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", @@ -1582,7 +1658,7 @@ return }, { name = "tree-sitter-luau", url = "tree-sitter-grammars/tree-sitter-luau", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-m68k", url = "grahambates/tree-sitter-m68k", @@ -1594,15 +1670,15 @@ return }, { name = "tree-sitter-markdown", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.36-1" + version = "0.0.37-1" }, { name = "tree-sitter-markdown_inline", url = "tree-sitter-grammars/tree-sitter-markdown", - version = "0.0.36-1" + version = "0.0.37-1" }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-menhir", url = "Kerl13/tree-sitter-menhir", @@ -1618,7 +1694,7 @@ return }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.40-1" + version = "0.0.43-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", @@ -1630,11 +1706,11 @@ return }, { name = "tree-sitter-nginx", url = "opa-oz/tree-sitter-nginx", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-nickel", url = "nickel-lang/tree-sitter-nickel", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-nim", url = "alaviss/tree-sitter-nim", @@ -1650,7 +1726,7 @@ return }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.51-1" + version = "0.0.54-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1666,11 +1742,11 @@ return }, { name = "tree-sitter-nu", url = "nushell/tree-sitter-nu", - version = "0.0.20-1" + version = "0.0.30-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-objdump", url = "ColinKennedy/tree-sitter-objdump", @@ -1678,11 +1754,11 @@ return }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.35-1" + version = "0.0.39-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", @@ -1690,7 +1766,7 @@ return }, { name = "tree-sitter-odin", url = "tree-sitter-grammars/tree-sitter-odin", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-org", url = "milisims/tree-sitter-org", @@ -1714,15 +1790,15 @@ return }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.37-1" + version = "0.0.38-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.35-1" + version = "0.0.37-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.35-1" + version = "0.0.38-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", @@ -1742,7 +1818,7 @@ return }, { name = "tree-sitter-poe_filter", url = "tree-sitter-grammars/tree-sitter-poe-filter", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-pony", url = "tree-sitter-grammars/tree-sitter-pony", @@ -1750,7 +1826,7 @@ return }, { name = "tree-sitter-powershell", url = "airbus-cert/tree-sitter-powershell", - version = "0.0.32-1" + version = "0.0.36-1" }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", @@ -1758,7 +1834,7 @@ return }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-problog", url = "foxyseta/tree-sitter-prolog", @@ -1774,7 +1850,7 @@ return }, { name = "tree-sitter-properties", url = "tree-sitter-grammars/tree-sitter-properties", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-proto", url = "treywood/tree-sitter-proto", @@ -1794,7 +1870,7 @@ return }, { name = "tree-sitter-puppet", url = "tree-sitter-grammars/tree-sitter-puppet", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-purescript", url = "postsolar/tree-sitter-purescript", @@ -1806,7 +1882,7 @@ return }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.33-1" + version = "0.0.39-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", @@ -1818,11 +1894,11 @@ return }, { name = "tree-sitter-qmljs", url = "yuja/tree-sitter-qmljs", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", @@ -1842,7 +1918,7 @@ return }, { name = "tree-sitter-rbs", url = "joker1007/tree-sitter-rbs", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-re2c", url = "tree-sitter-grammars/tree-sitter-re2c", @@ -1854,7 +1930,7 @@ return }, { name = "tree-sitter-regex", url = "tree-sitter/tree-sitter-regex", - version = "0.0.37-1" + version = "0.0.40-1" }, { name = "tree-sitter-rego", url = "FallenAngel97/tree-sitter-rego", @@ -1882,7 +1958,7 @@ return }, { name = "tree-sitter-roc", url = "faldor20/tree-sitter-roc", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-ron", url = "tree-sitter-grammars/tree-sitter-ron", @@ -1890,11 +1966,11 @@ return }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-runescript", url = "2004Scape/tree-sitter-runescript", @@ -1902,15 +1978,15 @@ return }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.37-1" + version = "0.0.40-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.39-1" + version = "0.0.44-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-scheme", url = "6cdh/tree-sitter-scheme", @@ -1922,15 +1998,19 @@ return }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.36-1" + version = "0.0.42-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", version = "0.0.32-1" + }, { + name = "tree-sitter-slim", + url = "theoo/tree-sitter-slim", + version = "0.0.3-1" }, { name = "tree-sitter-slint", url = "slint-ui/tree-sitter-slint", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-smali", url = "tree-sitter-grammars/tree-sitter-smali", @@ -1942,23 +2022,23 @@ return }, { name = "tree-sitter-snakemake", url = "osthomas/tree-sitter-snakemake", - version = "0.0.29-1" + version = "0.0.31-1" }, { name = "tree-sitter-solidity", url = "JoranHonig/tree-sitter-solidity", - version = "0.0.31-1" + version = "0.0.34-1" }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.37-1" + version = "0.0.44-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.36-1" + version = "0.0.42-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-sparql", url = "GordianDziwis/tree-sitter-sparql", @@ -1966,7 +2046,7 @@ return }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", - version = "0.0.37-1" + version = "0.0.39-1" }, { name = "tree-sitter-squirrel", url = "tree-sitter-grammars/tree-sitter-squirrel", @@ -1974,11 +2054,11 @@ return }, { name = "tree-sitter-ssh_config", url = "tree-sitter-grammars/tree-sitter-ssh-config", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-starlark", url = "tree-sitter-grammars/tree-sitter-starlark", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-strace", url = "sigmaSd/tree-sitter-strace", @@ -1994,7 +2074,7 @@ return }, { name = "tree-sitter-superhtml", url = "kristoff-it/superhtml", - version = "0.0.11-1" + version = "0.0.12-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", @@ -2010,11 +2090,11 @@ return }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.41-1" + version = "0.0.44-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-systemtap", url = "ok-ryoko/tree-sitter-systemtap", @@ -2025,8 +2105,8 @@ return version = "0.0.29-1" }, { name = "tree-sitter-t32", - url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/7c8579685e34116c61971240780b316c54be698b.zip", - version = "0.0.37-1" + url = "https://gitlab.com/xasc/tree-sitter-t32/-/archive/e5a12f798f056049642aa03fbb83786e3a5b95d4.zip", + version = "0.0.41-1" }, { name = "tree-sitter-tablegen", url = "tree-sitter-grammars/tree-sitter-tablegen", @@ -2042,11 +2122,11 @@ return }, { name = "tree-sitter-teal", url = "euclidianAce/tree-sitter-teal", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.38-1" + version = "0.0.44-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", @@ -2086,7 +2166,7 @@ return }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.31-1" + version = "0.0.34-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", @@ -2098,11 +2178,11 @@ return }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.31-1" + version = "0.0.34-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", - version = "0.0.31-1" + version = "0.0.33-1" }, { name = "tree-sitter-typoscript", url = "Teddytrombone/tree-sitter-typoscript", @@ -2134,7 +2214,7 @@ return }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.38-1" + version = "0.0.42-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", @@ -2142,19 +2222,19 @@ return }, { name = "tree-sitter-vento", url = "ventojs/tree-sitter-vento", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-verilog", url = "gmlarumbe/tree-sitter-systemverilog", - version = "0.0.34-1" + version = "0.0.38-1" }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.34-1" + version = "0.0.37-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", @@ -2194,15 +2274,15 @@ return }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-xresources", url = "ValdezFOmar/tree-sitter-xresources", - version = "0.0.12-1" + version = "0.0.19-1" }, { name = "tree-sitter-yaml", url = "tree-sitter-grammars/tree-sitter-yaml", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-yang", url = "Hubro/tree-sitter-yang", @@ -2218,15 +2298,15 @@ return }, { name = "tree-sitter-zig", url = "tree-sitter-grammars/tree-sitter-zig", - version = "0.0.32-1" + version = "0.0.34-1" }, { name = "tree-sitter-ziggy", url = "kristoff-it/ziggy", - version = "0.0.7-1" + version = "0.0.8-1" }, { name = "tree-sitter-ziggy_schema", url = "kristoff-it/ziggy", - version = "0.0.7-1" + version = "0.0.8-1" }, { name = "treedoc.nvim", url = "neo451/treedoc.nvim", @@ -2234,7 +2314,7 @@ return }, { name = "trouble.nvim", url = "folke/trouble.nvim", - version = "3.6.0-1" + version = "3.7.0-1" }, { name = "ts-comments.nvim", url = "folke/ts-comments.nvim", @@ -2242,7 +2322,7 @@ return }, { name = "tsc.nvim", url = "dmmulroy/tsc.nvim", - version = "2.4.1-1" + version = "2.5.0-1" }, { name = "twilight.nvim", url = "folke/twilight.nvim", @@ -2254,15 +2334,15 @@ return }, { name = "unimpaired.nvim", url = "tummetott/unimpaired.nvim", - version = "0.2.0-1" + version = "0.3.0-1" }, { name = "vgit.nvim", url = "tanvirtin/vgit.nvim", - version = "0.2.3-1" + version = "1.0.2-1" }, { name = "which-key.nvim", url = "folke/which-key.nvim", - version = "3.14.1-1" + version = "3.16.0-1" }, { name = "windline.nvim", url = "windwp/windline.nvim", @@ -2270,7 +2350,7 @@ return }, { name = "winmove.nvim", url = "MisanthropicBit/winmove.nvim", - version = "0.1.0-1" + version = "0.1.1-1" }, { name = "wormhole.nvim", url = "NStefan002/wormhole.nvim", @@ -2286,7 +2366,7 @@ return }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "6.6.1-1" + version = "7.5.1-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", @@ -2294,5 +2374,5 @@ return }, { name = "zk-nvim", url = "zk-org/zk-nvim", - version = "0.1.1-1" + version = "0.2.0-1" } } \ No newline at end of file From f15a93907ddad3d9139aea465ae18336d87f5ce6 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Thu, 6 Feb 2025 15:53:12 +0900 Subject: [PATCH 139/148] fix(ui): do not show virt_lines for messages (#1904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description 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) ## Screenshots * ***before*** - γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2025-01-27 16 42 27 * ***after*** - γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2025-01-27 16 42 58 --- lua/lazy/view/render.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index 8c49a1b..b545af0 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -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 From c6a57a3534d3494bcc5ff9b0586e141bdb0280eb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 15 Feb 2025 08:19:49 +0100 Subject: [PATCH 140/148] feat(util): pass lang to `vim.notify` so that snacks notifier can render the ft. Closes #1919 --- lua/lazy/core/util.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 9db7f14..83e8a92 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -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") From ac21a639c7ecfc8b822dcc9455deceea3778f839 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 07:25:07 +0000 Subject: [PATCH 141/148] chore(build): auto-generate rockspec mappings --- lua/lazy/community/_generated.lua | 224 +++++++++++++++++------------- 1 file changed, 128 insertions(+), 96 deletions(-) diff --git a/lua/lazy/community/_generated.lua b/lua/lazy/community/_generated.lua index d3ba8f6..7e41487 100644 --- a/lua/lazy/community/_generated.lua +++ b/lua/lazy/community/_generated.lua @@ -38,7 +38,7 @@ return }, { name = "avante.nvim", url = "yetone/avante.nvim", - version = "0.0.15-1" + version = "0.0.18-1" }, { name = "banana.nvim", url = "CWood-sdf/banana.nvim", @@ -83,10 +83,14 @@ return name = "cmp-rg", url = "lukas-reineke/cmp-rg", version = "1.3.11-1" + }, { + name = "code-stats.nvim", + url = "Freed-Wu/code-stats.nvim", + version = "0.0.2-1" }, { name = "colorbox.nvim", url = "linrongbin16/colorbox.nvim", - version = "3.1.0-1" + version = "3.1.1-1" }, { name = "colorbuddy.nvim", url = "tjdevries/colorbuddy.nvim", @@ -114,7 +118,7 @@ return }, { name = "commons.nvim", url = "linrongbin16/commons.nvim", - version = "26.0.0-1" + version = "27.0.0-1" }, { name = "conform.nvim", url = "stevearc/conform.nvim", @@ -130,7 +134,7 @@ return }, { name = "cord.nvim", url = "vyfor/cord.nvim", - version = "2.0.0beta-9" + version = "2.0.3-1" }, { name = "cursor-text-objects.nvim", url = "ColinKennedy/cursor-text-objects.nvim", @@ -158,7 +162,7 @@ return }, { name = "decipher.nvim", url = "MisanthropicBit/decipher.nvim", - version = "1.0.2-1" + version = "1.0.3-1" }, { name = "delog.nvim", url = "ej-shafran/delog.nvim", @@ -198,7 +202,7 @@ return }, { name = "dropbar.nvim", url = "Bekaboo/dropbar.nvim", - version = "11.0.0-1" + version = "12.0.0-1" }, { name = "duck.nvim", url = "tamton-aquib/duck.nvim", @@ -234,7 +238,7 @@ return }, { name = "fidget.nvim", url = "j-hui/fidget.nvim", - version = "1.4.1-1" + version = "1.6.0-1" }, { name = "flash.nvim", url = "folke/flash.nvim", @@ -270,7 +274,7 @@ return }, { name = "fzfx.nvim", url = "linrongbin16/fzfx.nvim", - version = "8.0.0-1" + version = "8.1.1-1" }, { name = "galileo.nvim", url = "S1M0N38/galileo.nvim", @@ -298,7 +302,7 @@ return }, { name = "gitsigns.nvim", url = "lewis6991/gitsigns.nvim", - version = "0.9.0-1" + version = "1.0.0-1" }, { name = "glow.nvim", url = "ellisonleao/glow.nvim", @@ -334,7 +338,7 @@ return }, { name = "haskell-tools.nvim", url = "mrcjkb/haskell-tools.nvim", - version = "4.4.0-1" + version = "4.4.2-1" }, { name = "headlines.nvim", url = "lukas-reineke/headlines.nvim", @@ -346,7 +350,7 @@ return }, { name = "helpview.nvim", url = "OXY2DEV/helpview.nvim", - version = "1.1.0-1" + version = "2.0.1-1" }, { name = "hibiscus.nvim", url = "udayvir-singh/hibiscus.nvim", @@ -362,7 +366,7 @@ return }, { name = "hurl.nvim", url = "jellydn/hurl.nvim", - version = "2.0.1-1" + version = "2.1.0-1" }, { name = "hydra.nvim", url = "nvimtools/hydra.nvim", @@ -371,6 +375,10 @@ return name = "image.nvim", url = "3rd/image.nvim", version = "1.3.0-1" + }, { + name = "ime.nvim", + url = "Freed-Wu/ime.nvim", + version = "0.0.1-1" }, { name = "incline.nvim", url = "b0o/incline.nvim", @@ -450,7 +458,7 @@ return }, { name = "lua-console.nvim", url = "YaroSpace/lua-console.nvim", - version = "1.2.3-1" + version = "1.2.4-1" }, { name = "lua-obfuscator.nvim", url = "git+ssh://git@github.com/kdssoftware/lua-obfuscator.nvim.git", @@ -494,7 +502,7 @@ return }, { name = "markview.nvim", url = "OXY2DEV/markview.nvim", - version = "25.1.0-1" + version = "25.3.1-1" }, { name = "mason-lspconfig.nvim", url = "williamboman/mason-lspconfig.nvim", @@ -515,6 +523,10 @@ return name = "mini.nvim", url = "echasnovski/mini.nvim", version = "0.15.0-1" + }, { + name = "minuet-ai.nvim", + url = "milanglacier/minuet-ai.nvim", + version = "0.3.2-1" }, { name = "mkdnflow.nvim", url = "jakewvincent/mkdnflow.nvim", @@ -574,7 +586,7 @@ return }, { name = "neorg-query", url = "benlubas/neorg-query", - version = "1.2.0-1" + version = "1.3.1-1" }, { name = "neorg-se", url = "benlubas/neorg-se", @@ -606,7 +618,7 @@ return }, { name = "neotest-golang", url = "fredrikaverpil/neotest-golang", - version = "1.9.1-1" + version = "1.10.1-1" }, { name = "neotest-haskell", url = "mrcjkb/neotest-haskell", @@ -638,7 +650,7 @@ return }, { name = "noice.nvim", url = "folke/noice.nvim", - version = "4.9.0-1" + version = "4.10.0-1" }, { name = "npackages.nvim", url = "diegofigs/npackages.nvim", @@ -658,7 +670,7 @@ return }, { name = "nvim-best-practices-plugin-template", url = "ColinKennedy/nvim-best-practices-plugin-template", - version = "1.6.0-1" + version = "1.7.0-1" }, { name = "nvim-bqf", url = "kevinhwang91/nvim-bqf", @@ -750,7 +762,7 @@ return }, { name = "nvim-possession", url = "gennaro-tedesco/nvim-possession", - version = "0.0.17-1" + version = "0.1.0-1" }, { name = "nvim-scrollview", url = "dstein64/nvim-scrollview", @@ -810,7 +822,7 @@ return }, { name = "onedarkpro.nvim", url = "olimorris/onedarkpro.nvim", - version = "2.8.0-1" + version = "2.9.0-1" }, { name = "onenord.nvim", url = "rmehri01/onenord.nvim", @@ -818,7 +830,7 @@ return }, { name = "otter.nvim", url = "jmbuhr/otter.nvim", - version = "2.6.0-1" + version = "2.6.1-1" }, { name = "overseer.nvim", url = "stevearc/overseer.nvim", @@ -890,11 +902,11 @@ return }, { name = "render-markdown.nvim", url = "MeanderingProgrammer/render-markdown.nvim", - version = "7.8.0-1" + version = "8.0.0-1" }, { name = "rest.nvim", url = "rest-nvim/rest.nvim", - version = "3.9.1-1" + version = "3.11.1-1" }, { name = "rime.nvim", url = "Freed-Wu/rime.nvim", @@ -914,7 +926,7 @@ return }, { name = "rocks-lazy.nvim", url = "nvim-neorocks/rocks-lazy.nvim", - version = "1.1.2-1" + version = "1.2.0-1" }, { name = "rocks-treesitter.nvim", url = "nvim-neorocks/rocks-treesitter.nvim", @@ -922,7 +934,7 @@ return }, { name = "rocks.nvim", url = "nvim-neorocks/rocks.nvim", - version = "2.43.0-1" + version = "2.43.1-1" }, { name = "rtp.nvim", url = "nvim-neorocks/rtp.nvim", @@ -934,7 +946,7 @@ return }, { name = "rustaceanvim", url = "mrcjkb/rustaceanvim", - version = "5.24.2-1" + version = "5.24.4-1" }, { name = "schemastore.nvim", url = "b0o/SchemaStore.nvim", @@ -966,7 +978,7 @@ return }, { name = "snacks.nvim", url = "folke/snacks.nvim", - version = "2.15.0-1" + version = "2.20.0-1" }, { name = "sos.nvim", url = "tmillr/sos.nvim", @@ -1018,7 +1030,7 @@ return }, { name = "telescope-frecency.nvim", url = "nvim-telescope/telescope-frecency.nvim", - version = "1.0.5-1" + version = "1.2.0-1" }, { name = "telescope-zf-native.nvim", url = "natecraddock/telescope-zf-native.nvim", @@ -1054,7 +1066,7 @@ return }, { name = "tree-sitter-apex", url = "aheber/tree-sitter-sfapex", - version = "0.0.45-1" + version = "0.0.47-1" }, { name = "tree-sitter-arduino", url = "tree-sitter-grammars/tree-sitter-arduino", @@ -1062,7 +1074,7 @@ return }, { name = "tree-sitter-asm", url = "RubixDev/tree-sitter-asm", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-astro", url = "virchau13/tree-sitter-astro", @@ -1078,7 +1090,7 @@ return }, { name = "tree-sitter-bash", url = "tree-sitter/tree-sitter-bash", - version = "0.0.39-1" + version = "0.0.40-1" }, { name = "tree-sitter-bass", url = "vito/tree-sitter-bass", @@ -1110,11 +1122,11 @@ return }, { name = "tree-sitter-c", url = "tree-sitter/tree-sitter-c", - version = "0.0.38-1" + version = "0.0.41-1" }, { name = "tree-sitter-c_sharp", url = "tree-sitter/tree-sitter-c-sharp", - version = "0.0.38-1" + version = "0.0.40-1" }, { name = "tree-sitter-cairo", url = "tree-sitter-grammars/tree-sitter-cairo", @@ -1134,7 +1146,7 @@ return }, { name = "tree-sitter-cli", url = "FourierTransformer/tree-sitter-cli", - version = "0.24.5-1" + version = "0.25.1-2" }, { name = "tree-sitter-clojure", url = "sogaiu/tree-sitter-clojure", @@ -1166,11 +1178,11 @@ return }, { name = "tree-sitter-cpp", url = "tree-sitter/tree-sitter-cpp", - version = "0.0.39-1" + version = "0.0.41-1" }, { name = "tree-sitter-css", url = "tree-sitter/tree-sitter-css", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-csv", url = "tree-sitter-grammars/tree-sitter-csv", @@ -1182,7 +1194,7 @@ return }, { name = "tree-sitter-cue", url = "eonpatapon/tree-sitter-cue", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-cylc", url = "elliotfontaine/tree-sitter-cylc", @@ -1198,7 +1210,7 @@ return }, { name = "tree-sitter-desktop", url = "ValdezFOmar/tree-sitter-desktop", - version = "0.0.6-1" + version = "0.0.8-1" }, { name = "tree-sitter-devicetree", url = "joelspadin/tree-sitter-devicetree", @@ -1218,7 +1230,7 @@ return }, { name = "tree-sitter-djot", url = "treeman/tree-sitter-djot", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-dockerfile", url = "camdencheek/tree-sitter-dockerfile", @@ -1234,11 +1246,11 @@ return }, { name = "tree-sitter-dtd", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-earthfile", url = "glehmann/tree-sitter-earthfile", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-ebnf", url = "RubixDev/ebnf", @@ -1246,7 +1258,7 @@ return }, { name = "tree-sitter-ecma", url = "nvim-neorocks/luarocks-stub", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-editorconfig", url = "ValdezFOmar/tree-sitter-editorconfig", @@ -1262,7 +1274,7 @@ return }, { name = "tree-sitter-elixir", url = "elixir-lang/tree-sitter-elixir", - version = "0.0.38-1" + version = "0.0.39-1" }, { name = "tree-sitter-elm", url = "elm-tooling/tree-sitter-elm", @@ -1279,10 +1291,14 @@ return name = "tree-sitter-embedded_template", url = "tree-sitter/tree-sitter-embedded-template", version = "0.0.34-1" + }, { + name = "tree-sitter-enforce", + url = "simonvic/tree-sitter-enforce", + version = "0.0.2-1" }, { name = "tree-sitter-erlang", url = "WhatsApp/tree-sitter-erlang", - version = "0.0.36-1" + version = "0.0.40-1" }, { name = "tree-sitter-facility", url = "FacilityApi/tree-sitter-facility", @@ -1326,7 +1342,7 @@ return }, { name = "tree-sitter-fsharp", url = "ionide/tree-sitter-fsharp", - version = "0.0.10-1" + version = "0.0.11-1" }, { name = "tree-sitter-func", url = "tree-sitter-grammars/tree-sitter-func", @@ -1374,7 +1390,7 @@ return }, { name = "tree-sitter-gleam", url = "gleam-lang/tree-sitter-gleam", - version = "0.0.33-1" + version = "0.0.35-1" }, { name = "tree-sitter-glimmer", url = "ember-tooling/tree-sitter-glimmer", @@ -1402,7 +1418,7 @@ return }, { name = "tree-sitter-go", url = "tree-sitter/tree-sitter-go", - version = "0.0.38-1" + version = "0.0.39-1" }, { name = "tree-sitter-goctl", url = "chaozwn/tree-sitter-goctl", @@ -1458,7 +1474,7 @@ return }, { name = "tree-sitter-haskell", url = "tree-sitter/tree-sitter-haskell", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-haskell_persistent", url = "MercuryTechnologies/tree-sitter-haskell-persistent", @@ -1498,7 +1514,7 @@ return }, { name = "tree-sitter-html", url = "tree-sitter/tree-sitter-html", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-html_tags", url = "nvim-neorocks/luarocks-stub", @@ -1510,7 +1526,7 @@ return }, { name = "tree-sitter-http", url = "rest-nvim/tree-sitter-http", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-hurl", url = "pfeiferj/tree-sitter-hurl", @@ -1518,11 +1534,11 @@ return }, { name = "tree-sitter-hyprlang", url = "tree-sitter-grammars/tree-sitter-hyprlang", - version = "0.0.33-1" + version = "0.0.34-1" }, { name = "tree-sitter-idl", url = "cathaysia/tree-sitter-idl", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-idris", url = "kayhide/tree-sitter-idris", @@ -1546,15 +1562,23 @@ return }, { name = "tree-sitter-janet_simple", url = "sogaiu/tree-sitter-janet-simple", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-java", url = "tree-sitter/tree-sitter-java", - version = "0.0.39-1" + version = "0.0.40-1" }, { name = "tree-sitter-javascript", url = "tree-sitter/tree-sitter-javascript", - version = "0.0.35-1" + version = "0.0.36-1" + }, { + name = "tree-sitter-jinja", + url = "cathaysia/tree-sitter-jinja", + version = "0.0.2-1" + }, { + name = "tree-sitter-jinja_inline", + url = "cathaysia/tree-sitter-jinja", + version = "0.0.2-1" }, { name = "tree-sitter-jq", url = "flurie/tree-sitter-jq", @@ -1566,7 +1590,7 @@ return }, { name = "tree-sitter-json", url = "tree-sitter/tree-sitter-json", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-json5", url = "Joakker/tree-sitter-json5", @@ -1586,7 +1610,7 @@ return }, { name = "tree-sitter-julia", url = "tree-sitter/tree-sitter-julia", - version = "0.0.40-1" + version = "0.0.42-1" }, { name = "tree-sitter-just", url = "IndianBoy42/tree-sitter-just", @@ -1646,7 +1670,7 @@ return }, { name = "tree-sitter-lua", url = "tree-sitter-grammars/tree-sitter-lua", - version = "0.0.32-1" + version = "0.0.33-1" }, { name = "tree-sitter-luadoc", url = "tree-sitter-grammars/tree-sitter-luadoc", @@ -1678,7 +1702,7 @@ return }, { name = "tree-sitter-matlab", url = "acristoffers/tree-sitter-matlab", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-menhir", url = "Kerl13/tree-sitter-menhir", @@ -1694,7 +1718,7 @@ return }, { name = "tree-sitter-mlir", url = "artagnon/tree-sitter-mlir", - version = "0.0.43-1" + version = "0.0.44-1" }, { name = "tree-sitter-muttrc", url = "neomutt/tree-sitter-muttrc", @@ -1726,7 +1750,7 @@ return }, { name = "tree-sitter-nix", url = "cstrahan/tree-sitter-nix", - version = "0.0.54-1" + version = "0.0.56-1" }, { name = "tree-sitter-norg", url = "nvim-neorg/tree-sitter-norg", @@ -1742,11 +1766,11 @@ return }, { name = "tree-sitter-nu", url = "nushell/tree-sitter-nu", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-objc", url = "tree-sitter-grammars/tree-sitter-objc", - version = "0.0.30-1" + version = "0.0.31-1" }, { name = "tree-sitter-objdump", url = "ColinKennedy/tree-sitter-objdump", @@ -1754,15 +1778,15 @@ return }, { name = "tree-sitter-ocaml", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.38-1" + version = "0.0.39-1" }, { name = "tree-sitter-ocaml_interface", url = "tree-sitter/tree-sitter-ocaml", - version = "0.0.39-1" + version = "0.0.40-1" }, { name = "tree-sitter-ocamllex", url = "atom-ocaml/tree-sitter-ocamllex", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-odin", url = "tree-sitter-grammars/tree-sitter-odin", @@ -1790,15 +1814,15 @@ return }, { name = "tree-sitter-perl", url = "tree-sitter-perl/tree-sitter-perl", - version = "0.0.38-1" + version = "0.0.41-1" }, { name = "tree-sitter-php", url = "tree-sitter/tree-sitter-php", - version = "0.0.37-1" + version = "0.0.38-1" }, { name = "tree-sitter-php_only", url = "tree-sitter/tree-sitter-php", - version = "0.0.38-1" + version = "0.0.39-1" }, { name = "tree-sitter-phpdoc", url = "claytonrcarter/tree-sitter-phpdoc", @@ -1830,7 +1854,7 @@ return }, { name = "tree-sitter-printf", url = "tree-sitter-grammars/tree-sitter-printf", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-prisma", url = "victorhqc/tree-sitter-prisma", @@ -1882,7 +1906,7 @@ return }, { name = "tree-sitter-python", url = "tree-sitter/tree-sitter-python", - version = "0.0.39-1" + version = "0.0.40-1" }, { name = "tree-sitter-ql", url = "tree-sitter/tree-sitter-ql", @@ -1898,7 +1922,7 @@ return }, { name = "tree-sitter-query", url = "tree-sitter-grammars/tree-sitter-query", - version = "0.0.31-1" + version = "0.0.34-1" }, { name = "tree-sitter-r", url = "r-lib/tree-sitter-r", @@ -1915,6 +1939,10 @@ return name = "tree-sitter-rasi", url = "Fymyte/tree-sitter-rasi", version = "0.0.29-1" + }, { + name = "tree-sitter-razor", + url = "tris203/tree-sitter-razor", + version = "0.0.1-1" }, { name = "tree-sitter-rbs", url = "joker1007/tree-sitter-rbs", @@ -1966,11 +1994,11 @@ return }, { name = "tree-sitter-rst", url = "stsewd/tree-sitter-rst", - version = "0.0.31-1" + version = "0.0.32-1" }, { name = "tree-sitter-ruby", url = "tree-sitter/tree-sitter-ruby", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-runescript", url = "2004Scape/tree-sitter-runescript", @@ -1978,11 +2006,11 @@ return }, { name = "tree-sitter-rust", url = "tree-sitter/tree-sitter-rust", - version = "0.0.40-1" + version = "0.0.41-1" }, { name = "tree-sitter-scala", url = "tree-sitter/tree-sitter-scala", - version = "0.0.44-1" + version = "0.0.46-1" }, { name = "tree-sitter-scfg", url = "rockorager/tree-sitter-scfg", @@ -1998,7 +2026,7 @@ return }, { name = "tree-sitter-sflog", url = "aheber/tree-sitter-sfapex", - version = "0.0.42-1" + version = "0.0.44-1" }, { name = "tree-sitter-slang", url = "tree-sitter-grammars/tree-sitter-slang", @@ -2030,11 +2058,11 @@ return }, { name = "tree-sitter-soql", url = "aheber/tree-sitter-sfapex", - version = "0.0.44-1" + version = "0.0.46-1" }, { name = "tree-sitter-sosl", url = "aheber/tree-sitter-sfapex", - version = "0.0.42-1" + version = "0.0.44-1" }, { name = "tree-sitter-sourcepawn", url = "nilshelmig/tree-sitter-sourcepawn", @@ -2042,7 +2070,7 @@ return }, { name = "tree-sitter-sparql", url = "GordianDziwis/tree-sitter-sparql", - version = "0.0.29-1" + version = "0.0.30-1" }, { name = "tree-sitter-sql", url = "derekstride/tree-sitter-sql", @@ -2074,7 +2102,7 @@ return }, { name = "tree-sitter-superhtml", url = "kristoff-it/superhtml", - version = "0.0.12-1" + version = "0.0.13-1" }, { name = "tree-sitter-surface", url = "connorlay/tree-sitter-surface", @@ -2090,7 +2118,7 @@ return }, { name = "tree-sitter-swift", url = "alex-pinkus/tree-sitter-swift", - version = "0.0.44-1" + version = "0.0.45-1" }, { name = "tree-sitter-sxhkdrc", url = "RaafatTurki/tree-sitter-sxhkdrc", @@ -2126,7 +2154,7 @@ return }, { name = "tree-sitter-templ", url = "vrischmann/tree-sitter-templ", - version = "0.0.44-1" + version = "0.0.45-1" }, { name = "tree-sitter-terraform", url = "MichaHoffmann/tree-sitter-hcl", @@ -2166,7 +2194,7 @@ return }, { name = "tree-sitter-tsx", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.34-1" + version = "0.0.35-1" }, { name = "tree-sitter-turtle", url = "GordianDziwis/tree-sitter-turtle", @@ -2178,7 +2206,7 @@ return }, { name = "tree-sitter-typescript", url = "tree-sitter/tree-sitter-typescript", - version = "0.0.34-1" + version = "0.0.36-1" }, { name = "tree-sitter-typespec", url = "happenslol/tree-sitter-typespec", @@ -2190,7 +2218,7 @@ return }, { name = "tree-sitter-typst", url = "uben0/tree-sitter-typst", - version = "0.0.32-1" + version = "0.0.35-1" }, { name = "tree-sitter-udev", url = "tree-sitter-grammars/tree-sitter-udev", @@ -2214,7 +2242,7 @@ return }, { name = "tree-sitter-v", url = "vlang/v-analyzer", - version = "0.0.42-1" + version = "0.0.43-1" }, { name = "tree-sitter-vala", url = "vala-lang/tree-sitter-vala", @@ -2230,11 +2258,11 @@ return }, { name = "tree-sitter-vhdl", url = "jpt13653903/tree-sitter-vhdl", - version = "0.0.37-1" + version = "0.0.38-1" }, { name = "tree-sitter-vhs", url = "charmbracelet/tree-sitter-vhs", - version = "0.0.30-1" + version = "0.0.32-1" }, { name = "tree-sitter-vim", url = "tree-sitter-grammars/tree-sitter-vim", @@ -2274,7 +2302,7 @@ return }, { name = "tree-sitter-xml", url = "tree-sitter-grammars/tree-sitter-xml", - version = "0.0.35-1" + version = "0.0.36-1" }, { name = "tree-sitter-xresources", url = "ValdezFOmar/tree-sitter-xresources", @@ -2302,11 +2330,11 @@ return }, { name = "tree-sitter-ziggy", url = "kristoff-it/ziggy", - version = "0.0.8-1" + version = "0.0.9-1" }, { name = "tree-sitter-ziggy_schema", url = "kristoff-it/ziggy", - version = "0.0.8-1" + version = "0.0.9-1" }, { name = "treedoc.nvim", url = "neo451/treedoc.nvim", @@ -2314,7 +2342,7 @@ return }, { name = "trouble.nvim", url = "folke/trouble.nvim", - version = "3.7.0-1" + version = "3.7.1-1" }, { name = "ts-comments.nvim", url = "folke/ts-comments.nvim", @@ -2338,7 +2366,7 @@ return }, { name = "vgit.nvim", url = "tanvirtin/vgit.nvim", - version = "1.0.2-1" + version = "1.0.6-1" }, { name = "which-key.nvim", url = "folke/which-key.nvim", @@ -2350,7 +2378,7 @@ return }, { name = "winmove.nvim", url = "MisanthropicBit/winmove.nvim", - version = "0.1.1-1" + version = "0.1.2-1" }, { name = "wormhole.nvim", url = "NStefan002/wormhole.nvim", @@ -2363,10 +2391,14 @@ return name = "yanky.nvim", url = "gbprod/yanky.nvim", version = "2.0.0-1" + }, { + name = "yarepl.nvim", + url = "milanglacier/yarepl.nvim", + version = "0.10.1-1" }, { name = "yazi.nvim", url = "mikavilpas/yazi.nvim", - version = "7.5.1-1" + version = "7.5.4-1" }, { name = "zen-mode.nvim", url = "folke/zen-mode.nvim", From f81a3fb7feaf460ec7c8c983682b4a693b18fdd4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 15 Feb 2025 23:06:09 +0100 Subject: [PATCH 142/148] fix(meta): disable top-level specs before the rest. Closes #1889 --- lua/lazy/core/meta.lua | 26 +++++++++++++++++++------- lua/lazy/types.lua | 1 + 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 88263a2..5e026f4 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -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,16 +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 - if plugin.optional then - self:del(plugin.name) - else - self:disable(plugin) + local function check(top) + for _, plugin in pairs(self.plugins) do + if plugin._.top == 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 + end end end end + -- disable top-level plugins first, since they may have non-top-level frags + -- that disable other plugins + check(true) + self:rebuild() + -- then disable non-top-level plugins + check(false) self:rebuild() return changes end diff --git a/lua/lazy/types.lua b/lua/lazy/types.lua index 6e406bb..7700229 100644 --- a/lua/lazy/types.lua +++ b/lua/lazy/types.lua @@ -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 From e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 15 Feb 2025 23:09:58 +0100 Subject: [PATCH 143/148] test: fix tests --- lua/lazy/core/meta.lua | 2 +- tests/core/plugin_spec.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 5e026f4..0a55656 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -306,7 +306,7 @@ function M:fix_disabled() local changes = 0 local function check(top) for _, plugin in pairs(self.plugins) do - if plugin._.top == top then + 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 diff --git a/tests/core/plugin_spec.lua b/tests/core/plugin_spec.lua index 166dc2a..7982649 100644 --- a/tests/core/plugin_spec.lua +++ b/tests/core/plugin_spec.lua @@ -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 From a8c6db5da7bd382094606340eed015d14fbb5654 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Mon, 24 Feb 2025 07:20:35 +0100 Subject: [PATCH 144/148] style(types): add optional return value for `LazyKeysSpec` rhs (#1924) ## Description when `expr=true` the rhs function should return a string. example ```lua { keys = { { 'j', function() return require('dial.map').inc_normal() end, expr = true, desc = 'Increment value', } } } ``` ## Related Issue(s) ## Screenshots --- lua/lazy/core/handler/keys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/handler/keys.lua b/lua/lazy/core/handler/keys.lua index 57fbc18..5b5f173 100644 --- a/lua/lazy/core/handler/keys.lua +++ b/lua/lazy/core/handler/keys.lua @@ -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 From 96a205c8cea5476e5a87ed228acf2f221e4eae64 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 19:14:41 +0100 Subject: [PATCH 145/148] chore(main): release 11.17.0 (#1877) :robot: 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](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)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d5dbcb3..e392eaf 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.16.2" + ".": "11.17.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 015288e..d4dde26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [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) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 49339e5..16b5e2c 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -242,7 +242,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.16.2" -- x-release-please-version +M.version = "11.17.0" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy") From 1c9ba3704564a2e34a22191bb89678680ffeb245 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 25 Feb 2025 20:02:30 +0100 Subject: [PATCH 146/148] fix(bootstrap): support for older Neovim versions --- bootstrap.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap.lua b/bootstrap.lua index 88c1a44..c934c48 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -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", From d51cf6978321d659e68a8bc38ee806bd2517a196 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 25 Feb 2025 20:18:25 +0100 Subject: [PATCH 147/148] fix(meta): rebuild dirty right after disable. See #1889 --- lua/lazy/core/meta.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 0a55656..6fbdfc4 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -314,6 +314,7 @@ function M:fix_disabled() else self:disable(plugin) end + self:rebuild() end end end @@ -321,10 +322,8 @@ function M:fix_disabled() -- disable top-level plugins first, since they may have non-top-level frags -- that disable other plugins check(true) - self:rebuild() -- then disable non-top-level plugins check(false) - self:rebuild() return changes end From 6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 20:19:57 +0100 Subject: [PATCH 148/148] chore(main): release 11.17.1 (#1927) :robot: 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](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)) --- 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> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazy/core/config.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index e392eaf..dd77c5c 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.17.0" + ".": "11.17.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d4dde26..521777a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # 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) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 16b5e2c..603dd1a 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -242,7 +242,7 @@ function M.hererocks() return M.options.rocks.hererocks end -M.version = "11.17.0" -- x-release-please-version +M.version = "11.17.1" -- x-release-please-version M.ns = vim.api.nvim_create_namespace("lazy")