Skip to content

Ascot × Language Server - #400

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

isc-klu wants to merge 23 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

Build note: ascot ships its WebAssembly modules in its npm package and loads them relative to its own __dirname. Since webpack bundles that code into server/out/ and leaves __dirname real, the lookup lands in server/lib/. The server webpack config now copies the .wasm files there as part of the build (copy-webpack-plugin), alongside the existing isclexer.node, so they ship in the .vsix with no separate install step.

@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
@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
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
isc-klu marked this pull request as draft August 25, 2026 15:29
@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
@isc-klu isc-klu changed the title Local IntelliSense Local ObjectScript intelligence Sep 17, 2026
@isc-klu
isc-klu force-pushed the local-intellisense branch 2 times, most recently from 6dcb441 to 0f6398d Compare October 19, 2026 15:50
Most IntelliSense data was fetched from IRIS over REST, even for information
already present in the workspace's own .cls/.mac/.int/.inc documents. That
costs round trips, can lag the local state, and stops working when no server
is available.

Add ascot, a WebAssembly component (loaded through jco) that indexes the
workspace and answers queries through a WIT-defined Workspace interface.
Out-of-workspace classes and routines still come from IRIS, via an
`IrisConnection` import that ascot calls back into.

Backed by ascot first, falling back to the REST implementation when it has
no answer: hover, definition, class/member completion, signature help, and
document symbols. Diagnostics now come from ascot's checker, which catches far
more than the previous syntax-only pass.

New, provided entirely by ascot: references, workspace symbols, inlay hints.

Also adds an `intersystems.language-server.ascot.trace` setting that logs
every call across the server/ascot boundary with timings.
@isc-klu
isc-klu force-pushed the local-intellisense branch from 0f6398d to 74a2856 Compare October 19, 2026 17:30
@isc-klu
isc-klu marked this pull request as ready for review October 19, 2026 17:43
@isc-klu isc-klu changed the title Local ObjectScript intelligence Ascot × Language Server Oct 19, 2026
ascot 0.4.2 replaces IrisConnection with IrisContext and Atelier. Bind the
low-level Atelier (query and getDoc over the client's REST bridge) and drop the
hand-rolled %Dictionary queries, FormalSpec parsing, and routine probing, which
ascot's own AtelierContext now does. A lookup with no server throws, so ascot
reports it as taken on trust rather than not found.
Revert the common package version bump, the js-debug workspace setting, and
the unused @types/eslint dev dependency.
One tracing proxy for both directions of the server/ascot boundary, derived
severity and symbol-kind mappings, and workspaces cached as promises.
Workspace classes and members become rows of the same shape the REST queries
return, so the unchanged loops render them and the parallel item builders go.
Class documentation resolves lazily through ascot like it does through REST.
A configuration or connection change may have switched the folder's server, so
tell each workspace with setEnv, which stales every analysis; the following
diagnostics refresh re-checks against the new one.
… without a server, and expose its style rules as settings

Names are plain strings and an argument's mode is by-ref, output or absent.
A folder with no server connection checks against the IRIS declarations
bundled with ascot. The style rules are resource-scoped settings under
intersystems.language-server.ascot.style, each unchecked until set, with
per-command and per-function tables. Version 2.8.7-beta.3 for the betas.
@isc-klu
isc-klu marked this pull request as draft November 5, 2026 18:25
@isc-klu

isc-klu commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@isc-bsaviano I am working on integrating ascot v0.5.0, so made this PR draft for now.

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