Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/IwasakiYuuki/ai-assistant.nvim
- Owner: IwasakiYuuki
- License: mit
- Created: 2023-03-04T01:38:49.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2023-03-26T09:20:02.000Z (over 1 year ago)
- Last Synced: 2024-06-20T14:06:14.327Z (5 months ago)
- Topics: ai, chatgpt, neovim, neovim-plugin, terminal
- Language: Python
- Homepage:
- Size: 3.93 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-vim-llm-plugins - IwasakiYuuki/ai-assistant.nvim
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.