Gaetan Lepage
95573411bc
modules/keymaps: add replace_keycodes keymap sub-option
2025-03-28 11:32:49 +01:00
Gaetan Lepage
fe95b14d52
lib/keymap-helpers (mapConfigOptions): use mkNullOrStr for desc
2025-03-28 11:32:49 +01:00
Matt Sturgeon
b8c5587399
lib/keymaps: make mode
type's description more readable
...
Only list the enum values once, instead of twice.
2025-02-15 15:09:05 +00:00
Matt Sturgeon
bd46d896a8
lib/keymaps: add a link to :h map-modes
2025-02-15 14:19:24 +00:00
Matt Sturgeon
d3a25cb97f
lib/keymaps: add abbreviation support to modes
enum
...
See https://neovim.io/doc/user/usr_24.html#_abbreviations
2025-02-15 13:51:37 +00:00
Matt Sturgeon
a1e168a2a0
lib/keymaps: replace modes
attrs with list
...
Simplify and remove dead code. Replace the `desc` attrs with inline
comments.
2025-02-15 13:35:19 +00:00
Matt Sturgeon
cd76b4feb8
lib: remove helpers
from internal usage
2024-09-29 14:41:41 +01:00
Austin Horstman
35788bbc5a
lib: cleanup with lib
2024-09-03 22:12:33 -05:00
Matt Sturgeon
b7f419a759
lib: migrate helpers.nixvimTypes
-> lib.types
2024-08-21 07:37:11 +01:00
Matt Sturgeon
7a11b66f11
lib/keymap: allow extra options/modules in mkMapOptionSubmodule
...
This is needed to allow plugins to add bespoke features to their keymap
submodules without having to re-implement the whole thing.
2024-08-18 22:38:24 +01:00
Matt Sturgeon
7fb1f9dd9d
modules/keymap: improve lua
deprecation
...
- Replace nullable lua option with a no-default option.
- Made it so the deprecated option is only declared when `lua = true` is passed.
- Replace `normalizeMappings` with a `removeDeprecatedMapAttrs` helper.
- Added warnings for all options that historically had `lua` support.
2024-08-18 22:11:11 +01:00
Matt Sturgeon
0e98d9cf1e
lib/helpers: build recursively
2024-07-28 22:30:11 +01:00
Matt Sturgeon
302262304e
lib/keymaps: refactor mkMapOptionSubmodule
again
...
Allow passing in `key` and `action` as either bool or an attrset.
If `false`, the option is omitted. If `true` or an attrset, the option is included.
If an attrset is used, it will update the default `mkOption` args.
This is useful for overriding `type` or adding an `example`.
2024-06-07 15:42:54 +01:00
Matt Sturgeon
df3aa86713
lib/keymap-helpers: refactor mkMapOptionSubmodule
...
Make the `key` and `action` options optional, and allow configuring
whether `action` can be a raw type.
2024-06-01 16:19:35 +01:00
Matt Sturgeon
29922e13f7
modules/keymaps: fix false-positive lua
warning
2024-05-31 20:38:53 +01:00
Ismaïl Senhaji
6ff3493c9b
modules/keymaps: doc: add backticks around noremap
...
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2024-05-30 22:27:24 +02:00
Ismaïl Senhaji
6d3d3bd0c2
modules/keymaps: doc: add backticks around special arguments
2024-05-30 22:27:24 +02:00
Ismaïl Senhaji
bea8492e19
modules/keymaps: add "buffer" option to mapConfigOptions
2024-05-30 15:46:30 +02:00
Matt Sturgeon
8212bf1cd2
modules/keymaps: deprecate lua
option
2024-05-26 15:26:06 +01:00
traxys
62f32bfc71
treewide: Reformat with nixfmt
2024-05-05 22:00:40 +02:00
Gaetan Lepage
28d4d2a842
helpers/keymaps: factor out mkModeOption
2024-02-14 22:38:45 +01:00
Gaetan Lepage
ba818894b4
helpers/keymap-helpers: do not import helpers.nix directly
2024-02-11 11:50:35 +01:00
Gaetan Lepage
97eed79568
modules/keymaps: allow action.__raw
2024-02-03 12:42:05 +01:00
Gaetan Lepage
b3fb1c4c81
helpers/keymaps: add mkMapOptionsSubmodule
2023-12-15 16:19:28 +01:00
Gaetan Lepage
48dd8d28cf
modules/keymaps: deprecate maps option
2023-12-02 20:29:07 +01:00
Gaetan Lepage
69b3a13532
modules/keymaps: keymaps
option should not accept str mappings
2023-10-16 11:08:28 +02:00
Gaetan Lepage
7f29aade86
modules/keymaps: remove possibility to add a keymap without an action
2023-10-16 11:08:28 +02:00
Gaetan Lepage
418bf5da17
modules/keymaps: factor out helper functions for use in plugins
2023-10-03 14:18:33 +02:00
Gaetan Lepage
574fb73258
modules/keymaps: refactor + new syntax
2023-10-02 15:23:54 +02:00