ryanmsnyder / toggleterm-manager.nvim

A Telescope extension to manage Toggleterm's terminals in NeoVim
GNU General Public License v3.0
64 stars 4 forks source link

Use lua function way to invoke toggleterm-manager would results in error #7

Open LumenYoung opened 3 months ago

LumenYoung commented 3 months ago

Hi, thanks for this great plugin.

I'm trying to set it up and find that using the documented "lua way"(lua require("toggleterm-manager").open()) to invoke this plugin results in the following error, which behaves normally when I use Telescope toggleterm_manager.

E5108: Error executing lua: ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:41: attempt to index local 'opts' (a nil value)
stack traceback:
    ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:41: in function 'grep_previewer'
    .../lazy/toggleterm-manager.nvim/lua/lib/telescope/init.lua:44: in function 'open'
    /home/yang/.config/nvim/lua/plugins/toggleterm-manager.lua:15: in function </home/yang/.config/nvim/lua/plugins/toggleterm-manager.lua:15>
ditsuke commented 1 month ago

Mis-documented usage / missing nil check. require("toggleterm-manager").open({}) works fine.