summaryrefslogtreecommitdiff
path: root/script/method/workspace/didChangeConfiguration.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/method/workspace/didChangeConfiguration.lua')
-rw-r--r--script/method/workspace/didChangeConfiguration.lua47
1 files changed, 25 insertions, 22 deletions
diff --git a/script/method/workspace/didChangeConfiguration.lua b/script/method/workspace/didChangeConfiguration.lua
index ecaa9182..eca61ebc 100644
--- a/script/method/workspace/didChangeConfiguration.lua
+++ b/script/method/workspace/didChangeConfiguration.lua
@@ -1,27 +1,30 @@
local rpc = require 'rpc'
+--- @param lsp LSP
return function (lsp)
- local uri = lsp.workspace and lsp.workspace.uri
- -- 请求配置
- rpc:request('workspace/configuration', {
- items = {
- {
- scopeUri = uri,
- section = 'Lua',
+ for _, ws in ipairs(lsp.workspaces) do
+ local uri = ws.uri
+ -- 请求配置
+ rpc:request('workspace/configuration', {
+ items = {
+ {
+ scopeUri = uri,
+ section = 'Lua',
+ },
+ {
+ scopeUri = uri,
+ section = 'files.associations',
+ },
+ {
+ scopeUri = uri,
+ section = 'files.exclude',
+ }
},
- {
- scopeUri = uri,
- section = 'files.associations',
- },
- {
- scopeUri = uri,
- section = 'files.exclude',
- }
- },
- }, function (configs)
- lsp:onUpdateConfig(configs[1], {
- associations = configs[2],
- exclude = configs[3],
- })
- end)
+ }, function (configs)
+ lsp:onUpdateConfig(configs[1], {
+ associations = configs[2],
+ exclude = configs[3],
+ })
+ end)
+ end
end