From 033f3a8a68d0ead0cb003b8768443e77bfaaadbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Kr=C3=BCger?= Date: Wed, 12 Aug 2026 13:00:30 +0100 Subject: [PATCH] docs: deprecate plugin --- README.md | 208 ++---------------------------------------------------- 1 file changed, 5 insertions(+), 203 deletions(-) diff --git a/README.md b/README.md index e390c0c..122c369 100644 --- a/README.md +++ b/README.md @@ -1,205 +1,7 @@ # codex.nvim -Minimal Neovim integration for running the Codex CLI in a right-side -[Snacks terminal](https://github.com/folke/snacks.nvim/blob/main/docs/terminal.md). - -> [!NOTE] -> This plugin is vibe-coded. - -## Installation - -With [lazy.nvim](https://github.com/folke/lazy.nvim): - -```lua -{ - "vapourismo/codex.nvim", - dependencies = { - "folke/snacks.nvim", - }, -} -``` - -Then run: - -```vim -:CodexToggle -``` - -Additional session commands are available: - -```vim -:CodexNew -:CodexClose -:CodexPrevious -:CodexNext -``` - -Use `:CodexReference` from Visual mode to insert the selected file range into -the active Codex prompt. It supports characterwise and linewise selections and -does not submit the prompt. - -## Keymap - -No global keymap is registered. Codex terminal buffers get terminal-local -Snacks window keys for session management: - -- ``: create a new Codex session for the current directory. -- ``: close the current Codex session. -- ``: switch to the previous Codex session for the current directory. -- ``: switch to the next Codex session for the current directory. - -You can also add your own global mapping from your Neovim config: - -```lua -vim.keymap.set("n", "cc", function() - require("codex").toggle() -end, { desc = "Toggle Codex" }) - -vim.keymap.set("x", "cr", ":CodexReference", { - desc = "Reference selection in Codex", -}) -``` - -## Configuration - -The defaults run `codex` from `vim.fn.getcwd()`. Each resolved directory keeps -its own active Codex session list. - -```lua -{ - "vapourismo/codex.nvim", - dependencies = { - "folke/snacks.nvim", - }, - opts = { - args = { - "--config", - 'tui.notification_method="osc9"', - }, - cwd = function() - return vim.fn.getcwd() - end, - keys = { - close = "", - new = "", - previous = "", - next = "", - }, - win = { - width = 0.35, - }, - }, -} -``` - -You can also call setup directly: - -```lua -require("codex").setup({ - command = "codex", - args = { "--config", 'tui.notification_method="osc9"' }, - cwd = function() - return vim.fn.getcwd() - end, - count = 1, - on_notification = function(data) - vim.notify(data.message or "Codex needs attention", vim.log.levels.INFO, { - title = ("Codex session %d"):format(data.count), - }) - end, - keys = { - close = "", - new = "", - previous = "", - next = "", - }, - win = { - position = "right", - relative = "editor", - width = 0.4, - wo = { - winhighlight = "Normal:NormalFloat", - winfixwidth = false, - }, - }, - terminal = {}, -}) -``` - -Supported options: - -- `command`: executable name or path. Defaults to `"codex"`. -- `args`: command arguments. Defaults to `{ "--config", 'tui.notification_method="osc9"' }`. -- `cwd`: working directory string or function returning a string. Defaults to `vim.fn.getcwd()`. -- `count`: first Snacks terminal count for each directory. Defaults to `1`. -- `on_notification`: optional callback for OSC 9 notifications. Defaults to `nil`. -- `keys`: terminal-local session keys. Set an entry to `false` to disable it. -- `win`: options merged into the Snacks window config. Defaults include `win.wo.winhighlight = "Normal:NormalFloat"` and `win.wo.winfixwidth = false`; only `win.wo.winbar` is reserved and managed by `codex.nvim`. -- `terminal`: options merged into the Snacks terminal config. - -When more than one session exists for the current directory, Codex terminal -windows show a managed winbar with numbered session boxes. The visible terminal -is highlighted, and session labels are displayed as `1`, `2`, `3`, ... in the -current session order. - -Programmatic usage: - -```lua -require("codex").toggle({ - cwd = vim.fn.getcwd(), - args = { - "--config", - 'tui.notification_method="osc9"', - "--ask-for-approval", - "on-request", - }, -}) - -require("codex").new() -require("codex").close() -require("codex").previous() -require("codex").next() -require("codex").reference() -- call from characterwise or linewise Visual mode -``` - -## Notifications - -On Neovim 0.10 or newer, `codex.nvim` uses the buffer-local `TermRequest` -event to call `on_notification` for direct OSC 9 notifications from Codex. -The default `args` enable these notifications with -`--config 'tui.notification_method="osc9"'`, so no persistent `config.toml` -setting is needed. - -Setup-level and per-call `args` replace the defaults and are passed to Codex -unchanged. If you customize `args` and want OSC 9 notifications, include the -notification configuration explicitly, before any `--` delimiter. - -Standalone BEL bytes, unrelated terminal requests, and tmux-wrapped DCS -sequences are ignored. Terminal stdout callbacks are left unchanged. When -`on_notification` is unset, no notification handler is attached. - -The callback's `data` table contains: - -- `method`: always `"osc9"`. -- `message`: the OSC 9 payload. -- `buf`: the source terminal buffer. -- `cwd`: the session working directory. -- `count`: the Snacks session identifier. - -For example, configure it during setup: - -```lua -require("codex").setup({ - on_notification = function(data) - vim.notify(data.message or "Codex needs attention", vim.log.levels.INFO, { - title = ("Codex session %d"):format(data.count), - }) - end, -}) -``` - -A custom `terminal.override` must return a Neovim terminal buffer for -`TermRequest` notification handling to work. - -`codex.nvim` requires Neovim 0.10+, `folke/snacks.nvim`, and the `codex` -executable to be available on `$PATH`. +> [!WARNING] +> **This plugin is deprecated and is no longer maintained.** +> +> Use [vapourismo/terminals.nvim](https://tangled.org/ole.lol/terminals.nvim) +> instead. It can be configured to provide the same functionality. -- knotmirror 0.0.1