Question: Dynamically create Menu lines. How? #114
-
Hello. Look at this function that creates a simple menu:
I want to pass a table to
How do that? |
Beta Was this translation helpful? Give feedback.
Answered by
MunifTanjim
Mar 23, 2022
Replies: 1 comment 1 reply
-
Have you tried doing: function nvim_settings.select_arch_type(title, arch_types)
local lines = {}
for i, arch_type in ipairs(arch_types) do
lines[i] = Menu.item(arch_type)
end
local menu = Menu({
-- ...
}, {
-- ...
lines = lines,
-- ...
})
-- ...
end
nvim_settings.select_arch_type("Select Arch Type", { 'x86', 'x64' }) ? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LinArcX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried doing:
?