-
Hello! Can you please add some additional documentation and examples around ---@type LazySpec
return {
'saghen/blink.cmp',
build = 'cargo build --release',
event = 'InsertEnter',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = { preset = 'default' },
appearance = { nerd_font_variant = 'normal' },
completion = { documentation = { auto_show = true } },
snippets = { preset = 'luasnip' },
signature = { enabled = true },
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer', 'emoji' },
providers = {
emoji = {
module = "blink-emoji",
name = "Emoji",
score_offset = 15,
should_show_items = function()
return vim.tbl_contains(
{ "gitcommit", "markdown" },
vim.o.filetype
)
end,
}
},
},
},
opts_extend = { "sources.default" },
dependencies = {
{ 'L3MON4D3/LuaSnip' },
'moyiz/blink-emoji.nvim',
},
} It's not exactly clear how I'm supposed to use it---am I supposed to put the I've poured over the docs but these questions just aren't clear... Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Looks like $ rg --files-with-matches -e opts_extend
doc/installation.md
doc/blink-cmp.txt |
Beta Was this translation helpful? Give feedback.
-
This is a {
{
'saghen/blink.cmp',
opts_extend = { 'foo' },
opts = { foo = { 'bar' } }
},
{
'saghen/blink.cmp',
opts = { foo = { 'baz' } }
}
} With |
Beta Was this translation helpful? Give feedback.
-
Looks like |
Beta Was this translation helpful? Give feedback.
This is a
lazy.nvim
setting that forces lists to be merged, rather than replaced, when merging plugin specs together. For example:With
opts_extend
, the result will befoo = { 'bar', 'baz' }
. Without it, the result will befoo = { 'baz' }
(takes the latest value).