Resolve plugin[mappings] prefix value at initialization time
- Dominant language
- Vim Script
- Stars
- 588
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Plugins that provide default mappings generally configure a default mapping prefix like `=` and then take a boolean value for `plugin[mappings]` as a shortcut for that prefix. For instance
``` vim
Glaive codefmt plugin[mappings]
```
is a shortcut for
``` vim
Glaive codefmt plugin[mappings]='='
```
But in the first shortcut form the default prefix isn't introspectable (`:Glaive codefmt` shows a value of `{'mappings': 1}` instead of `{'mappings': '='}`). We should add a hook to resolve it immediately so it's introspectable.
Related: When overriding the `plugin[mappings]` value, we could immediately create new mappings at that prefix, and possibly clean up any old ones we can detect as automatically created by the plugin at the old prefix.
Contributor guide
Assessment
This issue has not been assessed yet.