72 Commits

Author SHA1 Message Date
bfe810e15a feat: support explicit lazy=false 2025-01-01 21:59:11 +01:00
Marc Jakobi
ce8dca63fb chore(deps): update flake.lock (#114)
Flake lock file updates:

• Updated input 'neorocks':
    'github:nvim-neorocks/neorocks/d7d0bac66ca4712d40bf8ad30a79ba2353bcde7a?narHash=sha256-50Brt47i3P1DE/3mXw5NQZnW2ObI86xMwWOT7V%2Ba1ck%3D' (2024-11-02)
  → 'github:nvim-neorocks/neorocks/c1b3c1188de859d12a610a1c46d03558cc763634?narHash=sha256-oyDV65S7QY7uhzb2sADIvwPPkw2vwhqV8CIv0WAt1Kg%3D' (2024-11-09)
• Updated input 'neorocks/git-hooks':
    'github:cachix/git-hooks.nix/af8a16fe5c264f5e9e18bcee2859b40a656876cf?narHash=sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU%3D' (2024-10-30)
  → 'github:cachix/git-hooks.nix/d70155fdc00df4628446352fc58adc640cd705c2?narHash=sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF%2B06nOg%3D' (2024-11-05)
• Updated input 'neorocks/git-hooks/nixpkgs':
    'github:NixOS/nixpkgs/9693852a2070b398ee123a329e68f0dab5526681?narHash=sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs%3D' (2024-06-22)
  → 'github:NixOS/nixpkgs/a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc?narHash=sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE%3D' (2024-11-05)
• Updated input 'neorocks/git-hooks/nixpkgs-stable':
    'github:NixOS/nixpkgs/194846768975b7ad2c4988bdb82572c00222c0d7?narHash=sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo%3D' (2024-07-07)
  → 'github:NixOS/nixpkgs/d063c1dd113c91ab27959ba540c0d9753409edf3?narHash=sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo%3D' (2024-11-04)
• Updated input 'neorocks/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/f35afbe60a4ff71fd65fec3839fc38943f961951?narHash=sha256-FIdIaN7f6karwtDV65VXTV8VThNrR63nwykfgXpm4p4%3D' (2024-10-28)
  → 'github:nix-community/neovim-nightly-overlay/702364e6ec794961483eba5220ca531917d03784?narHash=sha256-8u8k3hnU5OxlXfhDLD3XEwAqv/M9Tb5USLCEPvXCPcM%3D' (2024-11-09)
• Updated input 'neorocks/neovim-nightly/flake-parts':
    'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1?narHash=sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0%3D' (2024-10-01)
  → 'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90?narHash=sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS%2Bb4tfNFCwE%3D' (2024-11-01)
• Updated input 'neorocks/neovim-nightly/git-hooks':
    'github:cachix/git-hooks.nix/3c3e88f0f544d6bb54329832616af7eb971b6be6?narHash=sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ%2B/nVtALHIciX/BI%3D' (2024-10-16)
  → 'github:cachix/git-hooks.nix/d70155fdc00df4628446352fc58adc640cd705c2?narHash=sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF%2B06nOg%3D' (2024-11-05)
• Updated input 'neorocks/neovim-nightly/hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/dba4367b9a9d9615456c430a6d6af716f6e84cef?narHash=sha256-MHHrHasTngp7EYQOObHJ1a/IsRF%2BwodHqOckhH6uZbk%3D' (2024-08-29)
  → 'github:hercules-ci/hercules-ci-effects/b89ac4d66d618b915b1f0a408e2775fe3821d141?narHash=sha256-mnynlrPeiW0nUQ8KGZHb3WyxAxA3Ye/BH8gMjdoKP6E%3D' (2024-11-06)
• Updated input 'neorocks/neovim-nightly/neovim-src':
    'github:neovim/neovim/852954ff6d96adce0158f74ca494fdcef3aa1921?narHash=sha256-c94xkA/RuszC4PfmB%2BMWqOo2vbO66GTO6XKer0mbltA%3D' (2024-10-16)
  → 'github:neovim/neovim/ad3472e291694b6c589d8a664459b03962eaac95?narHash=sha256-0uH8SSP6/eqCuDvUCV%2Bs1ZwjLg6512Vj9dgKKO0iEmE%3D' (2024-11-08)
• Updated input 'neorocks/neovim-nightly/nixpkgs':
    'github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732?narHash=sha256-DZBO2465PL5V89e8hFSJewyH4QbCPpW3ssws7ckT/0A%3D' (2024-10-13)
  → 'github:NixOS/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
• Updated input 'neorocks/nixpkgs':
    'github:nixos/nixpkgs/2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53?narHash=sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z%2Bw%3D' (2024-10-30)
  → 'github:nixos/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53?narHash=sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z%2Bw%3D' (2024-10-30)
  → 'github:nixos/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/af8a16fe5c264f5e9e18bcee2859b40a656876cf?narHash=sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU%3D' (2024-10-30)
  → 'github:cachix/pre-commit-hooks.nix/d70155fdc00df4628446352fc58adc640cd705c2?narHash=sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF%2B06nOg%3D' (2024-11-05)
• Updated input 'pre-commit-hooks/nixpkgs':
    'github:NixOS/nixpkgs/9693852a2070b398ee123a329e68f0dab5526681?narHash=sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs%3D' (2024-06-22)
  → 'github:NixOS/nixpkgs/a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc?narHash=sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE%3D' (2024-11-05)
• Updated input 'pre-commit-hooks/nixpkgs-stable':
    'github:NixOS/nixpkgs/194846768975b7ad2c4988bdb82572c00222c0d7?narHash=sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo%3D' (2024-07-07)
  → 'github:NixOS/nixpkgs/d063c1dd113c91ab27959ba540c0d9753409edf3?narHash=sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo%3D' (2024-11-04)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-11 18:52:45 +00:00
Marc Jakobi
988b7b3c9a fix(loader): support importing submodules (foo.bar) 2024-10-30 07:59:25 +01:00
Marc Jakobi
6325a21905 fix: setting lazy = false marks plugin as eager (#108) 2024-10-24 18:22:37 +00:00
Marc Jakobi
a7b445fd34 feat: lazy field for lazy-loading via trigger_load only (#105) 2024-10-21 17:28:23 +02:00
Marc Jakobi
8259302208 fix(hooks): regression preventing beforeAll from being run (#101) 2024-10-15 16:30:12 +02:00
Will Leinweber
1d1c5468f7 feat(load): take first module when multiple matches exist on the rtp (#94) 2024-09-18 14:53:19 +00:00
Marc Jakobi
33796eae1d feat: move handler field parsing logic to handlers (#92) 2024-09-16 22:47:28 +02:00
Marc Jakobi
bc619dd3b1 fix: error when applying colorscheme in after hook on event trigger (#86) 2024-08-31 13:06:25 +00:00
Birdee
ed9b8a4a1c feat(api): handler.post_load for setting up custom events (#82)
* feat(handler post_load): for setting up custom events
added a post_load callback for handlers to use to set
their own events such as DeferredUIEnter

In addition, made event handler use this feature to create DeferredUIEnter
further decoupling the handlers from the core of lz.n

* Update README.md

Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>

* Update lua/lz/n/meta.lua

Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>

---------

Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>
2024-08-30 08:13:48 +07:00
Marc Jakobi
a1d34cdf78 fix(vimdoc): missing lz.n.State field 2024-08-28 21:36:04 +02:00
Marc Jakobi
ef2194d277 fix(vimdoc): duplicate tag 2024-08-28 20:14:15 +02:00
Marc Jakobi
0d4eae4271 chore: fix luaCATS annotations 2024-08-28 17:36:38 +02:00
Marc Jakobi
180eb920f0 feat: support a simplified handler.state API without keys 2024-08-28 17:18:00 +02:00
Marc Jakobi
38befb0fc8 refactor: reduce redundant function declarations 2024-08-28 15:21:07 +02:00
Marc Jakobi
be2a049a63 refactor: remove redundant colorscheme priority 2024-08-28 19:49:31 +07:00
Marc Jakobi
efe92fa725 feat: handler.state module 2024-08-28 19:49:31 +07:00
Marc Jakobi
8611566831 feat: deprecate trigger_load with lists of plugin specs 2024-08-28 19:49:31 +07:00
Marc Jakobi
163b2471e2 fix: handler resilience against trigger_load calls in hooks 2024-08-28 19:49:31 +07:00
Marc Jakobi
dac14fb5db fix: lookup now returns deep copy (#74) 2024-08-28 07:48:58 +00:00
Marc Jakobi
c8c06af2ac feat: vimdoc (#65) 2024-08-26 17:44:38 +00:00
Marc Jakobi
9c74d06fdc feat(trigger_load): return list of skipped plugins instead of failing (#70) 2024-08-23 09:56:22 +02:00
Marc Jakobi
33a8b1945c feat(api): ability to filter plugin searches by handlers (#68) 2024-08-22 23:07:35 +00:00
Marc Jakobi
8667b60015 fix(loader): deterministic ordering when loading lists of plugins 2024-08-22 21:28:52 +02:00
Marc Jakobi
92c4199b44 docs(luacats): overload loader.load 2024-08-22 00:35:16 +02:00
Marc Jakobi
ed49bbeb3d docs(luacats): allow table of plugins in load 2024-08-22 00:31:29 +02:00
Marc Jakobi
7f1527cf38 refactor(loader): remove stateful loadable check 2024-08-22 00:06:57 +02:00
Marc Jakobi
e3c646b281 refactor(handlers): don't expose state (#64) 2024-08-20 21:50:17 +02:00
Marc Jakobi
e1a186da5c chore: warn on lookup missing 2024-08-20 13:46:17 +02:00
Marc Jakobi
701d6acc03 feat!: simplify state management + idempotent trigger_load (#56)
* feat!: simplify state management + idempotent `trigger_load(name)`

* feat!: `lz.n.Handler.del` now takes a plugin name (`string`)
2024-08-20 11:53:37 +02:00
Birdee
50c1454663 fix: altered loading order for startup plugins (#49)
some minor order changes to require('lz.n').load

This change is mostly to prevent issues with people doing
less-adviseable things such as calling trigger_load from places.

This ensures startup plugins have the same environment that the lazy ones do.

Namely, the ability to call trigger_load with a name instead of only being able to call trigger_load with a plugin spec, due to the plugin not yet being in state.
2024-08-17 13:51:27 +02:00
Marc Jakobi
7ba8692a5f fix: colorscheme handler broken for start plugins (#41) 2024-08-09 10:32:44 +02:00
Marc Jakobi
e0831fee31 fix: spec list with a single plugin spec ignored (#34) 2024-07-10 22:18:55 +02:00
Marc Jakobi
8886765a2f fix(keys): don't ignore modes that aren't 'n' (#28)
* fix(keys): don't ignore modes that aren't `'n'`

Fixes #26

* chore(deps): update flake.lock

* ci: remove docgen workflow
2024-06-29 15:37:28 +02:00
Birdee
1ac92fff5d fix: odd intermittent issue with load function (#21)
this issue is very confusing, but vim.iter causes a bug about 1 in 5
times with a new handler I was writing, but the previous version of this
function throws no errors. It also doesnt throw the error from my new
handler, but rather, from the event handler, and it mentions the
deferredUIEnter event?
2024-06-26 14:10:29 +02:00
Marc Jakobi
35f78241ef reactor: use vim.iter 2024-06-24 18:55:17 +02:00
Birdee
d61186fc23 feat: extend lz.n with custom handlers (#17)
added require('lz.n').register_handler(lz.n.HandlerSpec)

added lz.n.Plugin.extras for extra spec items from custom handlers.

feat: extend lz.n with custom handlers

feat: extend lz.n with custom handlers

added tests

Update spec/register_handler_spec.lua



Update spec/register_handler_spec.lua



feat: extend lz.n with custom handlers

Update README.md



Update lua/lz/n/handler/init.lua

Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>
2024-06-24 18:07:08 +02:00
Marc Jakobi
cf11ec2b16 fix(event): broken DeferredUIEnter event 2024-06-19 18:05:11 +02:00
Marc Jakobi
fa625dd864 fix: support /nix/store links 2024-06-19 17:48:15 +02:00
Marc Jakobi
5c3c2a1eb4 feat: support importing init.lua submodules 2024-06-18 18:06:05 +02:00
Marc Jakobi
d911029947 feat: support loading plugin spec lists and imports more than once 2024-06-18 17:58:40 +02:00
Marc Jakobi
5553dc52fa fix: actually support importing plugin specs from files 2024-06-17 19:26:19 +02:00
Marc Jakobi
2989fd3fe2 docs(lua): use overload type annnotation 2024-06-17 18:37:40 +02:00
Marc Jakobi
9fe735e6ca fix: colorscheme lists inserted into wrong table 2024-06-17 01:10:42 +02:00
Marc Jakobi
47a10afe2c fix: ensure individual plugins can only be registered once 2024-06-16 15:23:59 +02:00
Marc Jakobi
b9c03c1ed2 feat: register individual plugin specs for lazy loading
by passing a single spec to `load()`
2024-06-16 15:15:50 +02:00
Marc Jakobi
0a3b2c5e12 feat: add DeferredUIEnter user event 2024-06-15 11:40:42 +02:00
Marc Jakobi
d50e0e6d8d chore: tweak comment 2024-06-10 16:50:16 +02:00
Marc Jakobi
655ab06f46 feat: automatically increase priority if colorscheme is set 2024-06-10 15:48:57 +02:00
Marc Jakobi
d4a2eebb84 feat: handler for lazy-loading colorschemes 2024-06-10 15:43:25 +02:00