Skip to content

Commit c6d3dc8

Browse files
refactor: temporarily disable 0.11 validation
1 parent 695423e commit c6d3dc8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lua/orgmode/utils/validator.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
local M = {}
22

3-
local has_v_0_11 = vim.fn.has('nvim-0.11') > 0
3+
-- local has_v_0_11 = vim.fn.has('nvim-0.11') > 0
44

55
--- Use the faster validate version if available
66
-- Taken from: https://github.com/lukas-reineke/indent-blankline.nvim/pull/934/files#diff-09ebcaa8c75cd1e92d25640e377ab261cfecaf8351c9689173fd36c2d0c23d94R16
77
--- @param spec table<string,[any, vim.validate.Validator, boolean|string]>
88
function M.validate(spec)
9-
if not has_v_0_11 then
10-
return vim.validate(spec)
11-
end
12-
for key, key_spec in pairs(spec) do
13-
local message = type(key_spec[3]) == 'string' and key_spec[3] or nil --[[@as string?]]
14-
local optional = type(key_spec[3]) == 'boolean' and key_spec[3] or nil --[[@as boolean?]]
15-
---@diagnostic disable-next-line:param-type-mismatch, redundant-parameter
16-
vim.validate(key, key_spec[1], key_spec[2], optional, message)
17-
end
9+
-- if not has_v_0_11 then
10+
return vim.validate(spec)
11+
-- end
12+
-- for key, key_spec in pairs(spec) do
13+
-- local message = type(key_spec[3]) == 'string' and key_spec[3] or nil --[[@as string?]]
14+
-- local optional = type(key_spec[3]) == 'boolean' and key_spec[3] or nil --[[@as boolean?]]
15+
-- ---@diagnostic disable-next-line:param-type-mismatch, redundant-parameter
16+
-- vim.validate(key, key_spec[1], key_spec[2], optional, message)
17+
-- end
1818
end
1919

2020
return M

0 commit comments

Comments
 (0)