This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
LanguageServiceOptions
Defined in: packages/engine/src/language/LanguageService.ts:119
Options for the editor-facing language service: completions and highlighting.
Properties
Section titled “Properties”normalizeForHighlighting?
Section titled “normalizeForHighlighting?”optional normalizeForHighlighting?: boolean;Defined in: packages/engine/src/language/LanguageService.ts:156
Run the normalizer on the highlighting path, so phrase-fused tokens are classified as the thing the parser will actually see.
Off by default, and the default is a judgement rather than an oversight.
Highlighting runs per keystroke, normalization is real work, and a host
that is happy with lexer-level categories should not start paying for
fusion because a new version shipped. Turn it on and 12/09/2026 is one
datetime span instead of five number and operator spans; leave it off
and nothing about this class changes.
See benchmarks/languageServiceBenchmarks.spec.ts for what it costs.
variableNameSource?
Section titled “variableNameSource?”optional variableNameSource?: () => Iterable<string>;Defined in: packages/engine/src/language/LanguageService.ts:141
Overrides how the service discovers “variable names known in this
document”, used to legitimize a lone bare identifier line (see
getSemanticTokens’s single-token gate) and variable-name
completions (getCompletions). Defaults to
engine.documentVariableNames(): the variables (names of several words
included) and functions the document’s lines define, after whichever
pass ran (parseDocument, evaluateLines, evaluateDocument or a
live incremental evaluator), so the default serves any host sharing one
ExpressionEngine between evaluation and the language service. A name
a line only reads is not offered, nor one set outside a document
(evaluateExpression), and engine.clear() takes them all away.
Required for hosts whose language service is backed by a different,
non-evaluating engine than the one that runs the document (the
playground’s lexing-only engine, which never defines a name): pass a
function returning the evaluating engine’s names, such as
() => evaluatingEngine.documentVariableNames(). It is called on every
completion and every lone-word line, so it should return names it
already holds rather than build them.
Returns
Section titled “Returns”Iterable<string>