agnix-lsp
Language Server Protocol implementation for agnix.
Provides real-time validation of agent configuration files in editors that support LSP.
Installation
Or build from the workspace root:
The binary will be at target/release/agnix-lsp.
Usage
The server communicates over stdin/stdout using the LSP protocol:
Editor Configuration
VS Code
A dedicated VS Code extension is available at editors/vscode. See editors/vscode/README.md for installation and usage.
Neovim (with nvim-lspconfig)
local lspconfig = require
local configs = require
if not configs.
lspconfig..
Helix
Add to ~/.config/helix/languages.toml:
[[]]
= "markdown"
= ["agnix-lsp"]
[]
= "agnix-lsp"
Features
- Real-time diagnostics as you type (via textDocument/didChange)
- Real-time diagnostics on file open and save
- Supports all agnix validation rules (100 rules)
- Maps diagnostic severity levels (Error, Warning, Info)
- Rule codes shown in diagnostic messages
- Quick-fix code actions for auto-fixable diagnostics
- Hover documentation for frontmatter fields (name, version, model, etc.)
Supported File Types
The LSP server validates the same file types as the CLI:
SKILL.md- Agent skill definitionsCLAUDE.md,AGENTS.md- Claude Code memory files.claude/settings.json- Hook configurationsplugin.json- Plugin manifests*.mcp.json- MCP tool configurations.github/copilot-instructions.md- GitHub Copilot instructions.cursor/rules/*.mdc- Cursor project rules
Development
Run tests:
Build in debug mode:
Architecture
agnix-lsp/
├── src/
│ ├── lib.rs # Public API and server setup
│ ├── main.rs # Binary entry point
│ ├── backend.rs # LSP protocol implementation
│ ├── diagnostic_mapper.rs # Converts agnix diagnostics to LSP format
│ ├── code_actions.rs # Quick-fix code action generation
│ ├── hover_provider.rs # Hover documentation for frontmatter fields
│ └── position.rs # Byte offset to LSP position conversion
└── tests/
└── lsp_integration.rs # Integration tests
License
MIT OR Apache-2.0