v0.25.0 note. The language changed:
entity,dbcontext,with,via,validate body,new … from,patch,group,mountanddomewere removed in favour of the grammar indocs/spec/v1/. Syntax highlighting here follows the new keywords. The language server is not built at the moment — it was written against the old parser and returns, rewritten, in v0.27.0. Until then the extension gives highlighting and snippets, andjwc checkgives diagnostics.
Syntax highlighting, snippets, and LSP-powered diagnostics for JWC (Just Web Code).
Features
- Syntax highlighting for
.jwcfiles (including the package keywordsnamespace,import,mount,group,public,private). - Snippets for routes, entities, queries, CRUD scaffolds, and package
pieces (
namespace,import,mount,group,pub-fn,priv-fn,pub-middleware). - Diagnostics (parse + validate + lint) via
jwc-lsp. - Hover info on entities / classes / functions.
Navigation: Go to Definition
Press F12 (or Ctrl+click) on any top-level entity, class, function,
middleware, or dbcontext reference. The LSP resolves the identifier
against the per-document symbol index built on each save and jumps to the
declaration site.
Refactoring: Rename Symbol
Press F2 on a top-level symbol to rename it. The new name is validated
against ^[A-Za-z_][A-Za-z0-9_]*$ and rejected if it collides with an
existing top-level declaration in the same document. Every reference is
rewritten in a single workspace edit; matches inside comments and string
literals are skipped.
Smart Completion
Completion is context-aware:
- Typing inside
catch (e: ...)lists the JWC error kinds (DbError,HttpError.NotFound,ValidationError, ...). - Typing after
useon aroute/grouplists the declared middleware names. - Anywhere else, completion offers JWC keywords + built-in functions
(
json,body,now, ...) + user-defined functions from the current document.
Requirements
Install the jwc toolchain (which ships jwc-lsp):
curl -fsSL https://raw.githubusercontent.com/just-web-code/jwc-lang/main/install.sh | bash
The extension auto-discovers jwc-lsp on PATH or under ~/.jwc/bin. Override via the jwc.lspPath setting.
Settings
jwc.lspPath— explicit path to thejwc-lspbinary.jwc.trace.server—off/messages/verboseLSP trace.
Commands
JWC: Restart Language ServerJWC: Show Language Server Output
Build from source
npm install
npm run compile
npm run package