Editor integrations currently need to reimplement a lot of CEL intelligence outside cel-js.
I would like a first-class API on a LanguageService, for example:
import { createLanguageService } from "@marcbachmann/cel-js/language-service";
// If tree-shaking is no concern:
// const ls = env.languageService();
const ls = createLanguageService(env);
ls.complete(source, cursor, options?);
ls.hover(source, cursor, options?);
ls.diagnostics(source, options?);
ls.signatureHelp(source, cursor, options?);
ls.symbols(source, cursor, options?);
Lower-level primitives in Environment would also help, for example:
env.resolveAt(source, cursor)
env.scopeAt(...)
env.membersOfType(...)
The main goal is to avoid sentinel hacks, manual scope reconstruction, manual receiver inference, and custom hover/completion logic in editor consumers.
Editor integrations currently need to reimplement a lot of CEL intelligence outside
cel-js.I would like a first-class API on a
LanguageService, for example:Lower-level primitives in
Environmentwould also help, for example:env.resolveAt(source, cursor)env.scopeAt(...)env.membersOfType(...)The main goal is to avoid sentinel hacks, manual scope reconstruction, manual receiver inference, and custom hover/completion logic in editor consumers.