feat(plugins): Allow opening panes near plugin #3966
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, plugins are only able to open new panes from the perspective of the user. For example, if a user is focused in a different tab than the plugin, the plugin could only open panes in that tab.
This adds new plugin API methods that allow a plugin to open new panes "near" it. So for example, if a plugin would use the new
open_terminal_near_plugin
command, the terminal will be opened near in its own tab regardless of whether the user is focused on it or not (and it will also not change the user focus).The APIs that were added:
open_terminal_near_plugin
open_terminal_floating_near_plugin
open_terminal_in_place_of_plugin
(will override the plugin pane with the terminal until the terminal is closed, at which point the plugin will reappear)open_command_pane_near_plugin
open_command_pane_floating_near_plugin
open_command_pane_in_place_of_plugin
(will override the plugin pane with the command pane until the command pane is closed, at which point the plugin will reappear)open_file_near_plugin
open_file_floating_near_plugin
open_file_in_place_of_plugin
(will override the plugin pane with the editor pane until the editor pane is closed, at which point the plugin will reappear)