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

File Preview stale after moving/creating files #242

Open
jamestrew opened this issue Feb 24, 2023 · 0 comments
Open

File Preview stale after moving/creating files #242

jamestrew opened this issue Feb 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jamestrew
Copy link
Collaborator

Description

When moving file(s) into a directory, viewing the file preview for that directory doesn't show the file(s) that were moved into it.

Neovim version

NVIM v0.9.0-dev-970+gf006313e9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

Linux archlinux 6.1.12-arch1-1

Steps to reproduce

  1. mkdir -p /tmp/testing
  2. cd /tmp/testing
  3. mkdir foo
  4. touch a b
  5. nvim -nu min.lua
  6. :Telescope file_browser
  7. select the a & b files and then navigate into foo, then execute the move
  8. navigate back out and "hover" over foo and look at the preview

Expected behavior

See the moved files a and b in foo in the preview window.

Actual behavior

foo is empty in the preview window.

Minimal config

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	-- add any other plugins here
	"nvim-telescope/telescope-file-browser.nvim",
	dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
	config = function()
		require("telescope").setup()
		require("telescope").load_extension("file_browser")
	end,
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.cmd.colorscheme("habamax")
-- add anything else here
@jamestrew jamestrew added the bug Something isn't working label Feb 24, 2023
@jamestrew jamestrew self-assigned this Feb 24, 2023
@jamestrew jamestrew changed the title File Preview stale after moving files File Preview stale after moving/creating files Mar 4, 2023
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

1 participant