diff options
author | sumneko <sumneko@hotmail.com> | 2021-10-01 15:43:18 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2021-10-01 15:43:18 +0800 |
commit | 80cacc02ae952a8dede16ad69c7ed00ed0928a07 (patch) | |
tree | 904c8d5fb61b7f4ef204d7d4ee34cca8faa86ca7 /script/provider | |
parent | 98e3b264a52738d79bc914f68207d7f3971ef9ae (diff) | |
download | lua-language-server-80cacc02ae952a8dede16ad69c7ed00ed0928a07.zip |
load config in `.luarc.json`
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 0e4f7ddd..284eca97 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -22,9 +22,15 @@ local function updateConfig() config.setSource 'path' log.debug('load config from local', CONFIGPATH) else - new = cfgLoader.loadClientConfig() - config.setSource 'client' - log.debug('load config from client') + new = cfgLoader.loadRCConfig('.luarc.json') + if new then + config.setSource 'luarc' + log.debug('load config from luarc') + else + new = cfgLoader.loadClientConfig() + config.setSource 'client' + log.debug('load config from client') + end end if not new then log.warn('load config failed!') |