fix(ci): vim typing
This commit is contained in:
parent
8f3aca33b0
commit
a4fabd11a2
2 changed files with 29 additions and 2 deletions
16
.luarc.json
Normal file
16
.luarc.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"runtime.version": "LuaJIT",
|
||||||
|
"runtime.path": [
|
||||||
|
"lua/?.lua",
|
||||||
|
"lua/?/init.lua"
|
||||||
|
],
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"vim"
|
||||||
|
],
|
||||||
|
"workspace.library": [
|
||||||
|
"$VIMRUNTIME/lua",
|
||||||
|
"${3rd}/luv/library"
|
||||||
|
],
|
||||||
|
"workspace.checkThirdParty": false,
|
||||||
|
"completion.callSnippet": "Replace"
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
---@field debug_flags string[]
|
---@field debug_flags string[]
|
||||||
---@field timeout_ms number
|
---@field timeout_ms number
|
||||||
|
|
||||||
|
---@class cp.PartialContestConfig
|
||||||
|
---@field cpp_version? number
|
||||||
|
---@field compile_flags? string[]
|
||||||
|
---@field debug_flags? string[]
|
||||||
|
---@field timeout_ms? number
|
||||||
|
|
||||||
---@class cp.HooksConfig
|
---@class cp.HooksConfig
|
||||||
---@field before_run? function
|
---@field before_run? function
|
||||||
---@field before_debug? function
|
---@field before_debug? function
|
||||||
|
|
@ -13,6 +19,11 @@
|
||||||
---@field snippets table<string, any>
|
---@field snippets table<string, any>
|
||||||
---@field hooks cp.HooksConfig
|
---@field hooks cp.HooksConfig
|
||||||
|
|
||||||
|
---@class cp.PartialConfig
|
||||||
|
---@field contests? table<string, cp.PartialContestConfig>
|
||||||
|
---@field snippets? table<string, any>
|
||||||
|
---@field hooks? cp.HooksConfig
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@type cp.Config
|
---@type cp.Config
|
||||||
|
|
@ -42,7 +53,7 @@ M.defaults = {
|
||||||
}
|
}
|
||||||
|
|
||||||
---@param base_config cp.ContestConfig
|
---@param base_config cp.ContestConfig
|
||||||
---@param contest_config cp.ContestConfig
|
---@param contest_config cp.PartialContestConfig
|
||||||
---@return cp.ContestConfig
|
---@return cp.ContestConfig
|
||||||
local function extend_contest_config(base_config, contest_config)
|
local function extend_contest_config(base_config, contest_config)
|
||||||
local result = vim.tbl_deep_extend("force", base_config, contest_config)
|
local result = vim.tbl_deep_extend("force", base_config, contest_config)
|
||||||
|
|
@ -80,7 +91,7 @@ local function validate_contest_config(path, contest_config)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param user_config cp.Config|nil
|
---@param user_config cp.PartialConfig|nil
|
||||||
---@return cp.Config
|
---@return cp.Config
|
||||||
function M.setup(user_config)
|
function M.setup(user_config)
|
||||||
local ok, err = validate_path("config", {
|
local ok, err = validate_path("config", {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue