Language Server Protocol types for Rust - A fork of lsp-types with enhancements.
This library provides Rust types for the Language Server Protocol (LSP). It's a fork of the excellent lsp-types crate with additional features and improvements.
- ✅ Migrated from
fluent-urito the battle-testedurlcrate (100M+ downloads) - ✅ Built-in serde support without custom implementations
- ✅ Full trait support:
Hash,Eq,Ord,FromStr - ✅ 46 comprehensive URI tests covering Windows/Unix platforms
- ✅
SnippetTextEdit- Code snippet editing with tab stops - ✅
DocumentRangesFormattingParams- Format multiple ranges at once - ✅
OneOf3enum - Three-way type unions
- ✅ Comprehensive Clippy configuration (all/pedantic/nursery)
- ✅ Zero Clippy warnings with pragmatic allow rules
- ✅ 78 tests with 100% pass rate
- ✅ Platform-specific tests for Windows and Unix
Add this to your Cargo.toml:
[dependencies]
emmy_lsp_types = "0.1.0"# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
# Run specific test module
cargo test uri::testThis project maintains high code quality standards:
# Check formatting
cargo fmt --check
# Run Clippy (should produce 0 warnings)
cargo clippy --all-targets
# Build in release mode
cargo build --release- 78 tests covering all major LSP types
- 46 URI tests for cross-platform path handling
- 9 formatting tests for LSP 3.18 features
- Platform-specific tests using
#[cfg(windows)]and#[cfg(unix)]
- Rust 2024 edition or later
- Cargo
# Debug build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Format code
cargo fmt
# Check lints
cargo clippy --all-targetsContributions are welcome! Please feel free to submit a Pull Request.
- Run
cargo fmtbefore committing - Ensure
cargo clippy --all-targetsproduces no warnings - Add tests for new features
- Update documentation as needed
This project is licensed under the same terms as the original lsp-types crate.
This project is a fork of lsp-types by the Gluon team. We're grateful for their excellent work on the original implementation.
We created this fork to:
- Modernize URI handling with the
urlcrate - Add LSP 3.18 protocol support
- Implement stricter code quality standards
- Provide more comprehensive testing
- Maintain faster iteration on new features
- ✅ All tests passing (78/78)
- ✅ Zero Clippy warnings
- ✅ LSP 3.18 support
- ✅ Cross-platform tested
- 🚧 Actively maintained