@@ -19,7 +19,6 @@ lua/codex/init.lua (public API facade, DI container, setup wiring)
1919 ├──► config.lua (defaults, validation, deep merge)
2020 ├──► logger.lua (level-gated vim.notify wrapper)
2121 ├──► nvim/commands.lua (user command registration)
22- ├──► nvim/keymaps.lua (default keymap registration)
2322 ├──► providers/init.lua (provider registry + auto-resolution)
2423 │ ├── native.lua
2524 │ └── snacks.lua
@@ -57,8 +56,6 @@ codex.nvim/
5756│ ├── nvim/
5857│ │ ├── commands.lua # Registers all :Codex* user commands. Each command
5958│ │ # delegates to the corresponding init.lua API function.
60- │ │ └── keymaps.lua # Registers default keymaps, skips collisions by default,
61- │ │ # supports keymaps_force overrides, and handles re-register.
6259│ ├── providers/
6360│ │ ├── init.lua # Provider registry. Maps names to module paths,
6461│ │ │ # lazy-loads on first resolve, implements auto-resolution
@@ -224,7 +221,6 @@ local default_deps = {
224221 session_store = require (" codex.state.session_store" ),
225222 send_queue = require (" codex.runtime.send_queue" ),
226223 commands = require (" codex.nvim.commands" ),
227- keymaps = require (" codex.nvim.keymaps" ),
228224 formatter = require (" codex.context.formatter" ),
229225 selection = require (" codex.context.selection" ),
230226 path = require (" codex.context.path" ),
@@ -249,6 +245,10 @@ After resolving deps and config, `setup()` wires the constructor modules:
249245This wiring order allows ` send_dispatch ` to reference the send queue (via
250246closure) even though the queue is created after the dispatch instance.
251247
248+ After wiring, setup registers ` :Codex* ` commands and cleanup autocmds. Global
249+ keymaps are intentionally not managed in runtime setup; users configure them in
250+ their plugin manager (for example lazy.nvim ` keys ` ).
251+
252252### Error Handling
253253
254254The codebase uses two error-reporting strategies:
@@ -292,29 +292,28 @@ and `---@alias` annotations. This file contains no runtime code (`return {}`).
292292
293293Key types:
294294
295- | Type | Kind | Purpose |
296- | ---------------------------- | ----- | ------------------------------------------------------------- |
297- | ` codex.Config ` | class | Merged configuration after ` setup() ` |
298- | ` codex.TerminalConfig ` | class | Nested terminal-specific options |
299- | ` codex.WindowType ` | alias | Window mode union: ` vsplit ` , ` hsplit ` , ` float ` |
300- | ` codex.VsplitConfig ` | class | Vertical split options (` side ` , ` size_pct ` ) |
301- | ` codex.HsplitConfig ` | class | Horizontal split options (` side ` , ` size_pct ` ) |
302- | ` codex.FloatConfig ` | class | Floating window options (size, border, title, title_pos) |
303- | ` codex.TerminalKeymapConfig ` | class | Terminal-local keymaps (` toggle ` , ` clear_input ` , ` close ` ) |
304- | ` codex.KeymapConfig ` | class | Keymap action table (` string ` or ` false ` per action) |
305- | ` codex.ProviderName ` | alias | Union of valid provider name strings |
306- | ` codex.LogLevel ` | alias | Union of log level strings |
307- | ` codex.Provider ` | class | 9-method structural interface for providers |
308- | ` codex.ProviderHandle ` | alias | Opaque handle (` table ` ) returned by ` provider.open() ` |
309- | ` codex.Session ` | class | Session record extending ` codex.SessionSpec ` |
310- | ` codex.SessionSpec ` | class | Spec for creating a new session |
311- | ` codex.SelectionSpec ` | class | Visual selection data (defined in ` formatter.lua ` ) |
312- | ` codex.SelectionOpts ` | class | Options for selection extraction (defined in ` selection.lua ` ) |
313- | ` codex.UserCommandOpts ` | class | Neovim user command callback argument shape |
314- | ` codex.PendingSend ` | class | Queued send item (defined in ` send_dispatch.lua ` ) |
315- | ` codex.DispatchSendOpts ` | class | Options for dispatch_send (defined in ` send_dispatch.lua ` ) |
316- | ` codex.ResumeOpts ` | class | Options for the resume API (defined in ` init.lua ` ) |
317- | ` codex.SendResult ` | alias | Boolean result alias (defined in ` init.lua ` ) |
295+ | Type | Kind | Purpose |
296+ | ---------------------------- | ----- | ---------------------------------------------------------------- |
297+ | ` codex.Config ` | class | Merged configuration after ` setup() ` |
298+ | ` codex.TerminalConfig ` | class | Nested terminal-specific options |
299+ | ` codex.WindowType ` | alias | Window mode union: ` vsplit ` , ` hsplit ` , ` float ` |
300+ | ` codex.VsplitConfig ` | class | Vertical split options (` side ` , ` size_pct ` ) |
301+ | ` codex.HsplitConfig ` | class | Horizontal split options (` side ` , ` size_pct ` ) |
302+ | ` codex.FloatConfig ` | class | Floating window options (size, border, title, title_pos) |
303+ | ` codex.TerminalKeymapConfig ` | class | Terminal-local keymaps (` toggle ` , ` clear_input ` , ` close ` , ` nav ` ) |
304+ | ` codex.ProviderName ` | alias | Union of valid provider name strings |
305+ | ` codex.LogLevel ` | alias | Union of log level strings |
306+ | ` codex.Provider ` | class | 9-method structural interface for providers |
307+ | ` codex.ProviderHandle ` | alias | Opaque handle (` table ` ) returned by ` provider.open() ` |
308+ | ` codex.Session ` | class | Session record extending ` codex.SessionSpec ` |
309+ | ` codex.SessionSpec ` | class | Spec for creating a new session |
310+ | ` codex.SelectionSpec ` | class | Visual selection data (defined in ` formatter.lua ` ) |
311+ | ` codex.SelectionOpts ` | class | Options for selection extraction (defined in ` selection.lua ` ) |
312+ | ` codex.UserCommandOpts ` | class | Neovim user command callback argument shape |
313+ | ` codex.PendingSend ` | class | Queued send item (defined in ` send_dispatch.lua ` ) |
314+ | ` codex.DispatchSendOpts ` | class | Options for dispatch_send (defined in ` send_dispatch.lua ` ) |
315+ | ` codex.ResumeOpts ` | class | Options for the resume API (defined in ` init.lua ` ) |
316+ | ` codex.SendResult ` | alias | Boolean result alias (defined in ` init.lua ` ) |
318317
319318` codex.ProviderHandle ` is intentionally opaque (` table ` ). Providers define their
320319own internal handle structure; the core never inspects handle contents.
0 commit comments