Nebula Studio
Nebula Studio is the VS Code extension for Nebula language support and platform template maintenance.
Platform operations require signing in with an authorized Nebula account. Local NSLM editing works without signing in.
Local NSLM Files
Open a .nslm file to use NSL highlighting, comments, bracket matching and the existing NSL snippets.
Each complete module is separated by a line containing --- with optional surrounding whitespace,
following the existing NSLM example loader. Markdown fences labelled nslm also receive NSL highlighting.
Outline groups declarations under each module. Folding, Hover, Definition and static keyword,
type and annotation-name completion use the current module, so an unfinished preceding module or
an unrelated module's same-name declaration does not affect these operations. Completion follows
the sj1Nebula.experimental.nslLanguageIntelligence setting.
These local files are not sent to the platform or linked to the selected tenant/module. Local support
does not provide compiler diagnostics, semantic/member completion, parameter signatures, cross-module
import resolution, References or Rename. Online .nsl modules keep their existing platform behavior.
Template Maintenance
The extension now exposes two template views in the Nebula Studio activity bar:
Template Assets: full FTL asset catalog grouped by path, including baseline-only templates and active overrides.
Template Resolution: effective source entries grouped by domain and owner, plus field/type candidate chains.
Editing Model
- Baseline templates open as read-only documents.
- Override templates open as writable documents.
Create Override From Baseline creates the override in schema and opens the writable override document.
Delete Override removes the override and falls the asset/resolution views back to baseline.
- Generated Svelte sources open as read-only preview documents.
- Current custom Svelte sources open as writable documents.
- Inherited custom Svelte sources open as read-only effective documents, but still support opening the generated source and creating a local custom copy.
Create Custom Source From Generated, Create Empty Custom Source, Compare Generated And Custom, Delete Custom Source, and Refresh Affected Pages are available directly from resolution source entries.
Resolution View
Pages & Views groups page usages by ownerType -> ownerName -> element -> kind -> entry.
- For page usages,
action is its own element, so entity pages and action pages are displayed as separate branches under the same owner.
Entity Popups keeps the owner-based popup hierarchy for popup usages.
- Source entries open the effective custom file when one exists; otherwise they open the generated source preview.
- Entry colors distinguish local custom, inherited custom, and generated-only states.
Field / Type Candidates shows ordered matchedTypes, candidate template order, and the currently effective template.
- Standalone
dictType and valueType candidate inspection is available through the resolution view commands.
NSL Syntax Maintenance
Public type library
public/Types is a catalog of independently maintained types, not a module
source file. The extension does not list or provide a public/Types.nsl
document or whole-library save/check operations. Maintain individual types in
Studio; the extension does not provide individual type editors.
This rule applies only to public/Types. Tenant-owned Types modules and the
existing StandardTypes ownership rules keep their respective behavior.
Syntax highlighting covers interface / decision declarations, Decision bindings
(including multi-digit groups and field aliases), and full escaped unit names.
Outline and definition lookup recognize the declarations; local completion offers
the current keywords and annotations. Server diagnostics and semantic completion
continue to use the existing language API.
The bundled completion catalog is generated from Schema's Lexer, Parser, and
src/docs/api/allowedAnnotations.json. This synchronization uses Schema develop
commit 0389db8330c (2026-11-30); uncommitted Schema changes are excluded.
After updating the grammar against the current Schema source, regenerate and check:
pnpm nsl:completion-catalog:generate
pnpm nsl:completion-catalog:check
pnpm test
pnpm lint
pnpm run package
NSL highlighting conventions
Internal names after |: use a subdued color; business names retain the theme's normal declaration color. A Decision target such as ~10[明细定价] or ~11【明细定价】 is highlighted as one operator.
// is a temporary line comment removed when Studio saves and regenerates source. /* ... */ is a persisted comment attached to a supported syntax node and cannot stand alone; /** ... */ is the same block-comment form. Both suppress completion inside the comment.
Fullwidth forms are limited to the aliases declared by NSL, including ( )【 】;,。?:|, contextual Chinese quotes, := and ?=. |: remains ASCII; forms such as =+-{}[]@# are not interchangeable. See the workspace lexical reference.