-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial 07 LSP and Tooling
CellScript includes LSP support and a beta package/tooling workflow. The goal is to make .cell contracts auditable before they are deployed.
The LSP implementation supports the core editor features expected for contract development:
- diagnostics for parse/type/lifecycle/lowering errors;
- hover information for actions, receipts, and lowering metadata;
- keyword and symbol completions;
- go-to-definition;
- references;
- workspace rename;
- formatting;
- code actions for lowering diagnostics.
Exact editor integration depends on your editor or extension wrapper. The language service is implemented in the CellScript crate under the LSP module and is intended to be embedded by editor integrations.
Use formatter checks before committing:
cellc fmt --checkApply formatting:
cellc fmtGenerate package docs:
cellc docWith JSON summary:
cellc doc --jsonDocumentation output includes the public contract surface and metadata-derived lowering information.
The package manager supports:
cellc initcellc buildcellc checkcellc fmtcellc doccellc add --pathcellc removecellc info- lockfile consistency checks for local dependencies
Treat registry, publish, install, update, login, and run flows as experimental unless your current build explicitly reports them as completed and supported.
Recommended local loop:
cellc fmt --check
cellc check --all-targets --json
cellc metadata . --target riscv64-elf --target-profile spora -o /tmp/metadata.json
cellc build --target riscv64-elf --target-profile spora --json
cellc verify-artifact build/main.elf --verify-sources --expect-target-profile sporaFor CKB admission:
cellc check --target-profile ckb --json
cellc build --target riscv64-elf --target-profile ckb --json
cellc verify-artifact build/main.elf --expect-target-profile ckbContinue with Bundled Example Contracts.