Skip to content

Commit

Permalink
feat: Add chatgpt.nvim (optionally)
Browse files Browse the repository at this point in the history
You must provide an OpenAI token in your user config in
plugins.chatgpt.opts! Refer to the plugin documentation
  • Loading branch information
Allaman committed Feb 2, 2024
1 parent bc66d27 commit a5c52f5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ I decided to move to my own fresh Lua based Neovim from my good old vimrc trying
- Better writing with [ltex-ls](https://valentjn.github.io/ltex/index.html)
- Dashboard via [alpha.nvim](https://github.com/goolord/alpha-nvim) with recent files and quick links
- Multiple preconfigured themes like [catppuccin](https://github.com/catppuccin/nvim), [tokyonight](https://github.com/folke/tokyonight.nvim), [nightfox](https://github.com/EdenEast/nightfox.nvim), and more
- AI assistance with [ChatGPT.nvim](https://github.com/jackMort/ChatGPT.nvim) (optionally)
- Health check via `checkhealth core`
- Lazy loading plugins (25 of 92 in my case)
- Startup <= 70ms 🚀
Expand Down
5 changes: 5 additions & 0 deletions lua/config/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ return {
-- disable quick links of the dashboard
disable_dashboard_quick_links = false,
},
-- https://github.com/jackMort/ChatGPT.nvim
chatgpt = {
enable = false,
opts = {},
},
-- https://github.com/zbirenbaum/copilot.lua
copilot = {
enable = false,
Expand Down
16 changes: 16 additions & 0 deletions lua/core/plugins/chatgpt.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local conf = vim.g.config.plugins.chatgpt
return {
"jackMort/ChatGPT.nvim",
enabled = conf.enable,
cmd = "ChatGPT",
opts = conf.opts,
-- config = function()
-- require("chatgpt").setup()
-- end,
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"folke/trouble.nvim",
"nvim-telescope/telescope.nvim",
},
}

0 comments on commit a5c52f5

Please sign in to comment.