feat: add prompt for waitting window

This commit is contained in:
JuanZoran
2023-03-26 20:07:04 +08:00
parent 529a1639c6
commit c5216e2b37
8 changed files with 50 additions and 55 deletions

View File

@@ -2,7 +2,7 @@ local api, fn = vim.api, vim.fn
---@class TransBuffer
---@field bufnr integer buffer handle
---@field [number] string buffer[line] content
---@field [number] string|TransNode? buffer[line] content
local buffer = {}
-- INFO : corountine can't invoke C function

View File

@@ -7,7 +7,7 @@ local frontend_opts = conf.frontend
---@field opts TransFrontendOpts
---@field get_active_instance fun():TransFrontend?
---@field process fun(self: TransFrontend, data: TransData)
---@field wait fun(self: TransFrontend): fun() Update wait status
---@field wait fun(self: TransFrontend): fun(backend: TransBackend): boolean Update wait status
---@field execute fun(action: string) @Execute action for frontend instance
---@field fallback fun() @Fallback method when no result
---@field setup? fun() @Setup method for frontend [optional] **NOTE: This method will be called when frontend is first used**

View File

@@ -60,7 +60,7 @@ local strategy = {
local name = backend.name
---@cast backend TransBackend
while result[name] == nil do
if not update() then break end
if not update(backend) then break end
end
if result[name] then return true end