summaryrefslogtreecommitdiff
path: root/script/config
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-08 14:39:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-08 14:39:52 +0800
commit42f8519bb66c69230f105a1135b33259ca653f7e (patch)
tree6ec01ae62424783592a3de3f1421c50150080928 /script/config
parent428d32055f1b7b5bce8a0fd75eeedf4114f8a7ec (diff)
downloadlua-language-server-42f8519bb66c69230f105a1135b33259ca653f7e.zip
cleanup
Diffstat (limited to 'script/config')
-rw-r--r--script/config/config.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/config/config.lua b/script/config/config.lua
index e5552616..173899fc 100644
--- a/script/config/config.lua
+++ b/script/config/config.lua
@@ -218,6 +218,9 @@ function m.set(key, value)
if not unit then
return
end
+ if util.equal(rawConfig[key], value) then
+ return
+ end
if unit:checker(value) then
update(key, unit:loader(value), value)
else
@@ -236,6 +239,9 @@ function m.add(key, value)
end
local copyed = {}
for i, v in ipairs(list) do
+ if util.equal(v, value) then
+ return
+ end
copyed[i] = v
end
copyed[#copyed+1] = value