Conversation
Extract the default engine and file-filter definitions so they can be tested without initializing TWApp. Add .mkiv/.mkxl filters and ConTeXt source metadata while preserving existing engine behavior, including LuaTeX's --luatex option.
Introduce a provider-neutral LanguageService seam and manager, with the initial LSP/JSON-RPC/QProcess adapter behind it. Add transport, session, and deterministic fake-server coverage; this commit enables no provider or editor workflow by default.
Bind eligible ConTeXt documents to the service and expose capability-gated completion and definition actions. Provider completions augment static candidates, and tokens/generations reject stale asynchronous results. Include document and navigation regression coverage.
Add persisted, disabled-by-default Preferences configuration and apply it through TWApp. Arguments remain literal QStringList entries passed separately to QProcess; reconfiguration replaces services with bounded teardown and is covered by activation/failure tests.
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.
Summary
Add optional language-server assistance for ConTeXt/LMTX documents, including
completion and Go to Definition, together with modern ConTeXt/LuaMetaTeX
defaults and documentation. No external provider dependency is introduced.
Motivation
ConTeXt/LMTX users can benefit from language-service assistance without making
an external provider a TeXworks dependency or changing the normal editor and
typesetting workflow.
What this changes
retaining the distinct LuaTeX engine.
completion.
cross-file navigation for one usable local-file result.
Each argument is one literal line and is passed separately, with no shell
parsing.
Architecture
The public generic LanguageService API, manager, document binding, and types
are provider-neutral. The manager owns active/pending service replacement and
document-binding authority; bindings own synchronization, generations,
freshness, and request tokens; process and JSON-RPC remain in the external
adapter; and editor/window code consumes capability-gated results. The adapter
implements a limited LSP subset; this is not a claim of universal LSP support.
ConTeXt and Digestif
Language-server support is optional and disabled by default. TeXworks does not
bundle, install, or discover a provider. Digestif is a tested ConTeXt/LMTX
example only, not a dependency or a promise of support for every provider.
Optional real-provider validation was reproduced against Digestif validation
revision
38aa19c0f11da9d1f08c24ec19724f11060b897f,published in
slem567/digestifon branchvalidation/texworks-context-lmtx.That revision contains the ConTeXt/LSP fixes used for the test, including modern
project/component filename resolution. It is a validation input only; TeXworks
does not bundle or require Digestif and its language-service API remains
provider-neutral.
Compatibility
Normal TeXworks editing remains available without a provider or when one is
unavailable, including native/static completion. The project policy floor
remains Qt 5.2.3. The actual Trusty Qt 5.2.1 proof is compatibility evidence;
it does not change that policy.
Validation
These are local validation results:
layers passed (3/3 each).
truthful availability status, and clean shutdown.
Commit structure
The five commits are ordered for review:
Each behavior layer includes its associated tests.
Translation handling
This series adds translatable source strings but intentionally omits translation
catalog churn. TeXworks uses Weblate, and generated .qm files are not part of
this submission. Please advise whether a Weblate refresh should follow.