summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/duplicate-doc-class.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-22 20:34:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-22 20:34:31 +0800
commit2d4bb16df19575affddd7b9a1d5aaa8f2b9ade99 (patch)
treedfa9fba06058c4d31aa7d8e584b460fdfcdb0f3f /script-beta/core/diagnostics/duplicate-doc-class.lua
parent188ac526272e64581dbeaef2ab4629b236ad1d23 (diff)
downloadlua-language-server-2d4bb16df19575affddd7b9a1d5aaa8f2b9ade99.zip
过第一个诊断
Diffstat (limited to 'script-beta/core/diagnostics/duplicate-doc-class.lua')
-rw-r--r--script-beta/core/diagnostics/duplicate-doc-class.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/duplicate-doc-class.lua b/script-beta/core/diagnostics/duplicate-doc-class.lua
index 8974d215..259c048b 100644
--- a/script-beta/core/diagnostics/duplicate-doc-class.lua
+++ b/script-beta/core/diagnostics/duplicate-doc-class.lua
@@ -10,7 +10,7 @@ return function (uri, callback)
return
end
- if not state.ast.focs then
+ if not state.ast.docs then
return
end
@@ -23,8 +23,8 @@ return function (uri, callback)
local docs = vm.getDocTypes(name)
cache[name] = {}
for _, otherDoc in ipairs(docs) do
- if otherDoc.type == 'doc.class'
- or otherDoc.type == 'doc.alias' then
+ if otherDoc.type == 'doc.class.name'
+ or otherDoc.type == 'doc.alias.name' then
cache[name][#cache[name]+1] = {
start = otherDoc.start,
finish = otherDoc.finish,