Avante source for blink.cmp
Use @
to trigger the mention completion:
Accept the @file
or @quickfix
will open the selector for the file or quickfix list:
Use /
to trigger the command completion:
Add the plugin to your packer managers, and make sure it is loaded before blink.cmp
.
{
'saghen/blink.cmp',
dependencies = {
'Kaiser-Yang/blink-cmp-avante',
-- ... Other dependencies
},
opts = {
sources = {
-- Add 'avante' to the list
default = { 'avante', 'lsp', 'path', 'luasnip', 'buffer' },
providers = {
avante = {
module = 'blink-cmp-avante',
name = 'Avante',
opts = {
-- options for blink-cmp-avante
}
}
},
}
}
}
See default.lua.
Customize the BlinkCmpKindAvante
to customize the highlight for kind icon, here is an example:
vim.api.nvim_set_hl(0, 'BlinkCmpKindAvante', { default = false, fg = '#89b4fa' })
Firstly, you need to customize the get_kind_name
, here is an example:
avante = {
command = {
get_kind_name = function(_)
return 'AvanteCmd'
end
},
mention = {
get_kind_name = function(_)
return 'AvanteMention'
end
}
}
Then, you should customize the kind_icons
:
kind_icons = {
AvanteCmd = '',
AvanteMention = '',
}
Maybe, you want to customize the highlight for icons:
vim.api.nvim_set_hl(0, 'BlinkCmpKindAvanteCmd', { default = false, fg = '#89b4fa' })
vim.api.nvim_set_hl(0, 'BlinkCmpKindAvanteMention', { default = false, fg = '#89b4fa' })
The release versions are something like major.minor.patch
. When one of these numbers is increased:
patch
: bugs are fixed or docs are added. This will not break the compatibility.minor
: compatible features are added. This may cause some configurationsdeprecated
, but not break the compatibility.major
: incompatible features are added. All thedeprecated
configurations will be removed. This will break the compatibility.
Nice and fast completion plugin: blink.cmp.