From 05ac6d2b524b58e137a6455d73dff65c9d465234 Mon Sep 17 00:00:00 2001 From: gutz430 Date: Wed, 4 Feb 2026 11:30:34 +0100 Subject: [PATCH] feat: added codex and what counts as word to init.lua --- init.lua | 7 +++++++ lua/plugins/codex.lua | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 lua/plugins/codex.lua diff --git a/init.lua b/init.lua index 55fa018..0ae579e 100644 --- a/init.lua +++ b/init.lua @@ -21,6 +21,13 @@ vim.cmd('cnoreabbrev q qa') vim.cmd('cnoreabbrev Q q') vim.cmd('cnoreabbrev x xa') vim.cmd('cnoreabbrev q! qa!') + +-- Editing what counts as a word +vim.cmd('set iskeyword+=-') +vim.cmd('set iskeyword+=.') +vim.cmd('set iskeyword+=:') +vim.cmd('set iskeyword+=/') + -- Keybinds -- Remaps diff --git a/lua/plugins/codex.lua b/lua/plugins/codex.lua new file mode 100644 index 0000000..26c1840 --- /dev/null +++ b/lua/plugins/codex.lua @@ -0,0 +1,26 @@ +return { + 'kkrampis/codex.nvim', + lazy = true, + cmd = { 'Codex', 'CodexToggle' }, -- Optional: Load only on command execution + keys = { + { + 'cc', -- Change this to your preferred keybinding + function() require('codex').toggle() end, + desc = 'Toggle Codex popup or side-panel', + mode = { 'n', 't' } + }, + }, + opts = { + keymaps = { + toggle = nil, -- Keybind to toggle Codex window (Disabled by default, watch out for conflicts) + quit = '', -- Keybind to close the Codex window (default: Ctrl + q) + }, -- Disable internal default keymap (cc -> :CodexToggle) + border = 'rounded', -- Options: 'single', 'double', or 'rounded' + width = 0.8, -- Width of the floating window (0.0 to 1.0) + height = 0.8, -- Height of the floating window (0.0 to 1.0) + model = nil, -- Optional: pass a string to use a specific model (e.g., 'o3-mini') + autoinstall = true, -- Automatically install the Codex CLI if not found + panel = false, -- Open Codex in a side-panel (vertical split) instead of floating window + use_buffer = false, -- Capture Codex stdout into a normal buffer instead of a terminal buffer + }, +}