GOWDK VS Code Extension
Language support for .gwdk files.
Features
- Syntax highlighting.
- Language configuration for comments, brackets, and folding.
- Diagnostics through
gowdk check --json.
- Formatting through
gowdk fmt.
- Standard Language Server Protocol support is available through
gowdk lsp for editors that prefer LSP integration.
- Keyword completions for annotations, render modes, blocks, and
g: directives.
- Commands to show token output and manifest JSON for the active file.
- Dedicated GOWDK Activity Bar page hierarchy for movable
.gwdk page files.
- Larger site-map visualizer webview for scanning route/file layout.
- Move-file action from the site map so a page can be reorganized without changing its declared route.
The page hierarchy is generated from gowdk sitemap route metadata. It follows
declared @route values, not the workspace folder layout.
Development
When opened inside the GOWDK source repository, the extension runs:
go run ./cmd/gowdk <command>
In normal use, set gowdk.cliPath to an installed gowdk binary or keep it empty to use gowdk from PATH.
Check the extension entrypoint syntax with:
node --check editors/vscode/extension.js
Run the extension unit tests with:
node --test editors/vscode/*.test.js
Manual debug flow:
- Open this repository in VS Code.
- Open
editors/vscode/extension.js.
- Run the extension host from VS Code's debugger.
- Open a
.gwdk file in the extension host window.
- Open the GOWDK Activity Bar icon to inspect the route hierarchy.
LSP-capable editors can launch:
gowdk lsp
Use gowdk lsp --ssr when editing projects that should validate SSR pages as if ssr.Addon() is enabled.
Commands
GOWDK: Check Current File
GOWDK: Show Manifest
GOWDK: Show Tokens
GOWDK: Show Site Map
Packaging Status
The extension package metadata lives in editors/vscode/package.json. Before
publishing, make sure version, publisher, repository, bugs, and
homepage match the release owner.
Package a local .vsix:
cd editors/vscode
npm install -g @vscode/vsce
vsce package
For Marketplace publishing, create a Visual Studio Marketplace publisher token
outside this repository and run:
cd editors/vscode
vsce publish
Do not commit Marketplace tokens or generated .vsix files.
Release Workflow
- Update
CHANGELOG.md.
- Update
editors/vscode/package.json version when the extension behavior or
published metadata changes.
- Run
node --check editors/vscode/extension.js.
- Run
node --test editors/vscode/*.test.js.
- Package the extension with
vsce package.
- Publish after the repository release artifacts are available.