itsmyvim / itsmyvim/packer-imv

if rhs is a function, then rhs = function body

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted
Dominant language
Lua
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

If it's a function like `vim.keymap.set("n", "", function() ui.nav_file(1) end)` we should get that function body which is `ui.nav_file(1)` and set it to rhs. The function checker is [here](https://github.com/itsmyvim/packer-imv/blob/main/lua/packer-imv/init.lua#L3-L11).

It would be like
```
local function remove_functions(table)
for k, v in pairs(table) do
if type(v) == "function" then
table[k] = THE FUNCTION BODY HERE
elseif type(v) == "table" then
remove_functions(v)
end
end
end
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.