Skip to content

How to collapse nui.line(s) with their node? #336

Answered by MunifTanjim
Otterpatsch asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe do this?

if node:is_expanded() then
  for _, raw_line in ipairs(vim.split(node.text, "\n")) do
    table.insert(lines, Line({ Text(raw_line) }))
  end
end

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Otterpatsch
Comment options

Answer selected by Otterpatsch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants