refactor: use actions

This commit is contained in:
Folke Lemaitre 2024-11-11 08:57:18 +01:00
parent 3f404079dc
commit f40a2a1faa
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 100 additions and 64 deletions

View file

@ -1,3 +1,10 @@
if lazyvim_docs then
-- set to `true` to follow the main branch
-- you need to have a working rust toolchain to build the plugin
-- in this case.
vim.g.lazyvim_blink_main = false
end
return {
{
"hrsh7th/nvim-cmp",
@ -5,7 +12,8 @@ return {
},
{
"saghen/blink.cmp",
version = "*",
version = not vim.g.lazyvim_blink_main and "*",
build = vim.g.lazyvim_blink_main and "cargo build --release",
opts_extend = {
"sources.completion.enabled_providers",
"sources.compat",
@ -59,11 +67,8 @@ return {
keymap = {
preset = "enter",
["<tab>"] = {
"snippet_forward",
function()
return LazyVim.cmp.ai_accept()
end,
["<Tab>"] = {
LazyVim.cmp.map({ "snippet_forward", "ai_accept" }),
"fallback",
},
},