Skip to content

Commit 0d4673b

Browse files
committed
Switch to Codium.nvim
Now that it supports inline virtual text and multiline suggestions
1 parent 4a42655 commit 0d4673b

File tree

4 files changed

+53
-26
lines changed

4 files changed

+53
-26
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
return {
2+
"Exafunction/codeium.nvim",
3+
config = function()
4+
require("codeium").setup({
5+
-- Optionally disable cmp source if using virtual text only
6+
enable_cmp_source = true,
7+
virtual_text = {
8+
enabled = true,
9+
10+
-- These are the defaults
11+
12+
-- Set to true if you never want completions to be shown automatically.
13+
manual = false,
14+
-- A mapping of filetype to true or false, to enable virtual text.
15+
filetypes = {},
16+
-- Whether to enable virtual text of not for filetypes not specifically listed above.
17+
default_filetype_enabled = true,
18+
-- How long to wait (in ms) before requesting completions after typing stops.
19+
idle_delay = 75,
20+
-- Priority of the virtual text. This usually ensures that the completions appear on top of
21+
-- other plugins that also add virtual text, such as LSP inlay hints, but can be modified if
22+
-- desired.
23+
virtual_text_priority = 65535,
24+
-- Set to false to disable all key bindings for managing completions.
25+
map_keys = true,
26+
-- The key to press when hitting the accept keybinding but no completion is showing.
27+
-- Defaults to \t normally or <c-n> when a popup is showing.
28+
accept_fallback = nil,
29+
-- Key bindings for managing completions in virtual text mode.
30+
key_bindings = {
31+
-- Accept the current completion.
32+
accept = "<Tab>",
33+
-- Accept the next word.
34+
accept_word = false,
35+
-- Accept the next line.
36+
accept_line = false,
37+
-- Clear the virtual text.
38+
clear = false,
39+
-- Cycle to the next completion.
40+
next = "<M-]>",
41+
-- Cycle to the previous completion.
42+
prev = "<M-[>",
43+
}
44+
}
45+
})
46+
end,
47+
}

lua/custom/plugins/codeium.lua

Lines changed: 0 additions & 21 deletions
This file was deleted.

lua/custom/plugins/mini.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
return { -- Collection of various small independent plugins/modules
22
'echasnovski/mini.nvim',
3-
dependencies = { 'Exafunction/codeium.vim' },
3+
dependencies = { 'Exafunction/codeium.nvim' },
44
config = function()
55
-- Better Around/Inside textobjects
66
--
@@ -28,8 +28,8 @@ return { -- Collection of various small independent plugins/modules
2828
-- cursor information with codeium status instead (it appears on the furthest right of the statusline).
2929
---@diagnostic disable-next-line: duplicate-set-field
3030
statusline.section_location = function()
31-
-- return ''
32-
return vim.api.nvim_call_function('codeium#GetStatusString', {})
31+
-- return vim.api.nvim_call_function('codeium#GetStatusString', {})
32+
return require('codeium.virtual_text').status_string()
3333
end
3434

3535
-- ... and there is more!

lua/custom/plugins/nvim-cmp.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ return { -- Autocompletion
2222
-- into multiple repos for maintenance purposes.
2323
'hrsh7th/cmp-nvim-lsp',
2424
'hrsh7th/cmp-path',
25-
'Exafunction/codeium.vim',
25+
'Exafunction/codeium.nvim',
2626
'brenoprata10/nvim-highlight-colors',
2727

2828
-- If you want to add a bunch of pre-configured snippets,
@@ -55,6 +55,7 @@ return { -- Autocompletion
5555
vsnip = "[VSCode Snippet]",
5656
calc = "[Calc]",
5757
spell = "[Spell]",
58+
Codeium = "[Codeium]",
5859
})[entry.source.name]
5960
return vim_item
6061
end
@@ -113,9 +114,9 @@ return { -- Autocompletion
113114
},
114115
sources = {
115116
{ name = 'nvim_lsp' },
117+
{ name = 'codeium' },
116118
{ name = 'luasnip' },
117119
{ name = 'path' },
118-
{ name = 'codeium' },
119120
},
120121
}
121122
end,

0 commit comments

Comments
 (0)