add new condtionals for plugins that can be toggled/disabled
This commit is contained in:
+33
-1
@@ -36,14 +36,17 @@ M.barsNlines = function()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Avante conditional options
|
||||||
M.avante = function()
|
M.avante = function()
|
||||||
return func.check_global_var('useavante', true, false)
|
return func.check_global_var('useavante', true, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- ChatGPT conditional options
|
||||||
M.chatgpt = function()
|
M.chatgpt = function()
|
||||||
return func.check_global_var('usechatgpt', true, false)
|
return func.check_global_var('usechatgpt', true, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- GP conditional options
|
||||||
M.gp = function()
|
M.gp = function()
|
||||||
return func.check_global_var('usegpai', true, false)
|
return func.check_global_var('usegpai', true, false)
|
||||||
end
|
end
|
||||||
@@ -79,6 +82,11 @@ M.bufferline = function()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Code-Companion conditional options
|
||||||
|
M.codecompanion = function()
|
||||||
|
return func.check_global_var('usecodecomp', true, false)
|
||||||
|
end
|
||||||
|
|
||||||
--- CoPilot conditional options
|
--- CoPilot conditional options
|
||||||
M.copilot = function()
|
M.copilot = function()
|
||||||
return vim.g.aitool == 'copilot'
|
return vim.g.aitool == 'copilot'
|
||||||
@@ -172,16 +180,29 @@ M.nekifoch = function()
|
|||||||
return func.is_kitty()
|
return func.is_kitty()
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Tabnine conditional options
|
|
||||||
--- Codeium conditional options
|
--- Codeium conditional options
|
||||||
M.neocodeium = function()
|
M.neocodeium = function()
|
||||||
return func.check_global_var('aitool', 'neocodeium', 'neocodeium')
|
return func.check_global_var('aitool', 'neocodeium', 'neocodeium')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.neotree = function()
|
||||||
|
return func.check_global_var('useneotree', true, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
M.treesitter = function()
|
||||||
|
-- Only load for editable buffers
|
||||||
|
return vim.bo.buftype == '' and not vim.bo.readonly
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Tabnine conditional options
|
||||||
M.tabnine = function()
|
M.tabnine = function()
|
||||||
return func.check_global_var('aitool', 'tabnine', 'neocodeium')
|
return func.check_global_var('aitool', 'tabnine', 'neocodeium')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.tiny_inline_diagnostic = function()
|
||||||
|
return func.check_global_var('usetinyinline', true, false)
|
||||||
|
end
|
||||||
|
|
||||||
M.todo = function()
|
M.todo = function()
|
||||||
if func.check_global_var('usetodo', true, true) then
|
if func.check_global_var('usetodo', true, true) then
|
||||||
if not func.is_neovide() then
|
if not func.is_neovide() then
|
||||||
@@ -200,6 +221,12 @@ M.tmux = function()
|
|||||||
return func.is_tmux()
|
return func.is_tmux()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Use Smart-splits conditional
|
||||||
|
M.use_splits = function()
|
||||||
|
-- return not func.is_ghostty()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
--- WakaTime conditional options
|
--- WakaTime conditional options
|
||||||
M.wakatime = function()
|
M.wakatime = function()
|
||||||
return vim.g.usewakatime
|
return vim.g.usewakatime
|
||||||
@@ -210,4 +237,9 @@ M.wezterm = function()
|
|||||||
return func.is_wezterm()
|
return func.is_wezterm()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Yazi conditional options
|
||||||
|
M.yazi = function()
|
||||||
|
return func.check_global_var('useyazi', true, false)
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user