Closed Wietse closed 1 year ago
Hi @Wietse
Could you write your plugin settings here?
This plugin needs to be set up first. Here is an example of plugin loading when using Packer:
-- Packer
use({
"jackMort/ChatGPT.nvim",
config = function()
require("chatgpt").setup()
end,
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
})
Hello @shutils ,
Thanks for your time!
Could you write your plugin settings here?
Indeed I use Packer. I took the setup code from the readme. I'm not familiar with lua, so I tend to keep my nvim config as simple as possible:
-- ChatGPT
-- https://github.com/jackMort/ChatGPT.nvim
use({
"jackMort/ChatGPT.nvim",
config = function() require("chatgpt").setup({}) end,
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
})
This is inside the require('packer').startup(function(use) ... )
function.
No, not from the readme, from this article: https://dev.to/xxxuutaxxx/awesome-plugin-chatgpt-with-neovim-571d
@Wietse
I tried copying your configuration but couldn't reproduce the issue. I apologize for not being able to help you.
This is my plugins.lua file when I tried it. I hope it can be helpful for your reference.
local fn = vim.fn
local autocmd = vim.api.nvim_create_autocmd
-- Automatically install packer
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system({
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
print("Installing packer close and reopen Neovim...")
vim.cmd([[packadd packer.nvim]])
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
autocmd("BufWritePost", { pattern = "plugins.lua", command = ":source <afile> | PackerSync" })
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init({
display = {
open_fn = function()
return require("packer.util").float({ border = "rounded" })
end,
},
})
-- Install your plugins here
return packer.startup(function(use)
-- My plugins here
use({ "wbthomason/packer.nvim" })
-- chatGpt
use({
"jackMort/ChatGPT.nvim",
config = function() require("chatgpt").setup({}) end,
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
})
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)
I had the same issue, with the configuration example.
However, today I noticed that there's a new commit in the master, which seems to fix the issue https://github.com/jackMort/ChatGPT.nvim/commit/cd060d2dd9abb72e24d7921cdbcf3f57cc720105
I had the same issue, with the configuration example.
However, today I noticed that there's a new commit in the master, which seems to fix the issue cd060d2
Thanks! It seems to be functioning now! I only need to learn how to use it now :-)
Hello, I have the same problem as above
and this is my config
return require('packer').startup(
function(use)
use 'wbthomason/packer.nvim'
use({
"jackMort/ChatGPT.nvim",
config = function()
require("chatgpt").setup()
end,
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
})
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.0',
requires = { {
'nvim-lua/plenary.nvim',
} }
}
use {
'nvim-telescope/telescope-fzf-native.nvim',
run = 'make'
}
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
...
Hello, I have the same problem as above
As @joona pointed out: make sure to update the code. :PackerUpdate
That's what solved it for me.
Hello, I have the same problem as above
As @joona pointed out: make sure to update the code.
:PackerUpdate
That's what solved it for me.
Wish to work for me , but unfortunately not. I'll wait then. Thanks.
I ran :PackerUpdate
and :PackerSync
after that. PackerSync or PackerCompile might be required if you've precompiled the packer plugins.
Hello,
I'm using: NVIM v0.10.0-dev-4163+g05928fe29-Homebrew Build type: Release LuaJIT 2.1.0-beta3
I've just installed the plugin but when I execute
:ChatGPT
I get following error:Do you know how to fix this?
Regards, Wietse