Skip to content

lanceshih/chatgpt.nvim

 
 

Repository files navigation

chatgpt.vim 🤖

chatgpt.nvim is a Neovim plugin that lets you query ChatGPT inside a Neovim buffer.

Demo

asciicast

Installation

n.b. You must have python3 installed on your machine in order to install and use this plugin.

You can install this plugin with packer or any other vim plugin manager:

use({
  'terror/chatgpt.nvim',
  run = 'pip3 install -r requirements.txt'
})

Configuration

The plugin looks for a configuration file in your home directory called .chatgpt-nvim.json, and it expects a valid OpenAI api key to be set for queries to work:

{ "api_key": "<API-KEY>" }

You can get an api key from OpenAI via their website.

Commands

Below are the available commands this plugin supports:

Name Arguments Description
ChatGPT Open a new interactive ChatGPT environment
ChatGPT [query] Load a ChatGPT response to query into the Neovim command prompt.

About

Query ChatGPT in Neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.1%
  • Just 4.1%
  • Shell 1.8%