Install the extension from the VSCode Marketplace.
The extension support Linux, Mac and Windows via WSL.
By default the language server will report diagnostics for files located under
the assembly/ directory. The configuration can be changed under the extension
settings to include other files.
The default configuration values are:
"asls.include": {
"description": "AssemblyScript sources to analyze",
"type": "array",
"default": [
"assembly/**/*.ts",
"assembly/*.ts"
]
},
"asls.port": {
"description": "Port in which the language server will be listening",
"type": "number",
"default": 0
},
"asls.debug": {
"description": "Start the language server in debug mode",
"type": "boolean",
"default": false
}
Development
If you want to develop the extension using a development version of the language
server, you need to:
Build the langue server binary (mix release)
Symlink the language server binary into this directory ln -s path/to/language/server/asls/_build/dev/rel/asls/bin/asls asls
Run npm install and npm run compile
Make sure to have Erlang 22+ installed, if you're using nix you can do so by
running nix-env -iA nixpkgs.erlang
Under the debug section in VSCode click on Run extension
Once the extension is runing, in VSCode's output console, verify that the
logs specify that the language server was started from the relative symlink,
it looks something like:
Starting the AssemblyScript Language Server from: /path/to/extension/vscode-as/asls
To release a new version
Bump the version in the package.json
Package the extension by running yarn && npx vsce package --yarn
Test the packaged extension by running code --install-extension ./asls-x.x.x.vsix