Skip to content
Discussion options

You must be logged in to vote
opts = {
  picker = {
    sources = {
      explorer = {
        on_show = function(picker)
          local Tree = require("snacks.explorer.tree")
          local root = Tree:find(picker:cwd())
          local open_recursive = false
          Tree:walk(root, function(node)
            if node.dir and (open_recursive or root == node.parent) then
              Tree:open(node.path)
              Tree:expand(node)
            end
          end, { all = open_recursive })
        end,

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@pczern
Comment options

@pczern
Comment options

@drowning-cat
Comment options

Answer selected by pczern
Comment options

You must be logged in to vote
0 replies
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