Revert "don't use deprecated functions"

This reverts commit 51f42e6ef6.
This commit is contained in:
hrsh7th 2025-04-01 17:46:25 +09:00
parent 51f42e6ef6
commit b74fab3656

View File

@ -31,11 +31,13 @@ end
---@return cmp_buffer.Options ---@return cmp_buffer.Options
source._validate_options = function(_, params) source._validate_options = function(_, params)
local opts = vim.tbl_deep_extend('keep', params.option, defaults) local opts = vim.tbl_deep_extend('keep', params.option, defaults)
vim.validate('keyword_length', opts.keyword_length, 'number') vim.validate({
vim.validate('keyword_pattern', opts.keyword_pattern, 'string') keyword_length = { opts.keyword_length, 'number' },
vim.validate('get_bufnrs', opts.get_bufnrs, 'function') keyword_pattern = { opts.keyword_pattern, 'string' },
vim.validate('indexing_batch_size', opts.indexing_batch_size, 'number') get_bufnrs = { opts.get_bufnrs, 'function' },
vim.validate('indexing_interval', opts.indexing_interval, 'number') indexing_batch_size = { opts.indexing_batch_size, 'number' },
indexing_interval = { opts.indexing_interval, 'number' },
})
return opts return opts
end end