vim-maktaba
vim-maktaba copied to clipboard
Resolve plugin[mappings] prefix value at initialization time
Plugins that provide default mappings generally configure a default mapping prefix like <leader>= and then take a boolean value for plugin[mappings] as a shortcut for that prefix. For instance
Glaive codefmt plugin[mappings]
is a shortcut for
Glaive codefmt plugin[mappings]='<leader>='
But in the first shortcut form the default prefix isn't introspectable (:Glaive codefmt shows a value of {'mappings': 1} instead of {'mappings': '<leader>='}). 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.