nvim: re-enable neocodium. bink-cmp config

This commit is contained in:
Daniel Lundin 2025-01-09 14:52:31 +01:00
parent ccf59fbaee
commit fec53f5ca0
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
5 changed files with 79 additions and 36 deletions

View file

@ -1,9 +1,10 @@
require 'blink-cmp'.setup({
keymap = {
preset = 'enter',
-- preset = 'super-tab',
["<PageDown>"] = { "scroll_documentation_down" },
["<PageUp>"] = { "scroll_documentation_up" },
['<Tab>'] = { 'select_next', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' },
['<PageDown>'] = { 'scroll_documentation_down', 'fallback' },
['<PageUp>'] = { 'scroll_documentation_up', 'fallback' },
},
completion = {
accept = {
@ -16,15 +17,35 @@ require 'blink-cmp'.setup({
window = { border = 'rounded', },
},
ghost_text = { enabled = true },
ghost_text = { enabled = false },
list = {
selection = { preselect = false, auto_insert = false },
selection = {
preselect = false,
auto_insert = false
},
},
menu = {
auto_show = false,
},
auto_show = true,
direction_priority = { 'n' },
draw = {
components = {
kind_icon = {
ellipsis = false,
text = function(ctx)
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
return kind_icon
end,
-- Optionally, you may also use the highlights from mini.icons
highlight = function(ctx)
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
return hl
end,
}
}
}
}
},
fuzzy = {
@ -39,7 +60,7 @@ require 'blink-cmp'.setup({
},
sources = {
default = { 'lsp', 'codeium', 'buffer' },
default = { 'lsp', 'codeium' },
cmdline = {},
providers = {
codeium = {

View file

@ -124,6 +124,27 @@ in
'';
}
{
plugin = pkgs.vimUtils.buildVimPlugin {
name = "neocodeium";
src = pkgs.fetchFromGitHub {
owner = "monkoose";
repo = "neocodeium";
rev = "4da81528468b33585c411f31eb390dce573ccb14"; # v1.8.0
hash = "sha256-1n9nNqBNwNDSzbAkm8eB4HZLNy5HmMg25jPwQAnW5OU=";
};
doCheck = false;
};
type = "lua";
config = ''
local neocodeium =require('neocodeium')
neocodeium.setup()
vim.keymap.set("i", "<C-j>", neocodeium.accept, { remap = true })
vim.keymap.set("i", "<A-f>", neocodeium.accept, { remap = true })
vim.keymap.set("i", "<C-h>", neocodeium.cycle_or_complete, { remap = true })
'';
}
{
plugin = pkgs.vimUtils.buildVimPlugin {
name = "diagflow";

View file

@ -65,7 +65,7 @@ vim.o.showcmd = false
vim.o.showmode = false
vim.o.smoothscroll = true
vim.o.splitkeep = "screen"
vim.o.timeoutlen = 10
vim.o.timeoutlen = 1
vim.o.timeout = true
vim.o.updatetime = 50