Open hinell opened 1 year ago
I've looked into this in the past but I think this is intended behavior. https://github.com/nvim-telescope/telescope.nvim/pull/1795
@jamestrew What do you mean intended? It may easily overwrite configs in extensions and wreack a havoc. Where is this expected to be used really?
I mean that having ext.setup
been called multiple times is on purpose as it prevents more issues than it causes.
Description
https://github.com/nvim-telescope/telescope.nvim/blob/6258d50b09f9ae087317e392efe7c05a7323492d/lua/telescope/_extensions/init.lua#L15-L26
https://github.com/nvim-telescope/telescope.nvim/blob/6258d50b09f9ae087317e392efe7c05a7323492d/lua/telescope/_extensions/init.lua#L61-L67
The above line. The same call to
ext.setup()
just a few lines apart. Worse, in first case it's called EVERY time extension is loaded byrequire('telescope').extensions.EXTENION_NAME.someMethod()
without actually being provided any configs thatext.setup()
function expects. This may result in unpredicted behavior and overhead. I've discovered this issue while digging uptelescope-recent-files
extension.Telescope version / branch / rev
6258d50b09f9ae087317e392efe7c05a7323492d