fix(lua): vim.validate message param #33675

Problem:
vim.validate does not handle `message` param.

Solution:
Add the missing logic.
This commit is contained in:
Justin M. Keyes
2025-05-04 16:36:32 -07:00
committed by GitHub
parent 0862c1036a
commit 40351bbbbe
4 changed files with 28 additions and 15 deletions

View File

@@ -6313,7 +6313,7 @@ describe('LSP', function()
end)
describe('vim.lsp.config() and vim.lsp.enable()', function()
it('can merge settings from "*"', function()
it('merges settings from "*"', function()
eq(
{
name = 'foo',
@@ -6329,6 +6329,15 @@ describe('LSP', function()
)
end)
it('config("bogus") shows a hint', function()
matches(
'hint%: to resolve a config',
pcall_err(exec_lua, function()
vim.print(vim.lsp.config('non-existent-config'))
end)
)
end)
it('sets up an autocmd', function()
eq(
1,
@@ -6650,21 +6659,18 @@ describe('LSP', function()
local _ = vim.lsp.config['foo*']
end)
)
matches(
err,
pcall_err(exec_lua, function()
vim.lsp.config['foo*'] = {}
end)
)
matches(
err,
pcall_err(exec_lua, function()
vim.lsp.config('foo*', {})
end)
)
-- Exception for '*'
pcall(exec_lua, function()
vim.lsp.config('*', {})