feat(ai): conditionally enable ChatGPT plugin

This commit is contained in:
2024-09-16 14:05:18 -04:00
parent 16d98a918c
commit aa33c6e538
3 changed files with 9 additions and 0 deletions
+4
View File
@@ -31,6 +31,8 @@ vim.g.usemusic = false ---@type boolean Options: <true|false>
vim.g.usehardtime = false ---@type boolean Options: <true|false>
-- Enable Image plugin on compatible terminals
vim.g.useimage = true ---@type boolean Options: <true|false>
-- Enable LazyGit plugin
vim.g.uselazygit = true ---@type boolean Options: <true|false>
-- Ignore missing lazy.nvim plugin manager
vim.g.ignore_no_lazy = false ---@type boolean Options: <true|false>
-- Enable codesnap for code screenshots
@@ -57,6 +59,8 @@ vim.g.aitool = "neocodeium" ---@type string Options: [ai tool]
-- │ from the list  │  minuet
-- │ │  ollama
-- ╰───────────────────────────╯  none
-- Enable ChatGPT plugin for AI chat
vim.g.usechatgpt = false ---@type boolean Options: <true|false>
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ STATUS COLUMN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vim.g.statuscolumn = "native" ---@type string Options: [statuscolumn]
+4
View File
@@ -25,6 +25,10 @@ M.barsNlines = function()
return false
end
M.chatgpt = function()
return func.check_global_var("usechatgpt", true, false)
end
--- Codeium conditional options
M.codeium = function()
return func.check_global_var("aitool", "codeium", "neocodeium")
+1
View File
@@ -34,6 +34,7 @@ return {
{ -- ChatGPT
"jackMort/ChatGPT.nvim",
event = "VeryLazy",
enabled = data.cond.chatgpt,
keys = data.keys.chatgpt.func,
opts = data.types.chatgpt,
dependencies = data.deps.chatgpt,