First, ensure you have Node.js and npm installed.
# build the extension
make# uninstall any previously installed extensions
code --uninstall-extension ponylang.ponylang-vscode-extension
# install the newly-built package
code --install-extension "build/release/ponylang-vscode-extension-${VERSION}.vsix"Install pony-lsp and ponyc and ensure they're on your PATH. For example:
brew install ponycImportant
pony-lsp 0.61.0 or above is required, to ensure it correctly locates the Pony standard library and accepts the needed configuration options.
If pony-lsp is not found, the extension shows an error. Once you install it, or set pony.lsp.executable, you can start the language server without restarting VS Code: run the Pony: Restart Language Server command, or click Retry on the error. The extension searches your PATH and ponyup's install directory, so a toolchain installed with ponyup is found without a restart.
These settings control how the Pony VS Code extension operates.
pony.lsp.executable: The file path to the pony-lsp executable. If not set, the extension searches for pony-lsp on your PATH and then in ponyup's install directory.
pony.trace.server: Traces the communication between VS Code and the Pony language server. Accepted values are "off" (default), "messages", and "verbose".
These settings are passed directly to pony-lsp and affect how it compiles and resolves your Pony code.
pony-lsp.defines: An array of compilation defines passed to pony-lsp, equivalent to the -D flag of ponyc.
pony-lsp.ponypath: An array of paths added to the package search paths of pony-lsp, equivalent to the PONYPATH environment variable.
{
"pony.lsp.executable": "/usr/local/bin/pony-lsp",
"pony.trace.server": "off",
"pony-lsp.defines": ["FOO", "BAR"],
"pony-lsp.ponypath": ["/path/to/pony/package1", "/path/to/pony/package2"]
}