diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-16 23:47:40 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-16 23:47:40 +0800 |
commit | 04c671114d1d4c4bcfbad74c8341b24844552865 (patch) | |
tree | 5179418d409f223a0fa8fd02e9bd44464e559683 /script/core/diagnostics | |
parent | 697c9359636a639f044192fd81e3f4374488192c (diff) | |
download | lua-language-server-04c671114d1d4c4bcfbad74c8341b24844552865.zip |
doc.enum
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r-- | script/core/diagnostics/duplicate-doc-alias.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/core/diagnostics/duplicate-doc-alias.lua b/script/core/diagnostics/duplicate-doc-alias.lua index 2625f88f..e9ee5aab 100644 --- a/script/core/diagnostics/duplicate-doc-alias.lua +++ b/script/core/diagnostics/duplicate-doc-alias.lua @@ -17,7 +17,8 @@ return function (uri, callback) local cache = {} for _, doc in ipairs(state.ast.docs) do - if doc.type == 'doc.alias' then + if doc.type == 'doc.alias' + or doc.type == 'doc.enum' then local name = guide.getKeyName(doc) if not name then return @@ -28,7 +29,8 @@ return function (uri, callback) cache[name] = {} for _, otherDoc in ipairs(docs) do if otherDoc.type == 'doc.alias' - or otherDoc.type == 'doc.class' then + or otherDoc.type == 'doc.class' + or otherDoc.type == 'doc.enum' then cache[name][#cache[name]+1] = { start = otherDoc.start, finish = otherDoc.finish, |