olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support
MIT License
418 stars 24 forks source link

fix: update telescope extension structure #72

Closed dhruvmanila closed 1 year ago

dhruvmanila commented 1 year ago

Telescope extension folder structure is described here: https://github.com/nvim-telescope/telescope.nvim/wiki/Extensions#extension-folder-structure

When telescope.load_extension(<name>) is done, the name is loaded from path telescope._extensions.<name>. With the current structure, one could do telescope.load_extension('finders') and then it will be available to load through Telescope finders which will error

Error executing Lua callback: ...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:193: attempt to call a nil value
stack traceback:
    ...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:193: in function 'run_command'
    ...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:253: in function 'load_command'
    ...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:108: in function <...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:107>
olimorris commented 1 year ago

Great spot and thanks for fixing!