Language server for Pony. See https://github.com/Microsoft/language-server-protocol for more information on the language server standard.
The Main actor setup everything and maps commands to the proper lsp actor.
The LSP protocol has been divided in actors based on the subcategories of
the spec, these are the pony files starting with lsp_
.
The different channel implementations reside in the files prefixed with
channel_
.
The VSCode extension resides in the folder client_vscode
.
-
libponyc-standalone
is needed for pony-ast to compile. Right now it is only built on linux, for macos you will need this change: ponylang/ponyc#4303. For windows, you will have to find your own way at the moment. IMPORTANT: libponyc has to be compiled in debug mode -
stdlib
is required for libponyc to work, so the environment variablePONYPATH
has to point to thepackages
folder in the ponyc source code. For VSCode, we are copying it to the extension folder, and the extension is setting the env variable (build.sh
).
-
If you don't have an available libponyc compiled with config=debug, start by cloning the repo and dependencies
git clone --recurse-submodules <repo>
-
Build ponyc:
cd ponyc
,make libs
,make configure config=debug
,make build config=debug
-
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.
You can pack the extension by running vsce pack
in the client_vscode folder. You
will get a pony.vsix
file which you can install in vscode using code --install-extension pony.vsix