Skip to content

Commit a1d526a

Browse files
marks0mmersMark Sommers
andauthored
Fix vim.validate deprecation (#234)
* Fix vim.validate deprecation * Checked nvim version for validate --------- Co-authored-by: Mark Sommers <[email protected]>
1 parent 4c00b86 commit a1d526a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-ts-autotag/utils.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ end
9494
---@param value any Value to compare
9595
---@return boolean `true` if `t` contains `value`
9696
M.list_contains = function(t, value)
97-
vim.validate({ t = { t, "t" } })
97+
if vim.fn.has("nvim-0.11") == 1 then
98+
vim.validate("t", t, "table")
99+
else
100+
vim.validate({ t = { t, "table" } })
101+
end
102+
98103
--- @cast t table<any,any>
99104

100105
for _, v in ipairs(t) do

0 commit comments

Comments
 (0)