summaryrefslogtreecommitdiff
path: root/script/config/template.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-08-16 16:55:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-08-16 16:55:57 +0800
commit080d672ee4bbc082a24aef95821860afa78a7d9f (patch)
tree687c6229d6a904d1e31ee240254d83f93d83508d /script/config/template.lua
parent18ae29cd86dd7e6caa45eba9ac05c44170970df3 (diff)
downloadlua-language-server-080d672ee4bbc082a24aef95821860afa78a7d9f.zip
Add setting: `Lua.type.checkTableShape`
Diffstat (limited to 'script/config/template.lua')
-rw-r--r--script/config/template.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/config/template.lua b/script/config/template.lua
index 7b044d7a..ee7dde37 100644
--- a/script/config/template.lua
+++ b/script/config/template.lua
@@ -4,9 +4,9 @@ local diag = require 'proto.diagnostic'
---@class config.unit
---@field caller function
+---@field loader 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
@@ -57,7 +57,8 @@ local function register(name, default, checker, loader, caller)
}
end
----@type config.unit
+---@class config.master
+---@field [string] config.unit
local Type = setmetatable({}, { __index = function (_, name)
local unit = {}
for k, v in pairs(units[name]) do
@@ -398,7 +399,8 @@ local template = {
['Lua.type.castNumberToInteger'] = Type.Boolean >> true,
['Lua.type.weakUnionCheck'] = Type.Boolean >> false,
['Lua.type.weakNilCheck'] = Type.Boolean >> false,
- ['Lua.type.inferParamType'] = Type.Boolean >> false,
+ ['Lua.type.inferParamType'] = Type.Boolean >> false,
+ ['Lua.type.checkTableShape'] = Type.Boolean >> false,
['Lua.doc.privateName'] = Type.Array(Type.String),
['Lua.doc.protectedName'] = Type.Array(Type.String),
['Lua.doc.packageName'] = Type.Array(Type.String),