- Fork and Clone https://github.com/siddhi-io/siddhi-plugin-vscode
- execute
npm install
in the terminal at the cloned directory, which downloads the required dependencies in thepackage.json
file. - execute
npm run compile
in the terminal at the cloned directory, which compiles the source code of the extension.
siddhi.tmLanguage.json
file provides text mate grammar for siddhi, which is used for syntax highlighting feature of the extension.
To build the grammar file from siddhi.tmLanguage.yaml
file execute npm run build-tm-grammar
in the command line at the cloned directory.
-
Configure extension host debugging in
launch.json
- Press
Ctrl+Shift+P
/Cmd+Shift+P
and typeOpen launch
. - The Open launch (JSON) command will let you directly edit the
launch.json
file. - Add the following configuration to
launch.json
to run the extension on extension host.
{ "type": "extensionHost", "request": "launch", "name": "Launch Extension", "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}" ], "env": { "LSDEBUG":"true" }, "outFiles": [ "${workspaceFolder}/out/src/extension.js" ] }
Note:
"LSDEBUG":"true"
configuration is to start the Siddhi Language Server in debug mode, which enables remote debugging of language server. - Press
-
Add
"siddhi.debugLog":true
configuration tosettings.json
file to enable debug log. -
Clone Siddhi Language Server source code from https://github.com/siddhi-io/distribution.
-
Start Siddhi Language Server as a remote debug process at
port 5005
-
Refer more on debugging on extension host at https://code.visualstudio.com/docs/nodejs/nodejs-debugging
Execute npm run package
to build the .vsix
file.
Execute code --install-extension <SIDDHI-PLUGIN-DIRECTORY>/siddhi-*.vsix
to install the extension.
The extension uses Siddhi Language Server to provide language analytic capabilities using language server protocol.
Currently, the language server is capable of providing context based auto-completions and diagnostics.
Find the implementation of the Siddhi Language Server at https://github.com/siddhi-io/distribution
You can reach out through Slack channel, Google mail group and etc.Please refer the community contribution site for more information.