-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: extensions can support special windows
- Loading branch information
1 parent
7446f89
commit 867c830
Showing
3 changed files
with
99 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
local M = {} | ||
|
||
---Get the saved data for this extension | ||
---@return any | ||
M.on_save = function() | ||
return {} | ||
end | ||
|
||
M.on_load = function(data) | ||
-- | ||
end | ||
|
||
---Called when resession gets configured | ||
---This function is optional | ||
---@param data table The configuration data passed in the config | ||
M.config = function(data) | ||
-- | ||
end | ||
|
||
---Check if a window is supported by this extension | ||
---This function is optional for extensions | ||
---@param winid integer | ||
---@param bufnr integer | ||
---@return boolean | ||
M.is_win_supported = function(winid, bufnr) | ||
return true | ||
end | ||
|
||
---Save data for a window | ||
---@param winid integer | ||
---@return any | ||
M.save_win = function(winid) | ||
return {} | ||
end | ||
|
||
---Called with the data from save_win | ||
---@param winid integer | ||
---@param config any | ||
---@return integer|nil If the original window has been replaced, return the new ID that should replace it | ||
M.load_win = function(winid, config) | ||
-- | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters