feat(desktop): lsp diagnostics, hover and completion in editor#76
Merged
Conversation
gandarfh
force-pushed
the
feat/lsp-desktop-integration
branch
2 times, most recently
from
June 10, 2026 13:45
2fdce05 to
0a893be
Compare
gandarfh
force-pushed
the
feat/lsp-desktop-integration
branch
from
June 10, 2026 13:50
0a893be to
5b6731d
Compare
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
The desktop editor now talks to the httui language server: unknown block aliases get a red squiggle with a message, hovering a
{{ref}}shows alias info from the server, and{{completion offers in-scope aliases plus environment variable names (secrets labeled). Manually validated in a real vault.How
src-tauri/src/lsp_sidecar.rs— lazy spawn ofhttui-lsp(PATH orHTTUI_LSP_BIN) with--dbpointing at the app database; the webview cannot speak stdio, so the Rust side owns Content-Length framing and bridges messages aslsp_sendinvokes one way andlsp:message/lsp:exitevents the other.src/lib/lsp/transport.ts—@codemirror/lsp-clienttransport over that bridge, queueing messages until the sidecar is up and re-starting it after exit.src/lib/lsp/client.ts— one shared client per app process, with server-pushed diagnostics enabled.src/lib/codemirror/cm-lsp.ts— per-file extension (LSP plugin with the vault file URI, server completion, hover tooltips), wired inMarkdownEditor.The local
{{autocomplete and ref hover stay active alongside the server path on purpose: the local hover is still the only source of run-time values, and the server grammar does not parse$prevyet. The local path is removed once the server reaches feature parity.Tests
New dependency:
@codemirror/lsp-client(approved).