Fitten Code AI Programming Assistant for Neovim, helps you to use AI for automatic completion in Neovim, with support for functions like login, logout, shortcut key completion.
- ๐ Fast completion thanks to
Fitten Code
andcurl
- ๐ Asynchronous I/O for improved performance
- โญ๏ธ Accept all suggestions with
Tab
- ๐งช Accept line with
Ctrl + โฌ๏ธ
- ๐ Accept word with
Ctrl + โก๏ธ
- โ๏ธ Undo accepted text
- ๐งจ Automatic scrolling when previewing or completing code
- ๐ฐ๏ธ Run as a
nvim-cmp
source
- Neovim >= 0.8.0
- curl
Install the plugin with your preferred package manager:
{
'luozhiya/fittencode.nvim',
config = function()
require('fittencode').setup()
end,
}
use {
'luozhiya/fittencode.nvim',
config = function()
require('fittencode').setup()
end,
}
fittencode.nvim comes with the following defaults:
{
disable_specific_inline_completion = {
-- Disable auto-completion for some specific file suffixes by entering them below
-- For example, `suffixes = {'lua', 'cpp'}`
suffixes = {},
},
inline_completion = {
-- Enable inline code completion.
enable = true,
},
-- Set the mode of the completion.
-- Available options:
-- - 'inline' (default)
-- - 'source'
completion_mode = 'inline',
use_default_keymaps = true,
log = {
level = vim.log.levels.WARN,
},
}
Set updatetime
to a lower value to improve performance:
-- Neovim default updatetime is 4000
vim.opt.updatetime = 200
require('fittencode').setup({
completion_mode ='source',
})
require('cmp').setup({
sources = { name = 'fittencode', group_index = 1 },
mapping = {
['<cr>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }),
}
})
Command | Description |
---|---|
Fitten login |
Try the command Fitten login <user> <password> to login. |
Fitten logout |
Logout account |
Mappings | Action |
---|---|
Tab |
Accept all suggestions |
Ctrl + โฌ๏ธ |
Accept line |
Ctrl + โก๏ธ |
Accept word |