Closed Cris-lml007 closed 9 months ago
Menu
should only be used when it's directly interactive. If you're only using it to display some lines, you should use Popup
+ NuiTree
instead.
local popup = Popup({
border = 'double',
})
local tree = Tree({
bufnr = popup.bufnr,
nodes = {
Tree.Node({ text = "A" }),
Tree.Node({ text = "B" }),
},
})
tree:render()
Then for adding new item:
tree:add_node(Tree.Node({ text = "C" }))
tree:render()
mmmmmmm....it is not expected.
i want add new item to menu, but i not know how do. this my code: