mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +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
@ -133,10 +133,8 @@ end
|
||||
---
|
||||
---@return vim.treesitter.LanguageTree object to use for parsing
|
||||
function M.get_string_parser(str, lang, opts)
|
||||
vim.validate({
|
||||
str = { str, 'string' },
|
||||
lang = { lang, 'string' },
|
||||
})
|
||||
vim.validate('str', str, 'string')
|
||||
vim.validate('lang', lang, 'string')
|
||||
|
||||
return LanguageTree.new(str, lang, opts)
|
||||
end
|
||||
|
Reference in New Issue
Block a user