diff options
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 15e78b9a..cb1d3ac3 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -41,7 +41,10 @@ function m.updateConfig(uri) end for _, folder in ipairs(scope.folders) do - local clientConfig = cfgLoader.loadClientConfig(folder.uri) + local clientConfig = nil + if client.getAbility('workspace.configuration') then + clientConfig = cfgLoader.loadClientConfig(folder.uri) + end if clientConfig then log.info('Load config from client', folder.uri) log.info(inspect(clientConfig)) @@ -57,10 +60,12 @@ function m.updateConfig(uri) config.update(folder, clientConfig, rc) end - local global = cfgLoader.loadClientConfig() - log.info('Load config from client', 'fallback') - log.info(inspect(global)) - config.update(scope.fallback, global) + if client.getAbility('workspace.configuration') then + local global = cfgLoader.loadClientConfig() + log.info('Load config from client', 'fallback') + log.info(inspect(global)) + config.update(scope.fallback, global) + end end function m.register(method) |