A standalone Language Server
for .codex files — free-form prompt text (exactly what you'd type into the
Codex CLI input box) containing @file references, /slash commands, and
@skill mentions. Plug it into any LSP-capable editor for completion and
validation.
Build the release binary:
cargo build --releaseCreate a stable link somewhere on your PATH:
mkdir -p ~/.local/bin
ln -sf "$PWD/target/release/codex-lsp" ~/.local/bin/codex-lspIf ~/.local/bin is not already on your PATH, add it to your shell config:
export PATH="$HOME/.local/bin:$PATH"Verify that your shell can find the server:
which codex-lspYou can also skip the link and use the absolute path to the binary in your editor config:
/path/to/codex-lsp/target/release/codex-lspAdd codex-lsp to your favourite code editor by following the setup below.
The server speaks LSP over stdio, so your editor needs to launch the
codex-lsp binary for *.codex files.
The VS Code extension lives in editors/vscode. First make sure the
codex-lsp binary is available by following the setup below, then package and
install the VSIX:
cd editors/vscode
npm install
npm run compile
npm install -g @vscode/vsce
vsce package
code --install-extension codex-lsp-vscode-0.0.1.vsixRestart VS Code after installing the extension. Opening any .codex file should
then start codex-lsp automatically.
If VS Code cannot find the server because it was launched outside your shell,
set codexLsp.serverPath to the absolute path of the release binary:
{
"codexLsp.serverPath": "/path/to/codex-lsp/target/release/codex-lsp"
}See editors/vscode/README.md for the full VS Code workflow.
The Zed extension lives in editors/zed. First build codex-lsp and put it on
your PATH, then install the Zed wrapper as a dev extension:
cargo build --release
mkdir -p ~/.local/bin
ln -sf "$PWD/target/release/codex-lsp" ~/.local/bin/codex-lspIn Zed, run zed: install dev extension from the command palette and select
the editors/zed directory. Opening any .codex file should then start
codex-lsp automatically.
If Zed cannot find the server because it was launched outside your shell, set the language server binary path in Zed settings:
{
"lsp": {
"codex-lsp": {
"binary": {
"path": "/path/to/codex-lsp/target/release/codex-lsp"
}
}
}
}See editors/zed/README.md for the full Zed workflow.
For Neovim 0.11+, add this to your Neovim config, for example in
~/.config/nvim/init.lua:
-- Neovim 0.11+ : attach codex-lsp to *.codex files.
-- Ensure the `codex-lsp` binary is on your PATH (or use an absolute path in cmd).
vim.filetype.add({ extension = { codex = "codex" } })
vim.lsp.config["codex"] = {
cmd = { "codex-lsp" },
filetypes = { "codex" },
root_markers = { ".git" },
}
vim.lsp.enable("codex")If you did not create the ~/.local/bin/codex-lsp link, point cmd directly at
the release binary:
vim.lsp.config["codex"] = {
cmd = { "/path/to/codex-lsp/target/release/codex-lsp" },
filetypes = { "codex" },
root_markers = { ".git" },
}Open a *.codex file and run :LspInfo to confirm that codex-lsp is
attached.