Catala VSCode extension and LSP serverDisclaimerBe advised that this is a work in progress repository and is not yet considered as a fully functional VSCode extension. FeaturesClient side:
LSP-server:
Getting startedPrerequisitesIn order to build and use this extension, you will need to install: InstallationVSCode MarketplaceThe simplest way to install this extension is through the VSCode marketplace which is directly accessible in VScode. However, the extension still requires the Catala LSP server which, for the time being, need to be manually installed through OPAM using this command:
-- and, optionally, you may also install the code formatter (see below). Build from sourcesIt is also possible to build the extension from the sources through these commands:
From this point on, you may test the extension by skipping to the next section. Otherwise, you can package and install the extension in VSCode by following these extra steps:
TestingIf you wish to test the extension without installing it, you may:
Code formattingAn automated code formatting tool for catala is available. This tool is based on topiary. As of right now, the Catala language is not officially supported by topiary and requires to install catala-format. To install this tool pin (via opam)
N.b. the installation may be lengthy as it needs to install Once this is done, you may start (or reload) the extension and use the
format document command: Using the Custom Test Case EditorThe custom (visual) test case editor usage is controlled by a configuration setting. To enable or disable the custom editor:
When the custom editor is disabled, test files will open in the default text editor. Note: After changing the setting, you must reload the VSCode window for the changes to take effect. This is because the custom editor registration happens when the extension is activated, and changing the setting doesn't automatically re-register or unregister the editor. DevelopingWhen developing on the "front" (typescript side) of the extension, you may invoke
LicenseAll the code contained in this repository is released under the Apache license (version 2) unless another license is explicited for a sub-directory. |