Commit graph

12 commits

Author SHA1 Message Date
Heitor Augusto
a6eda59091 plugins/lz-n: update references to options
Update the extraConfig function to access settings through opts parameter
instead of direct import. Also remove the unused options import for cleaner code.
2025-05-09 01:14:36 +01:00
Heitor Augusto
b1cfeb4f34 plugins/lz-n: add support for keymap(<plugin>).set API
Add a new `keymaps` option to the lz-n plugin that allows users to define
keymaps that use lz.n's keymap(<plugin>).set functionality. This enables
users to create keymaps that lazy-load plugins when specific keys are pressed,
using the familiar vim.keymap.set() API style.

The implementation:
- Adds a new `keymaps` option using mkMapOptionSubmodule with a custom plugin property
- Exposes a simple and consistent interface for configuring lazy-loaded keymaps
- Processes these keymaps to generate corresponding Lua code with require('lz.n').keymap().set()
- Cleanly separates plugin specs from keymap definitions while preserving their relationship
2025-05-09 01:14:36 +01:00
Heitor Augusto
bb2e1acf70 plugins/lz-n: add HeitorAugustoLN as a maintainer 2025-05-09 01:14:36 +01:00
Heitor Augusto
a9938e06ae plugins/lz-n: remove with lib 2025-05-09 01:14:36 +01:00
Matt Sturgeon
5e9a6c00a9
treewide: neovim-plugin -> plugins 2024-12-22 10:04:00 +00:00
Austin Horstman
a7012e7864
treewide: originalName -> packPathName
We used to only think of it as the plugin repo's name, but we have been
needing to use it for the name of the plugin's packpath location.
2024-12-13 21:29:00 -06:00
Austin Horstman
8012fbd998
plugins/lz-n: move to extraConfigLuaPre
Code that can trigger lazy loading might be inserted before the trigger
is defined.
2024-12-12 18:07:34 -06:00
Matt Sturgeon
2f49c76a6a
lib: remove nixvimTypes alias 2024-09-27 08:31:07 +01:00
Quentin Boyer
d2f9e011d9 lib/neovim-plugin: Add lua configuration scoped to the plugin
This commit adds a `plugins.<name>.luaConfig` section controlling the
plugin specific configuration.

The section contains the internal `init` option, containing the plugin's
initialization code.

It also contains the public `pre` and `post` options, that allow to add
code before & after the `init` section

Finally, it contains the `final` option, being the concatenation of the
three previous options.
2024-09-22 16:15:27 +00:00
Matt Sturgeon
1fd4b6c739
plugins: migrate defaultPackage -> package
Migrate all users of `mkVimPlugin` and `mkNeovimPlugin` to use the new
`package` argument instead of the old `defaultPackage` argument.
2024-09-04 03:29:34 +01:00
Matt Sturgeon
18b7597e6c
lib/neovim-plugin: drop config arg 2024-09-02 10:35:52 +01:00
psfloyd
78abafe280 plugins/lz-n: init 2024-08-08 06:18:43 +00:00