don't use deprecated functions

This commit is contained in:
hrsh7th 2025-04-01 12:48:26 +09:00
parent 3022dbc916
commit 51f42e6ef6

View File

@ -31,13 +31,11 @@ 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({ vim.validate('keyword_length', opts.keyword_length, 'number')
keyword_length = { opts.keyword_length, 'number' }, vim.validate('keyword_pattern', opts.keyword_pattern, 'string')
keyword_pattern = { opts.keyword_pattern, 'string' }, vim.validate('get_bufnrs', opts.get_bufnrs, 'function')
get_bufnrs = { opts.get_bufnrs, 'function' }, vim.validate('indexing_batch_size', opts.indexing_batch_size, 'number')
indexing_batch_size = { opts.indexing_batch_size, 'number' }, vim.validate('indexing_interval', opts.indexing_interval, 'number')
indexing_interval = { opts.indexing_interval, 'number' },
})
return opts return opts
end end