nvim-telescope / telescope-frecency.nvim

A telescope.nvim extension that offers intelligent prioritization when selecting files from your editing history.
MIT License
773 stars 37 forks source link

Option `ignore_patterns` is overwritten by `telescope.defaults.file_ignore_patterns` #108

Open b0ae989c opened 1 year ago

b0ae989c commented 1 year ago

I find that the option ignore_patterns is overwritten when the file_ignore_patterns option is set in Telescope defaults. Is this a bug or some expected behavior?

Here is my configuration. My expectation is that telescope.builtin.find_files ignores the test/ directory, and telescope.extensions.frecency.frecency does not ignore the test/ directory. But both pickers ignore the test/ directory with this configuration.

require('telescope').setup({
  defaults = {
    file_ignore_patterns = {
      '*.bak',
      '*.git',
      '*/test/*'.
    },
  },
  extensions = {
    frecency = {
      ignore_patterns = {},
    },
  },
})
b0ae989c commented 1 year ago

If this is expected behavior, feel free to close.

delphinus commented 1 year ago

I think this is a bug. It should consider both of them.