Skip to content

Commit

Permalink
Try out Neocodeium
Browse files Browse the repository at this point in the history
  • Loading branch information
primeapple committed Jan 13, 2025
1 parent 724f389 commit 38bb76f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "64e95aa77587d04f97a5579b2106a82a08a7d968" },
"neocodeium": { "branch": "main", "commit": "4da81528468b33585c411f31eb390dce573ccb14" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
Expand Down
24 changes: 24 additions & 0 deletions .config/nvim/lua/plugins/neocodeium.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
return {
{
'monkoose/neocodeium',
event = 'VeryLazy',
config = function()
local neocodeium = require('neocodeium')
neocodeium.setup({
manual = true,
})

-- close nvim cmp when ai completions are displayed
vim.api.nvim_create_autocmd('User', {
pattern = 'NeoCodeiumCompletionDisplayed',
callback = function()
require('cmp').abort()
end,
})
vim.keymap.set('i', '<A-Space>', neocodeium.cycle_or_complete)
vim.keymap.set('i', '<A-l>', neocodeium.accept)
vim.keymap.set('i', '<A-f>', neocodeium.accept_word)
vim.keymap.set('i', '<C-f>', neocodeium.accept_line)
end,
},
}

0 comments on commit 38bb76f

Please sign in to comment.