lsp: add helix-style language server support - #6
Draft
aplio wants to merge 3 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Helix-style LSP support to the native TUI, including:
The inventory, implemented surface, and remaining gaps are documented in
docs/lsp-parity.md.Why
Gargo previously had syntax highlighting for Java and JavaScript-family files, but its LSP client only exposed hover, definition, references, and push diagnostics. Java/JS servers required manual configuration, JSX/TSX wire IDs were incompatible with common servers, roots were Git-only, and server requests/capabilities were largely ignored.
This makes the common language-server path useful while keeping unsupported behavior explicit. It does not claim complete Helix parity; remaining work includes virtual
jdt://documents, watched-file registration, full TextMate snippet variables/transforms, cancellation, and several workspace features.Completion interaction
Tree-sitter is not an insertion-completion provider in Gargo; it supplies highlighting and symbol/index navigation. The existing insertion fallback is Markdown link-path completion.
This change verifies that LSP and Markdown candidates are mutually consistent, snippet Tab navigation has priority, modal palettes dismiss pending/stale results, and typing plus Ctrl-Space continue through the overlay stack correctly.
Real-server verification
Exact pinned installation and opt-in test commands are in
tests/README.md. No downloaded runtime,node_modules, JDK, or JDT LS artifact is committed.Checks
cargo fmt --all -- --checkgit diff --checkcargo check --workspace --all-targetscargo clippy --workspace --all-targets -- -D warningscargo test --lib lsp -- --test-threads=1(142 passed, 1 subprocess entrypoint ignored)XDG_DATA_HOME(1,378 lib tests passed; all integration tests passed)