Skip to content

lsp: add helix-style language server support - #6

Draft
aplio wants to merge 3 commits into
masterfrom
agent/helix-lsp-parity
Draft

lsp: add helix-style language server support#6
aplio wants to merge 3 commits into
masterfrom
agent/helix-lsp-parity

Conversation

@aplio

@aplio aplio commented Aug 13, 2026

Copy link
Copy Markdown
Owner

What

Adds Helix-style LSP support to the native TUI, including:

  • explicit language IDs, root markers, ordered multi-server routing, and feature filters
  • Java, JavaScript, JSX, TypeScript, and TSX defaults
  • capability-aware lifecycle, sync, timeout, stale-response, and shutdown handling
  • completion/resolve/snippet sessions, hover, signature help, navigation, diagnostics, formatting, rename, code actions, symbols, inlay hints, document highlights, colors, and links
  • fake stdio coverage and opt-in real-server tests for TypeScript Language Server and Eclipse JDT LS

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

  • Node.js v24.13.1, TypeScript Language Server 5.3.0, TypeScript 6.0.3
    • JSX/TSX IDs, completion, hover, diagnostics, cross-file definition, shutdown
  • Temurin 21.0.12+8, Eclipse JDT LS 1.60.0
    • diagnostics, completion, hover, cross-file definition, shutdown

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 -- --check
  • git diff --check
  • cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --lib lsp -- --test-threads=1 (142 passed, 1 subprocess entrypoint ignored)
  • full workspace suite with isolated XDG_DATA_HOME (1,378 lib tests passed; all integration tests passed)
  • real TypeScript Language Server E2E
  • real Eclipse JDT LS E2E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant