telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

setting `file_ignore_patterns` seems to break `current_buffer_fuzzy_find`

Open madelaney opened this issue 4 months ago • 2 comments

Description

When I set defaults.file_ignore_patterns, any calls to builtin.current_buffer_fuzzy_find does not yield any results; when there should be something.

Neovim version

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382

Operating system and version

macOS 15.0.1

Telescope version / branch / rev

eae0d8fbde590b0eaa2f9481948cd6fd7dd21656

checkhealth telescope

==============================================================================
telescope: health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 14.1.1
- OK fd: found fd 10.2.0

===== Installed extensions ===== ~

Telescope Extension: `bookmarks` ~
- No healthcheck provided

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `live_grep_args` ~
- No healthcheck provided

Telescope Extension: `notify` ~
- No healthcheck provided

Telescope Extension: `smart_history` ~
- No healthcheck provided

Telescope Extension: `ui-select` ~
- No healthcheck provided

Steps to reproduce

  1. setup telescope.
  2. update file_ignore_patterns
  3. open builtin.current_buffer_fuzzy_find

Expected behavior

I would see results, from the current buffer, that match the expression I entered.

Actual behavior

The window is opened, but no search results are returned; when they should.

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.uv.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.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    config = function()
      -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
      require("telescope").setup({
        defaults = {
          file_ignore_patterns = {
            '.git',
            'target',
          }
        }
      }
    end,
  },
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

madelaney avatar Oct 05 '24 16:10 madelaney