aboutsummaryrefslogtreecommitdiff
path: root/lua/user/mods.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/user/mods.lua')
-rw-r--r--lua/user/mods.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/user/mods.lua b/lua/user/mods.lua
index 457ec74..92f64ed 100644
--- a/lua/user/mods.lua
+++ b/lua/user/mods.lua
@@ -594,5 +594,23 @@ end
--------------------------------------------------
+-- Toggle Codi
+-- Define a global variable to track Codi's state
+local is_codi_open = false
+
+function M.toggleCodi()
+ if is_codi_open then
+ -- Close Codi
+ vim.cmd('Codi!')
+ is_codi_open = false
+ else
+ -- Open Codi
+ vim.cmd('Codi')
+ is_codi_open = true
+ end
+end
+
+--------------------------------------------------
+
-- ...
return M