Compare commits

..

81 Commits

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

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

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

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

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

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

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


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


### Bug Fixes

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

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

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


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


### Bug Fixes

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

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

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


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


### Bug Fixes

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

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

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

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


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


### Bug Fixes

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

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

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


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


### Bug Fixes

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

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

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


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


### Features

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


### Bug Fixes

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

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-25 19:14:41 +01:00
Salomon Popp a8c6db5da7
style(types): add optional return value for `LazyKeysSpec` rhs (#1924)
## Description

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

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

example

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

## Related Issue(s)

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

## Screenshots

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

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

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

## Related Issue(s)

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

## Screenshots

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

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

Adds the missing space from a9c660d

## Screenshots

Current:


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

After:


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

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

## Screenshots

Before:


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

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


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


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


### Bug Fixes

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

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-13 19:58:17 +01:00
Folke Lemaitre 805b85c2ea
fix(meta): when a plugin is both optional and disabled, then just delete it from the list 2024-12-13 19:56:52 +01:00
github-actions[bot] 7c493713bc
chore(main): release 11.16.1 (#1844)
🤖 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](703be1dda3)),
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>
2024-12-10 20:12:21 +01:00
github-actions[bot] b97ee167f5 chore(build): auto-generate docs 2024-12-10 05:18:15 +00:00
Daemon 703be1dda3
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:
7b2d58537f.

Duplicate offending fields as optional in type `LazyPluginSpec`

Closes: #1842
2024-12-09 22:40:21 +01:00
github-actions[bot] 014d1d6d78
chore(main): release 11.16.0 (#1838)
🤖 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](ee64abc76b))


### Bug Fixes

* **plugin:** don't check if dir exists for virtual plugins
([656cf43](656cf43093))
* **render:** show correct key for home. Fixes
[#1796](https://github.com/folke/lazy.nvim/issues/1796)
([b08dba8](b08dba8107))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-07 21:44:18 +01:00
Folke Lemaitre 656cf43093
fix(plugin): don't check if dir exists for virtual plugins 2024-12-07 11:52:43 +01:00
Folke Lemaitre b08dba8107
fix(render): show correct key for home. Fixes #1796 2024-12-07 07:57:03 +01:00
Folke Lemaitre ee64abc76b
feat(plugin): added support for virtual plugins. Closes #1836 2024-12-06 20:28:53 +01:00
github-actions[bot] 3388a26417 chore(build): auto-generate rockspec mappings 2024-12-05 08:11:36 +00:00
github-actions[bot] a44e9cd165
chore(main): release 11.15.0 (#1835)
🤖 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](9570a5ae7b))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-05 09:10:16 +01:00
Folke Lemaitre 9570a5ae7b
feat(plugin): show error for local plugins that don't exist. Fixes #1773 2024-12-05 09:06:28 +01:00
github-actions[bot] 56ead98e05 chore(build): auto-generate rockspec mappings 2024-11-20 08:28:09 +00:00
Folke Lemaitre 7d0fe7615a
ci: docgen fixes 2024-11-20 09:24:28 +01:00
github-actions[bot] 8e11d208d6 chore(build): auto-generate docs 2024-11-20 08:13:59 +00:00
Folke Lemaitre 25749704e4
docs: docgen 2024-11-20 09:11:45 +01:00
Folke Lemaitre e41dffcbaf
docs: fix hl_group docgen 2024-11-20 09:08:44 +01:00
github-actions[bot] 7967abe557
chore(main): release 11.14.2 (#1730)
🤖 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](aca30f6361))
* **completion:** check if command string is a prefix of Lazy
([#1760](https://github.com/folke/lazy.nvim/issues/1760))
([e9fd76e](e9fd76e239)),
closes [#1758](https://github.com/folke/lazy.nvim/issues/1758)
* **docs:** always update helptags for local plugins
([60cf258](60cf258a9a))
* **luarocks:** try to install from root manifest
([#1687](https://github.com/folke/lazy.nvim/issues/1687))
([591ef40](591ef40f2d))
* **rocks:** add lib64 plugin directory to package.cpath
([#1717](https://github.com/folke/lazy.nvim/issues/1717))
([80da254](80da254e64))
* **rockspec:** allow binary lua files. Fixes
[#1800](https://github.com/folke/lazy.nvim/issues/1800)
([408449a](408449a59a))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-11 11:07:59 +01:00
Folke Lemaitre 60cf258a9a
fix(docs): always update helptags for local plugins 2024-11-10 07:28:51 +01:00
github-actions[bot] b1134ab82e chore(build): auto-generate rockspec mappings 2024-11-04 10:49:21 +00:00
Folke Lemaitre 408449a59a
fix(rockspec): allow binary lua files. Fixes #1800 2024-11-04 11:46:48 +01:00
github-actions[bot] cf8ecc2c5e chore(build): auto-generate rockspec mappings 2024-10-22 10:47:57 +00:00
Lorenzo Zabot 40dab7450e
style(typos): correct a few typos (#1776)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
This PR just fixes a few typos :)

`dont => don't`
## Related Issue(s)

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

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2024-10-22 12:43:33 +02:00
github-actions[bot] 1159bdccd8 chore(build): auto-generate rockspec mappings 2024-10-02 07:54:44 +00:00
Luna Saphie Mittelbach e9fd76e239
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
2024-10-02 09:52:51 +02:00
github-actions[bot] 460e1cd8f2 chore(build): auto-generate rockspec mappings 2024-09-16 08:17:41 +00:00
Folke Lemaitre aca30f6361
fix(bootstrap): single forward slash. Fixes #1747 2024-09-16 10:13:11 +02:00
github-actions[bot] 48b52b5cfc chore(build): auto-generate rockspec mappings 2024-08-31 07:03:18 +00:00
Marc Jakobi 591ef40f2d
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.
2024-08-31 08:59:45 +02:00
Roger Kim 80da254e64
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.
2024-08-31 08:58:43 +02:00
Christoph Zirkelbach 014a72b7a8
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
2024-08-31 08:57:58 +02:00
github-actions[bot] 077102c5bf
chore(main): release 11.14.1 (#1680)
🤖 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](7108809ab1))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-25 13:38:23 +02:00
Alexander Grebennik 7108809ab1
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/
```
2024-07-25 12:53:01 +02:00
github-actions[bot] 4496b4cad6
chore(main): release 11.14.0 (#1673)
🤖 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](d5686efbd0))
* **plugin:** improve error handling and show better error message
([c02268a](c02268ac6e))


### Bug Fixes

* **plugin:** make .lazy.lua work again
([b4a5a12](b4a5a1209e))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-24 07:38:49 +02:00
Folke Lemaitre b4a5a1209e
fix(plugin): make .lazy.lua work again 2024-07-24 07:23:36 +02:00
Folke Lemaitre c02268ac6e
feat(plugin): improve error handling and show better error message 2024-07-23 17:24:33 +02:00
Folke Lemaitre d5686efbd0
feat: added `opts.git.cooldown` to allow updating plugins on slow connections. Fixes #1656 2024-07-23 13:31:25 +02:00
github-actions[bot] 839f9e78e7
chore(main): release 11.13.5 (#1672)
🤖 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](7d29719ade))

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-22 14:41:58 +02:00
Folke Lemaitre 7d29719ade
fix(health): dont use vim.fn.system to get cmd versions 2024-07-22 14:38:00 +02:00
Folke Lemaitre cc028e77eb
ci: update 2024-07-22 14:24:40 +02:00
34 changed files with 2583 additions and 233 deletions

View File

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

View File

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

View File

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

View File

@ -5,6 +5,7 @@ on:
- cron: "30 1 * * *" - cron: "30 1 * * *"
jobs: jobs:
ci: stale:
if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner)
uses: folke/github/.github/workflows/stale.yml@main uses: folke/github/.github/workflows/stale.yml@main
secrets: inherit secrets: inherit

View File

@ -7,6 +7,7 @@ on:
- cron: "0 * * * *" - cron: "0 * * * *"
jobs: jobs:
ci: update:
if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner)
uses: folke/github/.github/workflows/update.yml@main uses: folke/github/.github/workflows/update.yml@main
secrets: inherit secrets: inherit

3
.markdownlint-cli2.yaml Normal file
View File

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

View File

@ -1,5 +1,131 @@
# Changelog # Changelog
## [11.17.5](https://github.com/folke/lazy.nvim/compare/v11.17.4...v11.17.5) (2025-11-06)
### Bug Fixes
* **luarocks:** proper parsing of dependency name. Closes [#2086](https://github.com/folke/lazy.nvim/issues/2086) ([5c09e6f](https://github.com/folke/lazy.nvim/commit/5c09e6fe71f4bb930eeffe24d45762fa3ffada4e))
## [11.17.4](https://github.com/folke/lazy.nvim/compare/v11.17.3...v11.17.4) (2025-11-04)
### Bug Fixes
* **plugin:** proper error message when a plugin spec returns more than one value. ([dfdc85e](https://github.com/folke/lazy.nvim/commit/dfdc85e18930a3f1643e83c8ed0c514ca85e49fa))
## [11.17.3](https://github.com/folke/lazy.nvim/compare/v11.17.2...v11.17.3) (2025-10-28)
### Bug Fixes
* **luarocks:** update to lumen-oss for binaries. Closes [#2060](https://github.com/folke/lazy.nvim/issues/2060). Closes [#2059](https://github.com/folke/lazy.nvim/issues/2059) ([e31789c](https://github.com/folke/lazy.nvim/commit/e31789c675e2f591a20fc894b6713398eaa5dddd))
## [11.17.2](https://github.com/folke/lazy.nvim/compare/v11.17.1...v11.17.2) (2025-10-23)
### Bug Fixes
* **luarocks:** add plugin to lua path if it was already loaded before we know its a luarock ([147f5a3](https://github.com/folke/lazy.nvim/commit/147f5a3f55b5491bbc77a55ce846ef5eb575fa42))
* **plugin:** check that path is actually in root dir. Closes [#2075](https://github.com/folke/lazy.nvim/issues/2075) ([16e5271](https://github.com/folke/lazy.nvim/commit/16e52715b70b4d0fc6af3563ccc0ed9df82ae23e))
* **stats:** better support for different `time_t` sizes. See [#2049](https://github.com/folke/lazy.nvim/issues/2049) ([1ea3c40](https://github.com/folke/lazy.nvim/commit/1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1))
## [11.17.1](https://github.com/folke/lazy.nvim/compare/v11.17.0...v11.17.1) (2025-02-25)
### Bug Fixes
* **bootstrap:** support for older Neovim versions ([1c9ba37](https://github.com/folke/lazy.nvim/commit/1c9ba3704564a2e34a22191bb89678680ffeb245))
* **meta:** rebuild dirty right after disable. See [#1889](https://github.com/folke/lazy.nvim/issues/1889) ([d51cf69](https://github.com/folke/lazy.nvim/commit/d51cf6978321d659e68a8bc38ee806bd2517a196))
## [11.17.0](https://github.com/folke/lazy.nvim/compare/v11.16.2...v11.17.0) (2025-02-24)
### Features
* **config,render:** allow customizing the debug icon ([#1863](https://github.com/folke/lazy.nvim/issues/1863)) ([a9c660d](https://github.com/folke/lazy.nvim/commit/a9c660d6ef1b396869d3d951760aa7a3dbfe575f))
* **util:** pass lang to `vim.notify` so that snacks notifier can render the ft. Closes [#1919](https://github.com/folke/lazy.nvim/issues/1919) ([c6a57a3](https://github.com/folke/lazy.nvim/commit/c6a57a3534d3494bcc5ff9b0586e141bdb0280eb))
### Bug Fixes
* **config:** add missing space on the default debug icon ([#1879](https://github.com/folke/lazy.nvim/issues/1879)) ([4df5c4d](https://github.com/folke/lazy.nvim/commit/4df5c4d65a3bbf801edd9ec55fb1ae55cfa72dd0))
* **meta:** disable top-level specs before the rest. Closes [#1889](https://github.com/folke/lazy.nvim/issues/1889) ([f81a3fb](https://github.com/folke/lazy.nvim/commit/f81a3fb7feaf460ec7c8c983682b4a693b18fdd4))
* **ui:** do not show virt_lines for messages ([#1904](https://github.com/folke/lazy.nvim/issues/1904)) ([f15a939](https://github.com/folke/lazy.nvim/commit/f15a93907ddad3d9139aea465ae18336d87f5ce6))
## [11.16.2](https://github.com/folke/lazy.nvim/compare/v11.16.1...v11.16.2) (2024-12-13)
### 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)
### 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)
### 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)
### 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)
### 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)
### 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)
### 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)
### 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) ## [11.13.4](https://github.com/folke/lazy.nvim/compare/v11.13.3...v11.13.4) (2024-07-22)

View File

@ -1,4 +1,4 @@
-- Lay Bootstrapper -- Lazy Bootstrapper
-- Usage: -- Usage:
-- ```lua -- ```lua
-- load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() -- load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
@ -6,19 +6,20 @@
local M = {} local M = {}
function M.setup() function M.setup()
local uv = vim.uv or vim.loop
if vim.env.LAZY_STDPATH then if vim.env.LAZY_STDPATH then
local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p") local root = vim.fn.fnamemodify(vim.env.LAZY_STDPATH, ":p"):gsub("[\\/]$", "")
for _, name in ipairs({ "config", "data", "state", "cache" }) do for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end end
end end
if vim.env.LAZY_PATH and not vim.uv.fs_stat(vim.env.LAZY_PATH) then if vim.env.LAZY_PATH and not uv.fs_stat(vim.env.LAZY_PATH) then
vim.env.LAZY_PATH = nil vim.env.LAZY_PATH = nil
end end
local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.env.LAZY_PATH or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.env.LAZY_PATH and not (vim.uv or vim.loop).fs_stat(lazypath) then if not vim.env.LAZY_PATH and not uv.fs_stat(lazypath) then
vim.api.nvim_echo({ vim.api.nvim_echo({
{ {
"Cloning lazy.nvim\n\n", "Cloning lazy.nvim\n\n",

View File

@ -540,9 +540,7 @@ function.
keys = { keys = {
{ "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" }, { "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
}, },
config = function() opts = {},
require("neo-tree").setup()
end,
} }
< <
@ -646,24 +644,42 @@ will be added to the plugins spec.
-- then set the below to false. This should work, but is NOT supported and will -- then set the below to false. This should work, but is NOT supported and will
-- increase downloads a lot. -- increase downloads a lot.
filter = true, 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 = { pkg = {
enabled = true, enabled = true,
cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", 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. -- the first package source that is found for a plugin will be used.
sources = { sources = {
"lazy", "lazy",
"rockspec", "rockspec", -- will only be used when rocks.enabled is true
"packspec", "packspec",
}, },
}, },
rocks = { rocks = {
enabled = true,
root = vim.fn.stdpath("data") .. "/lazy-rocks", root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/", server = "https://lumen-oss.github.io/rocks-binaries/",
-- use hererocks to install luarocks?
-- set to `nil` to use hererocks when luarocks is not found
-- set to `true` to always use hererocks
-- set to `false` to always use luarocks
hererocks = nil,
}, },
dev = { 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", path = "~/projects",
---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
patterns = {}, -- For example {"folke"} patterns = {}, -- For example {"folke"}
@ -690,6 +706,7 @@ will be added to the plugins spec.
icons = { icons = {
cmd = " ", cmd = " ",
config = "", config = "",
debug = "● ",
event = " ", event = " ",
favorite = " ", favorite = " ",
ft = " ", ft = " ",
@ -715,7 +732,7 @@ will be added to the plugins spec.
-- leave nil, to automatically select a browser depending on your OS. -- leave nil, to automatically select a browser depending on your OS.
-- If you want to use a specific browser, you can define it here -- If you want to use a specific browser, you can define it here
browser = nil, ---@type string? 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 = { custom_keys = {
-- You can define custom key maps here. If present, the description will -- You can define custom key maps here. If present, the description will
-- be shown in the help menu. -- be shown in the help menu.
@ -730,6 +747,16 @@ will be added to the plugins spec.
desc = "Open lazygit log", desc = "Open lazygit log",
}, },
["<localleader>i"] = {
function(plugin)
Util.notify(vim.inspect(plugin), {
title = "Inspect " .. plugin.name,
lang = "lua",
})
end,
desc = "Inspect Plugin",
},
["<localleader>t"] = { ["<localleader>t"] = {
function(plugin) function(plugin)
require("lazy.util").float_term(nil, { require("lazy.util").float_term(nil, {
@ -740,6 +767,17 @@ will be added to the plugins 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 = {
-- diff command <d> can be one of: -- diff command <d> can be one of:
-- * browser: opens the github compare view. Note that this is always mapped to <K> as well, -- * browser: opens the github compare view. Note that this is always mapped to <K> as well,
@ -791,7 +829,7 @@ will be added to the plugins spec.
enabled = true, enabled = true,
root = vim.fn.stdpath("state") .. "/lazy/readme", root = vim.fn.stdpath("state") .. "/lazy/readme",
files = { "README.md", "lua/**/README.md" }, 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, skip_if_doc_exists = true,
}, },
state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
@ -837,6 +875,8 @@ If you dont want to use a Nerd Font, you can replace the icons with Unicode s
----------------------------------------------------------------------- -----------------------------------------------------------------------
Highlight Group Default Group Description Highlight Group Default Group Description
----------------------- ----------------------- ----------------------- ----------------------- ----------------------- -----------------------
LazyBold { bold = true }
LazyButton CursorLine LazyButton CursorLine
LazyButtonActive Visual LazyButtonActive Visual
@ -857,10 +897,16 @@ If you dont want to use a Nerd Font, you can replace the icons with Unicode s
LazyDir @markup.link directory LazyDir @markup.link directory
LazyError DiagnosticError task errors
LazyH1 IncSearch home button LazyH1 IncSearch home button
LazyH2 Bold titles LazyH2 Bold titles
LazyInfo DiagnosticInfo task errors
LazyItalic { italic = true }
LazyLocal Constant LazyLocal Constant
LazyNoCond DiagnosticWarn unloaded icon for a LazyNoCond DiagnosticWarn unloaded icon for a
@ -897,13 +943,13 @@ If you dont want to use a Nerd Font, you can replace the icons with Unicode s
LazySpecial @punctuation.special LazySpecial @punctuation.special
LazyTaskError ErrorMsg task errors
LazyTaskOutput MsgArea task output LazyTaskOutput MsgArea task output
LazyUrl @markup.link url LazyUrl @markup.link url
LazyValue @string value of a property LazyValue @string value of a property
LazyWarning DiagnosticWarn task errors
----------------------------------------------------------------------- -----------------------------------------------------------------------
============================================================================== ==============================================================================

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,10 @@ M.defaults = {
rate = 2, rate = 2,
duration = 5 * 1000, -- in ms 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 = { pkg = {
enabled = true, enabled = true,
@ -55,7 +59,7 @@ M.defaults = {
rocks = { rocks = {
enabled = true, enabled = true,
root = vim.fn.stdpath("data") .. "/lazy-rocks", root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/", server = "https://lumen-oss.github.io/rocks-binaries/",
-- use hererocks to install luarocks? -- use hererocks to install luarocks?
-- set to `nil` to use hererocks when luarocks is not found -- set to `nil` to use hererocks when luarocks is not found
-- set to `true` to always use hererocks -- set to `true` to always use hererocks
@ -63,7 +67,9 @@ M.defaults = {
hererocks = nil, hererocks = nil,
}, },
dev = { 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", path = "~/projects",
---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
patterns = {}, -- For example {"folke"} patterns = {}, -- For example {"folke"}
@ -90,6 +96,7 @@ M.defaults = {
icons = { icons = {
cmd = "", cmd = "",
config = "", config = "",
debug = "",
event = "", event = "",
favorite = "", favorite = "",
ft = "", ft = "",
@ -212,7 +219,7 @@ M.defaults = {
enabled = true, enabled = true,
root = vim.fn.stdpath("state") .. "/lazy/readme", root = vim.fn.stdpath("state") .. "/lazy/readme",
files = { "README.md", "lua/**/README.md" }, 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, skip_if_doc_exists = true,
}, },
state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
@ -235,7 +242,7 @@ function M.hererocks()
return M.options.rocks.hererocks return M.options.rocks.hererocks
end end
M.version = "11.13.4" -- x-release-please-version M.version = "11.17.5" -- x-release-please-version
M.ns = vim.api.nvim_create_namespace("lazy") M.ns = vim.api.nvim_create_namespace("lazy")

View File

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

View File

@ -341,7 +341,9 @@ function M._load(plugin, reason, opts)
Util.track({ plugin = plugin.name, start = reason.start }) Util.track({ plugin = plugin.name, start = reason.start })
Handler.disable(plugin) Handler.disable(plugin)
if not plugin.virtual then
M.add_to_rtp(plugin) M.add_to_rtp(plugin)
end
if plugin._.pkg and plugin._.pkg.source == "rockspec" then if plugin._.pkg and plugin._.pkg.source == "rockspec" then
M.add_to_luapath(plugin) M.add_to_luapath(plugin)
@ -353,7 +355,9 @@ function M._load(plugin, reason, opts)
end, "Failed to load deps for " .. plugin.name) end, "Failed to load deps for " .. plugin.name)
end end
if not plugin.virtual then
M.packadd(plugin.dir) M.packadd(plugin.dir)
end
if plugin.config or plugin.opts then if plugin.config or plugin.opts then
M.config(plugin) M.config(plugin)
end end
@ -493,8 +497,11 @@ function M.add_to_luapath(plugin)
local root = Config.options.rocks.root .. "/" .. plugin.name local root = Config.options.rocks.root .. "/" .. plugin.name
local path = root .. "/share/lua/5.1" local path = root .. "/share/lua/5.1"
local cpath = root .. "/lib/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.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 .. ";" .. cpath .. "/?." .. (jit.os:find("Windows") and "dll" or "so") .. ";"
package.cpath = package.cpath .. ";" .. cpath2 .. "/?." .. (jit.os:find("Windows") and "dll" or "so") .. ";"
end end
function M.source(path) function M.source(path)

View File

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

View File

@ -146,33 +146,47 @@ function Spec:import(spec)
local imported = 0 local imported = 0
---@type (string|(fun():LazyPluginSpec))[] ---@type {modname: string, load: fun():(LazyPluginSpec?, string?)}[]
local modspecs = {} local modspecs = {}
if type(import) == "string" then if type(import) == "string" then
Util.lsmod(import, function(modname, modpath) Util.lsmod(import, function(modname, modpath)
modspecs[#modspecs + 1] = modname modspecs[#modspecs + 1] = {
package.preload[modname] = function() modname = modname,
return loadfile(modpath)() load = function()
local mod, err = loadfile(modpath)
if mod then
local ret, foo = mod()
if foo then
return nil, "Spec module returned more than one value. Expected a single value."
end end
end) return ret
table.sort(modspecs)
else else
modspecs = { spec.import } return nil, err
end
end,
}
end)
table.sort(modspecs, function(a, b)
return a.modname < b.modname
end)
else
modspecs = { { modname = import_name, load = spec.import } }
end end
for _, modspec in ipairs(modspecs) do for _, modspec in ipairs(modspecs) do
imported = imported + 1 imported = imported + 1
local modname = type(modspec) == "string" and modspec or import_name local modname = modspec.modname
Util.track({ import = modname }) Util.track({ import = modname })
self.importing = modname self.importing = modname
-- unload the module so we get a clean slate -- unload the module so we get a clean slate
---@diagnostic disable-next-line: no-unknown ---@diagnostic disable-next-line: no-unknown
package.loaded[modname] = nil package.loaded[modname] = nil
Util.try(function() Util.try(function()
local mod = type(modspec) == "function" and modspec() or require(modspec) local mod, err = modspec.load()
if type(mod) ~= "table" then if err then
self.importing = nil self:error("Failed to load `" .. modname .. "`:\n" .. err)
elseif type(mod) ~= "table" then
return self:error( return self:error(
"Invalid spec module: `" "Invalid spec module: `"
.. modname .. modname
@ -180,21 +194,20 @@ function Spec:import(spec)
.. type(mod) .. type(mod)
.. "` was returned instead" .. "` was returned instead"
) )
end else
self:normalize(mod) self:normalize(mod)
self.importing = nil end
Util.track()
end, { end, {
msg = "Failed to load `" .. modname .. "`", msg = "Failed to load `" .. modname .. "`",
on_error = function(msg) on_error = function(msg)
self:error(msg) self:error(msg)
self.importing = nil
Util.track()
end, end,
}) })
self.importing = nil
Util.track()
end end
if imported == 0 then 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
end end
@ -228,12 +241,15 @@ function M.update_state()
or plugin.cmd or plugin.cmd
plugin.lazy = lazy and true or false plugin.lazy = lazy and true or false
end 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 plugin._.installed = installed[plugin.name] ~= nil
installed[plugin.name] = nil installed[plugin.name] = nil
else else
plugin._.is_local = true plugin._.is_local = true
plugin._.installed = true -- local plugins are managed by the user plugin._.installed = vim.fn.isdirectory(plugin.dir) == 1
end end
end end

View File

@ -270,7 +270,7 @@ function M.get_unloaded_rtp(modname, opts)
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
if Config.spec then if Config.spec then
for _, plugin in pairs(Config.spec.plugins) do 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 if norm == M.normname(plugin.name) then
table.insert(rtp, 1, plugin.dir) table.insert(rtp, 1, plugin.dir)
else else
@ -374,6 +374,7 @@ function M.notify(msg, opts)
local lang = opts.lang or "markdown" local lang = opts.lang or "markdown"
local n = opts.once and vim.notify_once or vim.notify local n = opts.once and vim.notify_once or vim.notify
n(msg, opts.level or vim.log.levels.INFO, { n(msg, opts.level or vim.log.levels.INFO, {
ft = lang,
on_open = function(win) on_open = function(win)
local ok = pcall(function() local ok = pcall(function()
vim.treesitter.language.add("markdown") vim.treesitter.language.add("markdown")

View File

@ -61,7 +61,11 @@ end
---@return string ---@return string
function M.extract(file, pattern) function M.extract(file, pattern)
local init = Util.read_file(file) local init = Util.read_file(file)
return assert(init:match(pattern)) local ret = assert(init:match(pattern)) --[[@as string]]
local lines = vim.tbl_filter(function(line)
return not line:find("^%s*%-%-%s*stylua%s*:%s*ignore%s*$")
end, vim.split(ret, "\n"))
return table.concat(lines, "\n")
end end
---@return ReadmeBlock ---@return ReadmeBlock
@ -131,7 +135,8 @@ function M.colors(opts)
{ "---", "---", "---" }, { "---", "---", "---" },
} }
Util.foreach(require(opts.modname).colors, function(group, link) Util.foreach(require(opts.modname).colors, function(group, 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) end)
return { content = M.table(lines) } return { content = M.table(lines) }
end end

View File

@ -1,4 +1,5 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local Process = require("lazy.manage.process")
local uv = vim.uv or vim.loop local uv = vim.uv or vim.loop
local M = {} local M = {}
@ -36,11 +37,11 @@ function M.have(cmd, opts)
local found local found
for _, c in ipairs(cmd) do for _, c in ipairs(cmd) do
if vim.fn.executable(c) == 1 then if vim.fn.executable(c) == 1 then
local version = vim.fn.system(c .. " " .. opts.version) or "" local out, exit_code = Process.exec({ c, opts.version })
if vim.v.shell_error ~= 0 then if exit_code ~= 0 then
opts.error(("failed to get version of {%s}\n%s"):format(c, version)) opts.error(("failed to get version of {%s}\n%s"):format(c, table.concat(out, "\n")))
else else
version = vim.trim(vim.split(version, "\n")[1]) local version = vim.trim(out[1] or "")
version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "") version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "")
if opts.version_pattern and not version:find(opts.version_pattern, 1, true) then 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)) opts.warn(("`%s` version `%s` needed, but found `%s`"):format(c, opts.version_pattern, version))

View File

@ -80,6 +80,7 @@ function M.install(opts)
opts = M.opts(opts, { mode = "install" }) opts = M.opts(opts, { mode = "install" })
return M.run({ return M.run({
pipeline = { pipeline = {
"plugin.exists",
"git.clone", "git.clone",
{ "git.checkout", lockfile = opts.lockfile }, { "git.checkout", lockfile = opts.lockfile },
"plugin.docs", "plugin.docs",
@ -108,6 +109,7 @@ function M.update(opts)
opts = M.opts(opts, { mode = "update" }) opts = M.opts(opts, { mode = "update" })
return M.run({ return M.run({
pipeline = { pipeline = {
"plugin.exists",
"git.origin", "git.origin",
"git.branch", "git.branch",
"git.fetch", "git.fetch",
@ -147,6 +149,7 @@ function M.check(opts)
opts = opts or {} opts = opts or {}
return M.run({ return M.run({
pipeline = { pipeline = {
"plugin.exists",
{ "git.origin", check = true }, { "git.origin", check = true },
"git.fetch", "git.fetch",
"git.status", "git.status",

View File

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

View File

@ -40,6 +40,15 @@ function throttle.wait()
end end
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<string, LazyTaskDef> ---@type table<string, LazyTaskDef>
local M = {} local M = {}
@ -266,7 +275,7 @@ M.status = {
-- fetches all needed origin branches -- fetches all needed origin branches
M.fetch = { M.fetch = {
skip = function(plugin) skip = function(plugin)
return not plugin._.installed or plugin._.is_local return not plugin._.installed or plugin._.is_local or cooldown(plugin)
end, end,
---@async ---@async
@ -287,6 +296,11 @@ M.fetch = {
self:spawn("git", { self:spawn("git", {
args = args, args = args,
cwd = self.plugin.dir, cwd = self.plugin.dir,
on_exit = function(ok)
if ok then
self.plugin._.last_check = vim.uv.now()
end
end,
}) })
end, end,
} }
@ -321,7 +335,7 @@ M.checkout = {
end end
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 -- unless we just cloned, since then we won't have any data yet
if Git.eq(info, target) and info.branch == target.branch then if Git.eq(info, target) and info.branch == target.branch then
self.plugin._.updated = { self.plugin._.updated = {

View File

@ -87,14 +87,25 @@ M.build = {
M.docs = { M.docs = {
skip = function(plugin) skip = function(plugin)
return not plugin._.dirty return not plugin._.is_local and not plugin._.dirty
end, end,
run = function(self) run = function(self)
local docs = self.plugin.dir .. "/doc/" local docs = self.plugin.dir .. "/doc"
if Util.file_exists(docs) then if Util.file_exists(docs) then
self:log(vim.api.nvim_cmd({ cmd = "helptags", args = { docs } }, { output = true })) self:log(vim.api.nvim_cmd({ cmd = "helptags", args = { docs } }, { output = true }))
end end
end, end,
} }
M.exists = {
skip = function(plugin)
return not plugin._.is_local or plugin.virtual
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 return M

View File

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

View File

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

View File

@ -172,7 +172,6 @@ function M.build(task)
root, root,
"--server", "--server",
Config.options.rocks.server, Config.options.rocks.server,
"--dev",
"--lua-version", "--lua-version",
"5.1", "5.1",
"install", -- use install so that we can make use of pre-built rocks "install", -- use install so that we can make use of pre-built rocks
@ -225,9 +224,10 @@ end
---@return table? ---@return table?
function M.parse(file) function M.parse(file)
local ret = {} local ret = {}
return pcall(function() local ok = pcall(function()
loadfile(file, "t", ret)() loadfile(file, nil, ret)()
end) and ret or nil end) and ret or nil
return ok and ret or nil
end end
---@param plugin LazyPlugin ---@param plugin LazyPlugin
@ -285,7 +285,10 @@ function M.get(plugin)
---@param dep string ---@param dep string
local rocks = vim.tbl_filter(function(dep) local rocks = vim.tbl_filter(function(dep)
local name = dep:gsub("%s.*", "") local name = dep:match("^%s*([^~><=%s]+)")
if not name then
return false
end
local url = Community.get_url(name) local url = Community.get_url(name)
local spec = Community.get_spec(name) local spec = Community.get_spec(name)

View File

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

View File

@ -10,6 +10,7 @@
---@field dirty? boolean ---@field dirty? boolean
---@field build? boolean ---@field build? boolean
---@field frags? number[] ---@field frags? number[]
---@field top? boolean
---@field handlers? LazyPluginHandlers ---@field handlers? LazyPluginHandlers
---@field installed? boolean ---@field installed? boolean
---@field is_local? boolean ---@field is_local? boolean
@ -20,6 +21,7 @@
---@field tasks? LazyTask[] ---@field tasks? LazyTask[]
---@field updated? {from:string, to:string} ---@field updated? {from:string, to:string}
---@field updates? {from:GitInfo, to:GitInfo} ---@field updates? {from:GitInfo, to:GitInfo}
---@field last_check? number
---@field working? boolean ---@field working? boolean
---@field pkg? LazyPkg ---@field pkg? LazyPkg
@ -59,6 +61,7 @@
---@field priority? number Only useful for lazy=false plugins to force loading certain plugins first. Default priority is 50 ---@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 dev? boolean If set, then link to the respective folder under your ~/projects
---@field rocks? string[] ---@field rocks? string[]
---@field virtual? boolean virtual plugins won't be installed or added to the rtp.
---@class LazyPlugin: LazyPluginBase,LazyPluginHandlers,LazyPluginHooks,LazyPluginRef ---@class LazyPlugin: LazyPluginBase,LazyPluginHandlers,LazyPluginHooks,LazyPluginRef
---@field dependencies? string[] ---@field dependencies? string[]
@ -73,6 +76,8 @@
---@field module? false ---@field module? false
---@class LazyPluginSpec: LazyPluginBase,LazyPluginSpecHandlers,LazyPluginHooks,LazyPluginRef ---@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 dependencies? string|string[]|LazyPluginSpec[]
---@field specs? string|string[]|LazyPluginSpec[] ---@field specs? string|string[]|LazyPluginSpec[]

View File

@ -146,7 +146,7 @@ end
---@return string, string[] ---@return string, string[]
function M.parse(args) function M.parse(args)
local parts = vim.split(vim.trim(args), "%s+") 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) table.remove(parts, 1)
end end
if args:sub(-1) == " " then if args:sub(-1) == " " then

View File

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

View File

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

View File

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

View File

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

19
vim.yml Normal file
View File

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