Language server for Pony. For more information see the Language Server Standard.
The language server is started as a separate actor, which is given a channel for communication with the language-server client. After initialization it starts one actor for each workspace it is invoked for and routes requests to one of those workspace actors. They implement the actual LSP logic. It is also those actors that invoke the compiler actor, which executes a subset of the pony compiler passes in-process in order to get an AST to do LSP analysis on.
The VSCode extension resides in the folder client_vscode
.
-
Build ponyc:
cd ponyc
,make libs
,make configure
,make build
-
Prepare VSCode extension:
cd client_vscode
,npm i
-
To debug in VSCode, press
F5
, this will compile both the vscode extension in the client folder and the pony server, using thebuild.sh
script.
If pony compilation fails, the process will stop, so you can press F5
without fear.
To compile the binary in release mode:
make language_server
In order to compile the language server in debug
mode,
set the config
variable to debug
:
make config=debug language_server
make vscode_extension
This will create the extension package as a .vsix
file
in the build/release
folder. E.g. build/release/pony-lsp-0.58.4.vsix
.
code --uninstall-extension undefined_publisher.pony-lsp
code --install-extension build/release/pony-lsp-0.58.4.vsix
Check the actual folder and version of the extension being built.