| Crates.io | rovo-lsp |
| lib.rs | rovo-lsp |
| version | 0.3.1 |
| created_at | 2025-11-19 17:48:28.217707+00 |
| updated_at | 2026-01-14 09:21:18.113423+00 |
| description | Language Server Protocol implementation for Rovo annotation validation and completion |
| homepage | |
| repository | https://github.com/Arthurdw/rovo |
| max_upload_size | |
| id | 1940493 |
| size | 394,456 |
Language Server Protocol implementation for Rovo annotation validation and completion.
Rovo uses Rust-style documentation comments with special sections:
Define HTTP response codes, types, and descriptions:
/// # Responses
///
/// 200: Json<User> - Successfully retrieved user
/// 404: () - User not found
Provide example response data for each status code:
/// # Examples
///
/// 200: User { id: 1, name: "Alice".into() }
/// 404: ()
Specify tags, security, operation IDs, and visibility:
/// # Metadata
///
/// @tag users
/// @security bearer
/// @id getUserById
/// Get a user by ID
///
/// # Responses
///
/// 200: Json<User> - User found
/// 404: () - User not found
///
/// # Examples
///
/// 200: User { id: 1, name: "Alice".into(), email: "alice@example.com".into() }
///
/// # Metadata
///
/// @tag users
/// @security bearer
#[rovo]
async fn get_user(id: i32) -> Json<User> { ... }
@tag NAME - Group endpoints in API documentation@security SCHEME - Specify security scheme (bearer, basic, apiKey, oauth2)@id OPERATION_ID - Set custom operation ID@hidden - Hide endpoint from documentation@rovo-ignore - Stop processing annotations (for regular doc comments)cargo install --path .
Or add to your Cargo.toml:
[dev-dependencies]
rovo-lsp = "0.1"
The LSP server runs as a standalone binary that communicates via stdin/stdout following the LSP protocol.
See editors/nvim/README.md for Neovim integration.
Support for VSCode and other editors coming soon.
# Run all tests
cargo test --package rovo-lsp
# Run specific test suite
cargo test --package rovo-lsp --test integration
cargo test --package rovo-lsp --test validation
cargo test --package rovo-lsp --test completion
Build the LSP server:
cargo build --package rovo-lsp
Test with a fixture file:
nvim rovo-lsp/tests/fixtures/test.rs
Try typing /// @ to see completions
rovo-lsp/
├── src/
│ ├── main.rs # LSP server entry point
│ ├── backend.rs # LSP backend implementation
│ ├── handlers.rs # LSP request handlers (hover, completion, references)
│ ├── parser.rs # Annotation parser
│ ├── diagnostics.rs # Validation logic
│ ├── completion.rs # Completion provider with status codes and security schemes
│ ├── code_actions.rs # Code actions (add annotations, add #[rovo], add JsonSchema)
│ ├── type_resolver.rs # Type resolution and go-to-definition
│ └── docs.rs # Shared documentation for annotations
└── tests/
├── integration.rs # Parser integration tests
├── validation.rs # Validation tests
├── completion.rs # Completion tests
└── fixtures/ # Test Rust files
Contributions are welcome! Please ensure all tests pass before submitting a PR:
cargo test --package rovo-lsp
MIT