diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-22 20:34:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-22 20:34:31 +0800 |
commit | 2d4bb16df19575affddd7b9a1d5aaa8f2b9ade99 (patch) | |
tree | dfa9fba06058c4d31aa7d8e584b460fdfcdb0f3f /script-beta/core/diagnostics/duplicate-doc-class.lua | |
parent | 188ac526272e64581dbeaef2ab4629b236ad1d23 (diff) | |
download | lua-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.lua | 6 |
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, |