feat: prepare VS Code extension for marketplace

This commit is contained in:
2026-07-13 19:52:28 +05:30
parent 577c38a965
commit 0592c69f29
10 changed files with 133 additions and 25 deletions
+41 -10
View File
@@ -1,8 +1,20 @@
# WrNexus for VS Code
# WRNexus Language Support
Language support for [WrNexus](https://github.com/) `.wrn` files — the SSR-first,
Language support for [WRNexus](https://wrnexusjs.dev) `.wrn` files — the SSR-first,
Bun-powered full-stack framework.
## Installation
After the first Marketplace release, search for **WRNexus Language Support** in
VS Code or run:
```text
ext install wrnexus.wrnexus
```
For a local package, open the Command Palette, choose **Extensions: Install from
VSIX**, and select the generated `wrnexus-<version>.vsix` file.
## Features
- **Syntax highlighting** ("color-full code"). Keywords (`page`, `component`,
@@ -36,19 +48,38 @@ Bun-powered full-stack framework.
| `wrnexus.diagnostics.enable` | `true` | Show parse errors for `.wrn` files. |
| `wrnexus.format.enable` | `true` | Enable the built-in formatter for `.wrn`. |
## Building the diagnostics engine
To format automatically when saving, add this to VS Code settings:
Diagnostics use a bundled copy of the compiler. Regenerate it after changing
`@wrnexus/compiler`:
```bash
bun run build:compiler # writes src/compiler.cjs
```json
"[wrn]": {
"editor.defaultFormatter": "wrnexus.wrnexus",
"editor.formatOnSave": true
}
```
The extension still highlights, snippets and completes without the bundle; only
inline error reporting requires it.
## Privacy
The extension does not collect telemetry and does not send source code or usage
data over the network. Formatting, completion, and diagnostics run locally.
## Development
Diagnostics use a bundled copy of the compiler. Build and validate everything
after changing the extension or `@wrnexus/compiler`:
```bash
bun install
bun run check
bun run package
```
`bun run package` creates `wrnexus-<version>.vsix`. The extension still
highlights, provides snippets, and completes without the compiler bundle; only
inline error reporting requires it.
Open this folder in VS Code and press <kbd>F5</kbd> to launch an Extension
Development Host, then open any `.wrn` file.
See the
[Marketplace publishing guide](https://git.workroot.in/WorkRoot/WRNexusJS/src/branch/main/editors/vscode/PUBLISHING.md)
for the release procedure.