toggleterm-manager.nvim icon indicating copy to clipboard operation
toggleterm-manager.nvim copied to clipboard

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

Open LumenYoung opened this issue 1 year ago • 1 comments

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>

LumenYoung avatar May 13 '24 10:05 LumenYoung

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

ditsuke avatar Jul 29 '24 10:07 ditsuke