Skip to content

Bug: lua-ls annotations reports spurious diagnostics for blink.cmp-config #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
chrisgrieser opened this issue Nov 24, 2024 · 0 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@chrisgrieser
Copy link
Contributor

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

the lua annotations are quite useful for managing such a large config.

---@module 'blink.cmp'
---@type blink.cmp.Config

However, it seems that the blink.cmp type definitions defines some optional values as required, as when using lazydev.nvim, all these get reported, even they are not a problem:

Pasted image 2024-11-24 at 20 38 40@2x

Relevant configuration

---@module 'blink.cmp'
---@type blink.cmp.Config
local opts = {
	sources = {
		providers = {
			snippets = {
				min_keyword_length = 1,
				score_offset = -1,
			},
			buffer = {
				fallback_for = {},
				max_items = 4,
				min_keyword_length = 4,
				score_offset = -3,
			},
		},
	},
	windows = {
		autocomplete = {
			draw = {
				columns = {
					{ "label", "label_description", "kind_icon" },
				},
				components = {
					label = {
						width = { max = 35 },
					},
					kind_icon = {
						text = function(ctx) return ctx.kind_icon end,
					},
				},
			},
		},
	},
}

neovim version

NVIM v0.10.2

blink.cmp version: branch, tag, or commit

0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant