style(blink): make luals happy

This commit is contained in:
Folke Lemaitre 2024-12-13 22:54:52 +01:00
parent b07378dde4
commit 5105f3c029
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -1,3 +1,4 @@
---@diagnostic disable: missing-fields
if lazyvim_docs then
-- set to `true` to follow the main branch
-- you need to have a working rust toolchain to build the plugin
@ -101,9 +102,11 @@ return {
--- NOTE: compat with latest version. Currenlty 0.7.6
if not vim.g.lazyvim_blink_main then
---@diagnostic disable-next-line: inject-field
opts.sources.completion = opts.sources.completion or {}
opts.sources.completion.enabled_providers = enabled
if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then
---@diagnostic disable-next-line: assign-type-mismatch
opts.completion.menu.draw.treesitter = true
end
end
@ -119,6 +122,7 @@ return {
local kind_idx = #CompletionItemKind + 1
CompletionItemKind[kind_idx] = provider.kind
---@diagnostic disable-next-line: no-unknown
CompletionItemKind[provider.kind] = kind_idx
---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[]