-
-
Notifications
You must be signed in to change notification settings - Fork 0
LSP support #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP support #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Language Server Protocol (LSP) support to the DATEX JavaScript runtime, enabling IDE features like autocompletion and diagnostics for DATEX scripts. It works in conjunction with the datex-core LSP implementation referenced in PR #505.
Key Changes:
- Added LSP server infrastructure with bidirectional communication between Rust (WASM) and JavaScript
- Implemented async I/O adapters (Reader/Writer) for LSP message handling
- Added initial test coverage for basic LSP initialization
- Updated dependencies to support LSP functionality
Reviewed Changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/lsp/BasicConnect.test.ts | New test validating basic LSP initialization flow with JSON-RPC messages |
| src/runtime/runtime.ts | Added startLSP method to Runtime class for starting LSP server with callback-based communication |
| src/datex-core/datex_core_js.d.ts | Updated TypeScript definitions with start_lsp method and reorganized interface definitions |
| scripts/build-npm.ts | Updated import to use simplified path for @std/fs/walk |
| rs-lib/src/runtime.rs | Added conditional LSP support with feature flag, cleaned up imports, improved crypto API usage |
| rs-lib/src/lsp/mod.rs | New module implementing LSP message routing between JavaScript and Rust using channels |
| rs-lib/src/lsp/io.rs | New async I/O adapters (Reader/Writer) implementing futures traits for LSP communication |
| rs-lib/src/lib.rs | Added conditional LSP module import with feature flag |
| rs-lib/src/crypto/crypto_js.rs | Refactored to remove unnecessary borrows and improve API usage |
| rs-lib/Cargo.toml | Added LSP dependencies and feature flag, updated URL crate version, added lsp_wasm feature |
| deno.lock | Updated lock file with new @std/fs dependency version |
| deno.json | Added @std/fs import mapping |
| Cargo.lock | Added LSP-related dependencies (lsp-types, realhydroper-lsp, tower, tracing, etc.) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR adds LSP support for JS combined with unyt-org/datex-core#505