Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(picker.explorer): reveal file inside hidden dir #1194

Open
4 tasks done
cdump opened this issue Feb 15, 2025 · 1 comment
Open
4 tasks done

bug(picker.explorer): reveal file inside hidden dir #1194

cdump opened this issue Feb 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@cdump
Copy link

cdump commented Feb 15, 2025

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.11.0-dev-1738+g2c629ad13f

Operating system/version

Linux

Describe the bug

When I try to reveal the file in the explorer picker, but the path is inside a 'dot folder' (which is hidden by default), I encounter two bugs:

Image

  1. Two file trees are shown.
  2. The path to the requested file is not expanded.

Steps To Reproduce

  1. nvim -u repro.lua
  2. :e ~/.config/nvim/init.lua
  3. Ctrl+e

Expected Behavior

Image

  1. Only one file tree should be shown.
  2. All nodes in the path to the requested file should be displayed, even if they are hidden.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
    spec = {
        {
            "folke/snacks.nvim",
            opts = { explorer = { enabled = true }},
            keys = {
                { "<C-e>", function() Snacks.explorer.reveal() end }
            },
        },
    },
})
@cdump cdump added the bug Something isn't working label Feb 15, 2025
@cdump cdump changed the title bug: reveal file inside hidden dir in explorer picker bug(picker.explorer): reveal file inside hidden dir Feb 15, 2025
@sqwxl
Copy link

sqwxl commented Feb 22, 2025

Seeing this as well, but the duplicated file tree seems to happen with any file, hidden or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants