diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f81dce4..c6c6d53 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -384,7 +384,9 @@ return { { "jackMort/ChatGPT.nvim", dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" }, - -- init = function() + lazy = true, + event = "VeryLazy", + -- opts = function() -- require("user.chat_gpt") -- end, }, diff --git a/lua/user/chat_gpt.lua b/lua/user/chat_gpt.lua index 5022bbb..ecb3bbc 100644 --- a/lua/user/chat_gpt.lua +++ b/lua/user/chat_gpt.lua @@ -1,4 +1,9 @@ -require("chatgpt").setup({ +local status_ok, chatgpt = pcall(require, "chatgpt") +if not status_ok then + return +end + +chatgpt.setup({ welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy godot robot loading_text = "loading", question_sign = "", -- you can use emoji if you want e.g. 🙂