Skip to content

gera2ld/coc-ai

Repository files navigation

coc-ai

NPM

A coc.nvim plugin to support AI in Neovim.

Currently powered by Google Gemini.

1.mp4

Installation

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"
}

Usage

" 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.

Related Projects

  • ai.nvim - A Neovim plugin written in Lua, powered by Gemini

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published