mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 15:14:04 +00:00
perf(validate): use lighter version
- Also fix `vim.validate()` for PUC Lua when showing errors for values that aren't string or number.
This commit is contained in:
committed by
Lewis Russell
parent
fa6ab0d909
commit
3f3e4837d5
@@ -108,11 +108,9 @@ function M.add(lang, opts)
|
||||
local path = opts.path
|
||||
local symbol_name = opts.symbol_name
|
||||
|
||||
vim.validate({
|
||||
lang = { lang, 'string' },
|
||||
path = { path, 'string', true },
|
||||
symbol_name = { symbol_name, 'string', true },
|
||||
})
|
||||
vim.validate('lang', lang, 'string')
|
||||
vim.validate('path', path, 'string', true)
|
||||
vim.validate('symbol_name', symbol_name, 'string', true)
|
||||
|
||||
-- parser names are assumed to be lowercase (consistent behavior on case-insensitive file systems)
|
||||
lang = lang:lower()
|
||||
|
||||
Reference in New Issue
Block a user