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

Directory preview ignores "display_stat" setting #408

Open
droopy4096 opened this issue Dec 2, 2024 · 0 comments
Open

Directory preview ignores "display_stat" setting #408

droopy4096 opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@droopy4096
Copy link

Description

configuring TFB with display_stats=false does not affect directory preview pane contents

it's hardly useful to have such a preview. At the very least reversing order so that file name comes first would be more useful.

Neovim version

NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189

Operating system and version

Fedora 41

Steps to reproduce

Using LazyVim, I have configured tfb with:

return {
    "nvim-telescope/telescope-file-browser.nvim",
    dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
    config = function()
      local tscope=require('telescope')
      tscope.setup({
        extensions = {
          file_browser = {
            display_stat = false,
          }
        },
}

Expected behavior

brief file list

Actual behavior

when I browse - main pane follows the setting and only displays names of files/dirs, but on secondary pane "directory preview" still generates list with full stats:

Screenshot_20241202_083915

(I've blanked out user name/user group displayed)

Minimal config

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 = {
  {
    "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",
})
@droopy4096 droopy4096 added the bug Something isn't working label Dec 2, 2024
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