summaryrefslogtreecommitdiff
path: root/script/config
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-24 18:06:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-24 18:06:27 +0800
commit1933f28cdb6859660c6bc4dbb2f5c2b41b9eec02 (patch)
tree2c61c82fe4c82523f784a5b75ebd9f148fdb72b6 /script/config
parentff6a7e95e1a6be16338bcd1819b512cb36960e3b (diff)
downloadlua-language-server-1933f28cdb6859660c6bc4dbb2f5c2b41b9eec02.zip
check local setting
Diffstat (limited to 'script/config')
-rw-r--r--script/config/config.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/script/config/config.lua b/script/config/config.lua
index 57a16b1b..fd112845 100644
--- a/script/config/config.lua
+++ b/script/config/config.lua
@@ -2,6 +2,8 @@ local util = require 'utility'
local define = require 'proto.define'
local timer = require 'timer'
+---@alias config.source '"client"'|'"path"'|'"local"'
+
---@class config.unit
---@field caller function
local mt = {}
@@ -349,6 +351,16 @@ function m.event(key, value, oldValue)
}
end
+---@param source config.source
+function m.setSource(source)
+ m._source = source
+end
+
+---@return config.source
+function m.getSource()
+ return m._source
+end
+
function m.init()
if m.inited then
return