IntelliSense capabilities and behavior
Platform spec node
IntelliSense capabilities and behavior
Spec standingStandard
No architecture decision records under adr/ for this feature yet. Standard features must
publish at least one ADR or keep a ## Decisions summary on the hub.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
scope | yes | yes |
features | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
What this covers
Section titled “What this covers”This page defines the concrete IntelliSense behavior exposed by Beskid LSP to editors for .bd and .proj files. The contract is implementation-grounded and describes current supported behavior, limits, and compatibility expectations.
Normative feature surface
Section titled “Normative feature surface”- Completion shall be provided for
.bdand.projdocuments..bdcompletion candidates come frombeskid_analysis::services::completion_candidates(snapshot, source_text, offset);.projcompletion includes manifest keywords and enum-like value suggestions. - Project-aware
.bdIntelliSense — WhenCompilationContextresolves aProject.projfor the buffer path,build_document_analysis_with_contextshall assemble viaProgramAssembly, resolve the entry unit withModuleIndex::resolve_entry_hir, and exposeResolution.module_importsplusItemInfo.source_pathfor cross-unit symbols. - Member completion after import aliases — After a trailing
.following a registeredusealias (for exampleIO.afteruse Std.System.IO), completion shall list public members from the aliased module path in the assemblyModuleGraph. usepath completion — On auseline, completion shall offer next path segments from assembly-known logical module paths (assembly_module_paths/ModuleGraph).- Hover shall return Markdown content for resolved
.bdsymbols and manifest tokens in.proj. The hover range shall useSymbolLocationand the declaring unit’s source text whenItemInfo.source_pathdiffers from the buffer path (same cross-file mapping as go-to-definition). Hover ranges shall map throughSymbolLocationand the target unit source whenItemInfo.source_pathdiffers from the buffer path (same cross-file range contract as go-to-definition). - Go to definition shall resolve to the declaration span for resolved symbols in
.bd, usingItemInfo.source_pathwhen set so the LSP returns afile://URI for dependency units; in.proj,path = "..."dependency values shall navigate to the targetProject.proj. - Go to declaration shall be supported and shall follow the same target resolution contract as go-to-definition.
- Find references shall be supported for resolved
.bdsymbols and manifest tokens in.proj; whenCompilationContextprovidesProgramAssembly, workspace references shall include matches from non-entry units viareferences_at_offset_workspace(dependency units resolved withModuleIndex::resolve_unit_hir); declaration inclusion shall follow theincludeDeclarationrequest flag. - Rename + prepare rename shall be supported for resolved symbols and manifest tokens with identifier validation (
[A-Za-z_][A-Za-z0-9_]*); invalid identifiers shall return no rename edit. Rename remains single-document per request even when workspace references span multiple files. - Signature help shall be supported for
.bdcall sites and return one active signature derived from the callable hover payload. - Document symbols shall be supported for
.bdand.projwith stable symbol-kind mapping. - Workspace symbols shall be supported for indexed
.bddocuments from open buffers plus closed-file workspace snapshots. - Code actions shall include source formatting for
.bd, a quick-fix for unused imports (W1503) when diagnostic context is present, and documentation actions (generate / update///stubs with@arg/@returns/@variant/@parwhere applicable, plus quick fixes tied to documentation warnings W1610–W1615 and W1620–W1625) implemented inbeskid_lsp::features::code_actions::handlerusingbeskid_analysis::doc::doc_comment_edit_for_offset. - Semantic tokens shall be supported (full-document mode) with declaration tagging for symbol declarations.
- Diagnostics shall preserve compiler severity/code identity and apply equally to open buffers and workspace-indexed closed files; for
.bdfiles with a document analysis snapshot, published diagnostics shall be the union of semantic diagnostics anddoc_diagnosticsfrom the snapshot (stable sort by span then code).
Current scope limits
Section titled “Current scope limits”renamecurrently edits one document per request (the request document URI) even when additional workspace files may reference the same symbol.- Type definition and implementation navigation are not exposed as dedicated LSP methods yet.
- Semantic tokens are full-refresh only; token range/delta updates are not advertised.
Compatibility guarantees
Section titled “Compatibility guarantees”- Server capabilities in
initializeshall accurately advertise only implemented IntelliSense methods. - Extension integrations must rely on standard LSP capability negotiation and should not duplicate semantic analysis rules client-side.
- New IntelliSense methods must add both request handlers and capability advertisement in the same change.
Implementation anchors
Section titled “Implementation anchors”compiler/crates/beskid_lsp/src/server/init.rscompiler/crates/beskid_lsp/src/server/backend.rscompiler/crates/beskid_lsp/src/featurescompiler/crates/beskid_lsp/src/features/code_actions/handler.rscompiler/crates/beskid_lsp/src/diagnostics.rscompiler/crates/beskid_analysis/src/services/document.rscompiler/crates/beskid_lsp/src/session/lifecycle.rscompiler/crates/beskid_analysis/src/doc/edit.rsbeskid_vscode/src/lsp/beskidLanguageClient.tsbeskid_vscode/src/runtime/BeskidExtensionRuntime.ts