diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-16 22:37:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-16 22:37:52 +0800 |
commit | 814d7dfccb1ecfbd887af40f4df951fbdecb12ac (patch) | |
tree | e3dd6bd45b296cc4715f939c1b15e26db3e320ec /script/core | |
parent | a1f966af7db434c5dc7b2423ae63f4fe21957b46 (diff) | |
download | lua-language-server-814d7dfccb1ecfbd887af40f4df951fbdecb12ac.zip |
small fix
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/diagnostics/init.lua | 11 | ||||
-rw-r--r-- | script/core/hover/name.lua | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index a2eb2482..e9af8ea3 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -7,11 +7,12 @@ local util = require 'utility' -- 把耗时最长的诊断放到最后面 local diagSort = { - ['redundant-value'] = 96, - ['not-yieldable'] = 97, - ['deprecated'] = 98, - ['undefined-field'] = 99, - ['redundant-parameter'] = 100, + ['redundant-value'] = 100, + ['not-yieldable'] = 101, + ['deprecated'] = 102, + ['undefined-field'] = 103, + ['redundant-parameter'] = 104, + ['cast-local-type'] = 105, } local diagList = {} diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua index 59e639d6..1e1f733e 100644 --- a/script/core/hover/name.lua +++ b/script/core/hover/name.lua @@ -20,7 +20,7 @@ local function asField(source, oop) local class if source.node.type ~= 'getglobal' then class = vm.getInfer(source.node):viewClass() - if class == 'any' then + if class == 'any' or class == 'unknown' then class = nil end end |