Commit graph

11 commits

Author SHA1 Message Date
Heitor Augusto
03a0561a8f
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-08 20:10:06 -03:00
Heitor Augusto
210af12eac
plugins/lz-n: add HeitorAugustoLN as a maintainer 2025-05-08 18:29:15 -03:00
Heitor Augusto
6404a1c788
plugins/lz-n: remove with lib 2025-05-08 18:29:11 -03: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