Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **RFC-3986 URI codec** — `bridge::resources` module with percent-encoding via `url::Url::from_file_path`; empty-authority injection is rejected to prevent UNC-path attacks on Windows
- **Subscription cap** — `ResourceSubscriptions` enforces a `MAX_SUBSCRIPTIONS = 1_000` limit per session to guard against memory exhaustion
- **MCP tools** — `get_signature_help` (`textDocument/signatureHelp`), `go_to_implementation` (`textDocument/implementation`), `go_to_type_definition` (`textDocument/typeDefinition`), and `get_inlay_hints` (`textDocument/inlayHint`) tools exposing LSP 3.6/3.15/3.17 capabilities (#116)
- **`workspace/didChangeWatchedFiles` support** (#102, part 2) — mcpls now declares `workspace.didChangeWatchedFiles.dynamic_registration: true` and `relative_pattern_support: true`, handles inbound `client/registerCapability` and `client/unregisterCapability` requests, and runs a per-server filesystem watcher that forwards matched events as `workspace/didChangeWatchedFiles`. This keeps the LSP server's *workspace index* live across external file changes (files mcpls has never opened) for servers that register watchers (rust-analyzer, gopls, pyright, typescript-language-server, clangd). Builds on a new `notify` dependency.
- **`workspace.diagnostics_mode` config option** — selects how `get_diagnostics` sources its results: `pull` (LSP `textDocument/diagnostic` only — misses rust-analyzer's flycheck output), `cached` (read the `publishDiagnostics` cache), or `hybrid` (pull + cached, deduplicated). Default is `hybrid`. Hybrid dedup keys on `(range, severity, code)` when a code is present and falls back to a path-qualifier-stripped message otherwise, so rust-analyzer's `DocItem` vs `types::DocItem` style duplicates collapse without dropping legitimately-distinct errors that share a span.

### Changed

Expand All @@ -26,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **LSP server requests** — Handle server-to-client requests such as `client/registerCapability`, fixing tsgo timeouts.
- **Integration tests** — Add `[workspace]` table to `tests/fixtures/rust_workspace/Cargo.toml` so cargo treats the fixture as a standalone workspace; fixes 8 rust-analyzer integration tests that failed with "Failed to load workspaces." (#118)
- **e2e coverage** — Add ra_e2e sub-cases for `get_signature_help`, `go_to_implementation`, `go_to_type_definition`, `get_inlay_hints` (4 LSP 3.17 tools from #124 had no coverage); add `list_resources`, `read_resource`, `subscribe_resource`, `unsubscribe_resource` to `McpClient` and ra_e2e_suite (MCP resources path was entirely untested) (#129, #130)
- **Stale results after external file changes** (#102, part 1) — `DocumentTracker::ensure_open` now stats the file on every call and re-syncs the document with the LSP server (via `textDocument/didClose` + bumped-version `textDocument/didOpen`) when the on-disk signature has changed. Fixes stale `get_hover`, `get_definition`, `get_references`, `get_document_symbols`, `get_diagnostics`, `get_completions`, `get_code_actions`, `format_document`, `rename_symbol`, and call-hierarchy results after edits made outside mcpls (`git stash`/`checkout`, the MCP host's own `Edit`/`Write` tools, formatters, code generators). Works for every configured LSP, including those that do not register `workspace/didChangeWatchedFiles`.
- **`get_cached_diagnostics` now returns actual data** — previously the `NotificationCache` existed but was never populated in production: the LSP client received `publishDiagnostics`, `window/logMessage`, and `window/showMessage` notifications and dropped them on the floor. mcpls now wires the notification channel through to a per-server pump task that updates the cache. This also makes the new `hybrid` diagnostics mode work.

## [0.3.6] - 2026-04-21

Expand Down
175 changes: 164 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ chrono = "0.4.44"
clap = "4.6"
dirs = "6.0"
futures = "0.3"
globset = "0.4"
ignore = "0.4"
lsp-types = "0.97"
mcpls-core = { path = "crates/mcpls-core", version = "0.3.6" }
notify = "8.0"
predicates = "3.1"
rmcp = "1.6.0"
rstest = "0.26"
Expand Down
2 changes: 2 additions & 0 deletions crates/mcpls-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ async-trait = { workspace = true }
chrono = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
globset = { workspace = true }
ignore = { workspace = true }
lsp-types = { workspace = true }
notify = { workspace = true }
rmcp = { workspace = true, features = ["server", "transport-io", "macros"] }
axum = { workspace = true, optional = true }
tokio-util = { workspace = true, optional = true, features = ["rt"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/mcpls-core/src/bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub use notifications::{
DiagnosticInfo, LogEntry, LogLevel, MessageType, NotificationCache, ServerMessage,
};
pub use resources::ResourceSubscriptions;
pub use state::{DocumentState, DocumentTracker, path_to_uri, uri_to_path};
pub use state::{DocumentState, DocumentTracker, SyncSignature, path_to_uri, uri_to_path};
pub use translator::{
Completion, CompletionsResult, DefinitionResult, Diagnostic, DiagnosticSeverity,
DiagnosticsResult, DocumentChanges, DocumentSymbolsResult, FormatDocumentResult, HoverResult,
Expand Down
Loading
Loading