mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
Merge pull request #289 from horriblename/lua-include-empty-attrs
lib: do not filter out empty attrs in toLuaObject
This commit is contained in:
commit
2c9a9b4d29
3 changed files with 9 additions and 12 deletions
|
@ -60,16 +60,11 @@
|
|||
config = (attrs) the configuration options for this mapping (noremap, silent...)
|
||||
}
|
||||
*/
|
||||
normalizeAction = action: let
|
||||
normalizeAction = action: {
|
||||
# Extract the values of the config options that have been explicitly set by the user
|
||||
config =
|
||||
filterAttrs (_: v: v != null)
|
||||
(getAttrs (attrNames mapConfigOptions) action);
|
||||
in {
|
||||
config =
|
||||
if config == {}
|
||||
then {"__empty" = null;}
|
||||
else config;
|
||||
action =
|
||||
if action.lua
|
||||
then mkLuaInline action.action
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue