This commit is contained in:
Tim Pope 2024-09-16 10:37:07 -07:00 committed by GitHub
commit 02c7ca6fd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View File

@ -210,6 +210,9 @@ M[ms.workspace_configuration] = function(_, result, ctx)
value = vim.NIL
end
table.insert(response, value)
else
-- If no section is provided, return settings as is
table.insert(response, client.settings)
end
end
return response

View File

@ -150,9 +150,16 @@ function tests.check_workspace_configuration()
{ section = 'testSetting2' },
{ section = 'test.Setting3' },
{ section = 'test.Setting4' },
{},
{ section = '' },
},
})
expect_notification('workspace/configuration', { true, false, 'nested', vim.NIL })
local all = {
testSetting1 = true,
testSetting2 = false,
test = { Setting3 = 'nested' },
}
expect_notification('workspace/configuration', { true, false, 'nested', vim.NIL, all, all })
notify('shutdown')
end,
}

View File

@ -591,6 +591,8 @@ describe('LSP', function()
{ section = 'testSetting2' },
{ section = 'test.Setting3' },
{ section = 'test.Setting4' },
{},
{ section = '' },
},
},
{ method = 'workspace/configuration', client_id = 1 },