summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/duplicate-set-field.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 19:41:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 19:41:24 +0800
commit4fbcb7b75aa0ea18fac6c4b77fcdee97921f36bc (patch)
tree88eaab14373f291635a353cb84ab82090180ab4c /script/core/diagnostics/duplicate-set-field.lua
parent63396ada5c7d2037ec19ed45e99e1a56f23c590b (diff)
downloadlua-language-server-4fbcb7b75aa0ea18fac6c4b77fcdee97921f36bc.zip
`duplicate-set-field` add excludes
Diffstat (limited to 'script/core/diagnostics/duplicate-set-field.lua')
-rw-r--r--script/core/diagnostics/duplicate-set-field.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua
index bf7fd069..7c857a51 100644
--- a/script/core/diagnostics/duplicate-set-field.lua
+++ b/script/core/diagnostics/duplicate-set-field.lua
@@ -30,6 +30,13 @@ return function (uri, callback)
if not name then
goto CONTINUE
end
+ local value = guide.getObjectValue(nxt)
+ if value then
+ if value.type == 'boolean'
+ or value.type == 'nil' then
+ goto CONTINUE
+ end
+ end
if not sets[name] then
sets[name] = {}
end