Skip to content

Local IntelliSense - #400

Draft
isc-klu wants to merge 126 commits into
intersystems:masterfrom
isc-klu:local-intellisense
Draft

Local IntelliSense#400
isc-klu wants to merge 126 commits into
intersystems:masterfrom
isc-klu:local-intellisense

Conversation

@isc-klu

@isc-klu isc-klu commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Currently, this language server retrieves most of its information from IRIS servers, including data that is already available locally—such as class names and method arguments of client-side class documents. This design requires frequent data transfer between the language server and IRIS, may not always reflect the latest state, and becomes unusable when IRIS servers are unavailable.

This PR is a step toward improving existing IntelliSense capabilities and enabling new ones by extracting information directly from local class documents (*.cls, *.mac, *.int, *.inc), via ascot, a WebAssembly component (loaded through jco) that indexes the workspace and answers queries via a WIT-defined Workspace interface.

Existing capabilities now backed by ascot first, falling back to the existing REST-based implementation when it has no answer:

  • Hover
  • Go to Definition
  • Completion for classes and class members
  • SignatureHelp for method calls
  • DocumentSymbol

Diagnostics: ascot's checker catches substantially more than the previous implementation, which was limited to syntactic errors.

Brand new capabilities, provided entirely by ascot:

  • References
  • WorkspaceSymbol
  • InlayHint

@isc-klu
isc-klu requested a review from isc-rsingh April 22, 2026 21:43
@isc-klu isc-klu self-assigned this Apr 22, 2026
Co-authored-by: Copilot <copilot@github.com>
@isc-klu

isc-klu commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator Author

The previous commit implements "go to definition" for classes and class members.

isc-klu and others added 7 commits April 23, 2026 17:36
@isc-klu
isc-klu marked this pull request as ready for review April 24, 2026 14:53
@isc-klu
isc-klu requested a review from isc-bsaviano as a code owner April 24, 2026 14:53
isc-klu and others added 17 commits August 31, 2026 19:22
ascot dropped hover-type/hover-member/macro-expansion from its WIT
surface in favor of one merged hover method; this script's jco
async-exports list still named the old one.
Inline single-use thin wrappers (getCoreModule, loadAscot, convertDiagnostic,
rowToMemberInfo) instead of naming them separately; move convertSymbolInfo and
prettifyNormalArg to their only callers (getDocumentSymbol, signatureHelp.ts);
drop the includeExtends param that was always true and the export on getClass
that had no external caller; replace a truthy-Promise && || trick in
filePathToWorkspace with folder?.uri ?? docURI; remove dead workspace?.
optional chaining now that workspace resolution never returns undefined.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@isc-klu
isc-klu marked this pull request as ready for review September 1, 2026 02:23
@isc-klu
isc-klu marked this pull request as draft September 2, 2026 14:55
Wire up getInclude on IrisConnection (async, REST-backed, same cache
pattern as getMem/getSupers/isDatatype), add the new "module" SymbolKind,
fix DocumentSymbol's renamed root field, and drop the ascot prefix from
document/workspace symbol names.
Replaces the manual "copy ascot.wasm, run jco transpile locally" step with a
normal dependency on @intersystems-community/ascot, which ships the
componentized/transpiled glue and a serialized Workspace API already built.
webpack still bundles the package's JS into server/out/, so its wasm files
need mirroring into server/lib/ (same pattern already used for
isclexer.node) -- added a postinstall script for that.
A postinstall hook can silently not run (npm ci --ignore-scripts, corporate
install policies, etc.), which would ship a build missing the wasm files
with no build-time signal. Doing the copy in server/webpack.config.js ties
it to the one step that always has to run before packaging.
WIT is an implementation detail of how ascot itself is built now that it's
a real npm package, not something this file's readers need to know about.
Leftover from when the local type was called WorkspaceInstance -- nothing
else in this file uses the bare name Workspace, so there's no collision to
alias around.
createWorkspace/Workspace/Imported were named imports alongside a separate
type-only `* as Ascot` import of the same module -- no real reason for the
split, so collapse to one `import * as Ascot` and prefix those three too.
Drop the blanket `import * as Ascot` -- explicit named imports read better
without a prefix on every use. Four names collide with vscode-languageserver's
own enums or this file's own re-exports (DiagnosticSeverity, SymbolKind,
MemberInfo, NormalArg), so those four keep an "Ascot"-prefixed alias; nothing
else needs one.
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