ci: type checking
This commit is contained in:
parent
b905ed04ed
commit
e1d7abf58e
3 changed files with 16 additions and 5 deletions
|
|
@ -114,14 +114,16 @@ function M.stop(bufnr)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
log.dbg('stopping process for buffer %d', bufnr)
|
log.dbg('stopping process for buffer %d', bufnr)
|
||||||
proc.obj:kill('sigterm')
|
---@type fun(self: table, signal: string|integer)
|
||||||
|
local kill = proc.obj.kill
|
||||||
|
kill(proc.obj, 'sigterm')
|
||||||
|
|
||||||
local timer = vim.uv.new_timer()
|
local timer = vim.uv.new_timer()
|
||||||
if timer then
|
if timer then
|
||||||
timer:start(5000, 0, function()
|
timer:start(5000, 0, function()
|
||||||
timer:close()
|
timer:close()
|
||||||
if active[bufnr] and active[bufnr].obj == proc.obj then
|
if active[bufnr] and active[bufnr].obj == proc.obj then
|
||||||
proc.obj:kill('sigkill')
|
kill(proc.obj, 'sigkill')
|
||||||
active[bufnr] = nil
|
active[bufnr] = nil
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ end
|
||||||
|
|
||||||
---@param bufnr integer
|
---@param bufnr integer
|
||||||
---@param name string
|
---@param name string
|
||||||
---@param error_parser fun(stderr: string, ctx: render.Context): vim.Diagnostic[]
|
---@param error_parser fun(stderr: string, ctx: render.Context): render.Diagnostic[]
|
||||||
---@param stderr string
|
---@param stderr string
|
||||||
---@param ctx render.Context
|
---@param ctx render.Context
|
||||||
function M.set(bufnr, name, error_parser, stderr, ctx)
|
function M.set(bufnr, name, error_parser, stderr, ctx)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
---@field cwd? string|fun(ctx: render.Context): string
|
---@field cwd? string|fun(ctx: render.Context): string
|
||||||
---@field env? table<string, string>
|
---@field env? table<string, string>
|
||||||
---@field output? string|fun(ctx: render.Context): string
|
---@field output? string|fun(ctx: render.Context): string
|
||||||
---@field error_parser? fun(stderr: string, ctx: render.Context): vim.Diagnostic[]
|
---@field error_parser? fun(stderr: string, ctx: render.Context): render.Diagnostic[]
|
||||||
---@field clean? string[]|fun(ctx: render.Context): string[]
|
---@field clean? string[]|fun(ctx: render.Context): string[]
|
||||||
|
|
||||||
---@class render.Config
|
---@class render.Config
|
||||||
|
|
@ -18,8 +18,17 @@
|
||||||
---@field root string
|
---@field root string
|
||||||
---@field ft string
|
---@field ft string
|
||||||
|
|
||||||
|
---@class render.Diagnostic
|
||||||
|
---@field lnum integer
|
||||||
|
---@field col integer
|
||||||
|
---@field message string
|
||||||
|
---@field severity? integer
|
||||||
|
---@field end_lnum? integer
|
||||||
|
---@field end_col? integer
|
||||||
|
---@field source? string
|
||||||
|
|
||||||
---@class render.Process
|
---@class render.Process
|
||||||
---@field obj vim.SystemObj
|
---@field obj table
|
||||||
---@field provider string
|
---@field provider string
|
||||||
---@field output_file string
|
---@field output_file string
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue