Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/IwasakiYuuki/ai-assistant.nvim

Neovim plugin to assist you with AI (ChatGPT)
https://github.com/IwasakiYuuki/ai-assistant.nvim

ai chatgpt neovim neovim-plugin terminal

Last synced: 3 months ago
JSON representation

Neovim plugin to assist you with AI (ChatGPT)

Awesome Lists containing this project

README

        

# ai-assistant.nvim
This is a Neovim plugin that allows ChatGPT to be used from within the editor.



# Features
- Receive and display ChatGPT's responses in a dedicated chat history buffer.
- Chat history buffer allows you to review past conversations.
- Asynchronous communication with ChatGPT, not blocking your editing experience.

# Requirements
- Neovim nightly
- [rcarriga/nvim-notify](https://github.com/rcarriga/nvim-notify)
- Setting environment `OPENAI_API_KEY` using OpenAI API

# Install
## lazy.nvim
```lua
{
"rcarriga/nvim-notify",
},
{
"IwasakiYuuki/ai-assistant.nvim",
branch = "develop",
build = ":UpdateRemotePlugins",
dependencies = { "rcarriga/nvim-notify" },
}
```

# Config
## Call plugin command
Press `c`, open / close a window to interact with ChatGPT.
```lua
vim.keymap.set('n', 'c', "AIAssistantToggle")
```

## Local Keymap (avaliable in this plugin's windows)
- (normal/insert) Move into chat history: Ctrl-o
- (normal/insert) Move into prompt: Ctrl-i
- (normal/insert) Refresh chat history: Ctrl-r
- (insert) Abort request: Ctrl-c

# Usage
### 1. Open the chat interface
Press `c` or running the `:AIAssistantToggle` command.

### 2. Send a message
Input your message to ChatGPT via input prompt, and press enter to send request.

### 3. Check response
ChatGPT's response will appear in the chat history window.

### 4. Copy response
Move into chat history window by pressing `Ctrl-o`, copy the ChatGPT's response.

# License
This project is licensed under the MIT License. See the LICENSE file for more details.