A coc.nvim plugin to support AI in Neovim.
Currently powered by Google Gemini.
1.mp4
First get an API key from Gemini. It's free!
:CocInstall coc-ai
Set the API key and other options in :CocConfig
:
{
"coc-ai.geminiApiKey": "PUT_YOUR_KEY_HERE",
"coc-ai.locale": "en",
"coc-ai.alternateLocale": "zh"
}
" Define the word under cursor
:CocCommand ai.handleCword define
" Define a word
:CocCommand ai.handle define happy
" Translate the selected text
:CocCommand ai.handle translate
" Translate the specified text
:CocCommand ai.handle translate I am happy.
" Ask anything, either specified or from the selected text
:CocCommand ai.handle freeStyle Tell a joke.
- ai.nvim - A Neovim plugin written in Lua, powered by Gemini