diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:07:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:07:28 +0800 |
commit | 01a09c66af04ab3e37d02782721c20bff8092e15 (patch) | |
tree | 5a2eb28be3c347f7e62772d24b0f16993ca36007 /script/config/template.lua | |
parent | d1fd05ec4b174693827cc4cae68a0cac2583c599 (diff) | |
download | lua-language-server-01a09c66af04ab3e37d02782721c20bff8092e15.zip |
some fix
Diffstat (limited to 'script/config/template.lua')
-rw-r--r-- | script/config/template.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/script/config/template.lua b/script/config/template.lua index e928db78..4e2f45ae 100644 --- a/script/config/template.lua +++ b/script/config/template.lua @@ -5,6 +5,11 @@ local diag = require 'proto.diagnostic' ---@class config.unit ---@field caller function ---@field _checker fun(self: config.unit, value: any): boolean +---@field name string +---@field [string] config.unit +---@operator shl: config.unit +---@operator shr: config.unit +---@operator call: config.unit local mt = {} mt.__index = mt @@ -52,11 +57,7 @@ local function register(name, default, checker, loader, caller) } end ----@class config.template ----@field [string] config.template ----@operator shl: config.template ----@operator shr: config.template ----@operator call: config.template +---@type config.unit local Type = setmetatable({}, { __index = function (_, name) local unit = {} for k, v in pairs(units[name]) do |