🐛 fix(nvim): added condition for chatgpt to run when api key is set
This commit is contained in:
parent
03ad7f74cf
commit
22239d71cf
1 changed files with 9 additions and 1 deletions
|
@ -1,8 +1,16 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"jackMort/ChatGPT.nvim",
|
"jackMort/ChatGPT.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
cond = function()
|
||||||
|
local api_key = os.getenv("OPENAI_API_KEY")
|
||||||
|
return api_key and api_key ~= "" and true or false
|
||||||
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
api_key_cmd = nil, --TODO: manage the API key
|
|
||||||
edit_with_instructions = {
|
edit_with_instructions = {
|
||||||
diff = false,
|
diff = false,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue