Open
Description
I would like to display the treesitter context a little differently - in a winbar via other plugins like LuaLine or Feline. Those plugins already provide you with the custom sections where you can put any arbitrary text, and this text in my case would be the treesitter context hierarchy.
Would it be possible to allow overriding the built-in open/close function? When a user-supplied function is specified, then the plugin will not draw any UI.
Example:
require'treesitter-context'.setup{
-- ...
on_open = function(ctx)
-- ctx here is for example an array of items to display, it could have some additional properties as needed.
end,
on_close = function()
end,
}