nvim-ide
nvim-ide copied to clipboard
option to configure which panel(s) are opened by default
I'd like to open the right panel by default instead of the left, or have an option to not open either panel automatically when Neovim starts.
I would go a bit further: have the panels open depending on filetype (or provide an api to do that for example with ftplugin files)
or provide an api to do that
There are commands to toggle them, so if we can just get an option to not open them by default, you could just toggle them open from an ftplugin
Yeah this is needed. Should be able to control what opens by default
Can we also get an API to examine the current state of which sidebars are open and which components exist/are open in which sidebar?
You could do some neat stuff with that with filetype autocmds.
Can we also get an API to examine the current state of which sidebars are open and which components exist/are open in which sidebar?
You could do some neat stuff with that with filetype autocmds.
Yup, you can so this today by getting the current workspace from the workspace_registry, and then iterating on panels and checking ".is_open()". It would be trivial to wrap that into a library function.
Awesome that sounds perfect. It would be neat to have a module for functions that are just useful for sort of interacting with the plugin from outside the plugin itself (e.g. the user interacting with the plugin from their own config)
Awesome that sounds perfect. It would be neat to have a module for functions that are just useful for sort of interacting with the plugin from outside the plugin itself (e.g. the user interacting with the plugin from their own config)
Having a bit of trouble visualizing that. Care to give an example?
I guess the only examples I can think of are:
- a function to get current state, would return a table like
{
left = {
open = true/false,
-- component names as strings maybe?
-- or a table with some info about each component maybe?
},
right = {
open = true/false,
-- same structure as `left`
},
center = {
-- some info about center panel,
-- whether its open and whats in it
}
}
And functions for toggling sidebars and opening/closing components in a sidebar.
Looks useful!