Language support for XSQL, the query language of Synthigy.
Write .xsql files and get errors, completion and hover checked against your own
data model, before anything reaches the server.
Features
Diagnostics — syntax errors, unknown entities, attributes and relations,
operators that don't fit a type, and rules per operation (@get, @search-tree,
@get-tree, …).
Completion — entities, attributes, relations, operators, enum values and
modifiers, scoped to where the cursor is.
Hover — the type of an attribute, the target of a relation.
Outline — every operation in the file, in the Outline view and breadcrumbs.
Highlighting — operations, parameters, modifiers and keywords.
Everything runs locally. The extension never contacts a Synthigy server and needs
no credentials.
Getting started
Install the extension.
Put a schema.json beside your .xsql files. With the Synthigy CLI:
synthigy schema pull # writes xsql/schema.json
Open any .xsql file in that folder.
Without a schema.json you still get syntax errors and highlighting. The server
looks for synthigy.schema.json or schema.json in the file's folder and its
parents, and picks up changes to it without a reload.
@search-tree folder_tree
folder (active = true, on parent)
name
->owner
name
Settings
Setting
Default
xsql.serverPath
empty
Run another server.js instead of the bundled language server.
cd lsp && npm install # language server
cd clients/vscode && npm install
npm run build # bundles the server + client into dist/
npm run package # xsql-<version>.vsix
code --extensionDevelopmentPath=$(pwd) # or run it in an Extension Development Host