diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 16:34:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 16:34:56 +0800 |
commit | 09cd9882be4b66f270c74516759844683832b1d4 (patch) | |
tree | f9849bbe96a28dead6fcf9a869de7e43236a268e | |
parent | df4fb9b5157cbf11f3fc5f6041afef657f0acfba (diff) | |
download | lua-language-server-09cd9882be4b66f270c74516759844683832b1d4.zip |
typo
-rw-r--r-- | script/proto/diagnostic.lua | 2 | ||||
-rw-r--r-- | script/utility.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/script/proto/diagnostic.lua b/script/proto/diagnostic.lua index 25f187db..43043b94 100644 --- a/script/proto/diagnostic.lua +++ b/script/proto/diagnostic.lua @@ -224,7 +224,7 @@ end ---@param name string ---@return string[] -m.getGroups = util.catchReturn(function (name) +m.getGroups = util.cacheReturn(function (name) local groups = {} for groupName, nameMap in pairs(m.diagnosticGroups) do if nameMap[name] then diff --git a/script/utility.lua b/script/utility.lua index a72714f1..034f19d5 100644 --- a/script/utility.lua +++ b/script/utility.lua @@ -835,7 +835,7 @@ m.MODE_KV = { __mode = 'kv' } ---@generic T: fun(param: any):any ---@param func T ---@return T -function m.catchReturn(func) +function m.cacheReturn(func) local cache = {} return function (param) if cache[param] == nil then |