nvim: re-enable neocodium. bink-cmp config
This commit is contained in:
parent
ccf59fbaee
commit
fec53f5ca0
5 changed files with 79 additions and 36 deletions
home/common/nvim
|
@ -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 = {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue