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
923e1aa7a4
fix(plugin): local spec name
2024-07-04 16:16:39 +02:00
Folke Lemaitre
a9d7ade203
perf(plugin): minor optim to resolve imports a bit faster
2024-07-01 07:07:49 +02:00
Folke Lemaitre
9ab3061690
perf(rocks): `vim.fn.executable` is slow on WSL2, so only check for `luarocks` when needed. Closes #1585
2024-06-29 11:44:31 +02:00
Folke Lemaitre
695a05872a
feat(plugin): allow loading specs without pkg
2024-06-29 10:18:33 +02:00
Folke Lemaitre
804cae0a65
refactor: hererocks check
2024-06-26 19:39:28 +02:00
Folke Lemaitre
6c7ef7e27a
refactor: logging
2024-06-26 18:31:31 +02:00
Folke Lemaitre
6b8bf58ebf
feat(rocks): simple rockspecs are now fully resolved by lazy without luarocks. See #1548
2024-06-25 20:53:42 +02:00
Folke Lemaitre
7d3f69104f
fix(rocks): better errors / warnings when something goes wrong with luarocks
2024-06-25 13:23:25 +02:00
Folke Lemaitre
d87da76679
feat(rocks): use hererocks to install luarocks when luarocks is not found
2024-06-25 07:55:30 +02:00
Folke Lemaitre
1446f6cfbb
perf: minimize meta rebuild when loading specs
2024-06-24 21:56:43 +02:00
Folke Lemaitre
105d4805ad
fix(runner): sync package specs after installing and before building
2024-06-24 19:38:33 +02:00
Folke Lemaitre
146de4e801
fix(rocks): dont trigger rebuild for luarocks when build is overriden
2024-06-24 17:36:59 +02:00
Folke Lemaitre
dbffad6f44
fix(fragments): prevent adding the same spec instance more than once
2024-06-24 17:15:10 +02:00
Folke Lemaitre
fcfd54835d
feat: spec.rocks is no longer needed & added support for installing any luarock
2024-06-24 17:15:10 +02:00
Folke Lemaitre
fd8229d6e3
fix(pkg): versioning and reload specs when pkg-cache is dirty
2024-06-24 17:15:10 +02:00
Folke Lemaitre
4326d4b487
fix(pkg): correctly pre-load package specs and remove them when needed during resolve
2024-06-24 17:15:10 +02:00
Folke Lemaitre
d2bea9eefd
docs: added doc comments
2024-06-24 17:15:10 +02:00
Folke Lemaitre
75ffe56f70
feat: rewrite of spec resolving
2024-06-24 17:15:10 +02:00
Folke Lemaitre
3be55a4615
feat: added support for plugin packages by lazy, rockspec and packspec
2024-06-24 17:15:10 +02:00
Folke Lemaitre
f1ba2e3d05
feat: luarocks support
2024-06-24 17:15:10 +02:00
Folke Lemaitre
8eba74c3fc
feat: packspec
2024-06-24 17:15:10 +02:00
Folke Lemaitre
b4316da731
fix(plugin): rebuild optional when needed and remove frags from parent deps. Fixes #1402
2024-06-16 15:52:33 +02:00
Folke Lemaitre
be5dfba542
fix(plugin): better way of dealing with local specs. Fixes #1524
2024-06-16 07:09:33 +02:00
Folke Lemaitre
e2e10d9cbe
feat: find local_spec in parent directories as well. Closes #1519
2024-06-15 09:28:58 +02:00
Folke Lemaitre
067fd41933
fix(plugin): check optional plugins again after resolving enabled. Fixes #1402
2024-06-15 09:11:36 +02:00
Folke Lemaitre
1f7b720cff
feat(plugin): `opts_extend` can be a list of dotted keys that will be extended instead of merged
2024-06-07 09:02:52 +02:00
Zhizhen He
f39c79fcb1
style: fix some typo ( #1496 )
2024-06-03 09:18:43 +02:00
Folke Lemaitre
9dde1f1bce
feat: added support for local spec files `.lazy.lua`
2024-05-26 16:43:52 +02:00
atusy
a6f782adc1
feat(plugin): dev.path can now be a function ( #1157 )
...
In some case, `dev.path .. plugin.name` is not enoguh.
For example, when using `ghq` to manage projects, plugin directories may
vary by onewrs of the plugins.
With this change, users can do something like below
``` lua
require("lazy").setup("plugins", {
dev = {
path = function(p)
-- ghq
local path, cnt = string.gsub(p.url, "^https://(.*)%.git$ ", "~/ghq/%1")
if cnt == 1 then
return path
end
-- fallback to default
return "~/projects/" .. plugin.name
end,
},
})
```
2024-01-20 14:19:09 +01:00
Folke Lemaitre
c1b9887373
perf(plugin): cache lazy handler values
2023-10-16 23:04:57 +02:00
Folke Lemaitre
2f169e74d4
refactor(handlers): lazy resolving of plugin handlers ( #1126 )
...
* refactor(handlers): lazy resolving of plugin handlers
* test: fixed tests
2023-10-16 22:34:44 +02:00
Folke Lemaitre
2270bbbc48
fix(plugin): work-around for Plugin.values error. Will add proper fix later. Fixes #1124
2023-10-16 18:11:02 +02:00
Folke Lemaitre
1cfd6d1f36
fix(loader): don't load handlers before installing plugins
2023-10-16 15:05:16 +02:00
Folke Lemaitre
c8e2091e6d
fix(plugin): dont allow `dir` changes when we already loaded files from the plugin's old dir. Show an error in this case. Fixes #993
2023-10-15 08:51:54 +02:00
Folke Lemaitre
3dc413d6fd
fix(plugin): improved dir/dev merging. Fixes #993
2023-10-15 08:36:15 +02:00
Folke Lemaitre
0c53d4673f
feat(plugin): treat url changes as warnings. They will only be shown with checkhealth
2023-10-14 23:07:01 +02:00
Folke Lemaitre
22bf6ae04b
style: sort requires
2023-10-09 11:25:42 +02:00
abeldekat
58e954a735
feat(plugin): added support for `cond` for imports ( #1079 )
...
Co-authored-by: abeldekat <abel@nomail.com>
2023-10-06 15:46:46 +02:00
Folke Lemaitre
82da5a0048
refactor(plugin): refactored rebuild
2023-10-04 12:50:48 +02:00
Folke Lemaitre
638c8e6382
fix(plugin): rebuild plugins after fixing optional and cond to ensure enabled will work correctly
2023-10-04 11:48:14 +02:00
Folke Lemaitre
8eb8de29af
feat(plugin): keep track of the module a spec fragment was defined in
2023-10-04 00:20:08 +02:00
Folke Lemaitre
09e5010741
fix(plugin): prevent recursive loop with cond=false. Fixes #1061
2023-09-30 18:02:07 +02:00
Folke Lemaitre
6a2c47e642
style: lua annotations
2023-09-29 16:37:55 +02:00
Folke Lemaitre
f3c7169dd6
feat(plugin): dont include plugin spec fragments for disabled or optional plugins ( #1058 )
...
* feat(plugin): dont include plugin spec fragments for disabled or optional plugins
* test: fixed tests
* fix(plugin): calculate handlers after disabling plugins
* fix(plugin): clear Plugin._.super when rebuilding
* fix(ui): dont process handlers for disabled plugins
* test: added tests for disabling fragments
* fix(plugin): ignore any installed deps of a disabled conditional plugin. Fixes #1053
2023-09-29 16:11:56 +02:00
abeldekat
e7334d8db5
feat(plugins): Given an optional plugin, conditionally discard deps ( #947 )
...
* deps_of_all_optional: First, refactor the code responsible for disabling unneeded deps to be more generic
* deps_of_all_optional: Second, also disable unneeded deps from plugins marked as all optional
* deps_of_all_optional: add tests proving unneeded optional deps are now also discarded
* deps_of_all_optional: forgot return type
---------
Co-authored-by: abeldekat <abel@nomail.com>
2023-07-22 10:20:52 +02:00
Folke Lemaitre
fbb0bea2db
feat(plugin)!: `cond` is now the same as `enabled`, but skips clean
2023-07-06 15:30:01 +02:00
Folke Lemaitre
42ff6009f6
fix(plugin): fixup. It's fine that Plugin.url doesn't exist
2023-05-27 08:49:45 +02:00
Folke Lemaitre
199e100464
fix(plugin): delay check if plugin ref exists until after loading all plugins. Fixes #833
2023-05-27 08:45:14 +02:00