Page
Library
Module
Module type
Parameter
Class
Class type
Source
Be advised that this is a work in progress repository and is not yet considered as a fully functional VSCode extension.
Client side:
LSP-server:
In order to build and use this extension, you will need to install:
The 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:
opam pin catala-lsp git+https://github.com/CatalaLang/catala-language-server.git-- and, optionally, you may also install the code formatter (see below).
It is also possible to build the extension from the sources through these commands:
# 1. Clone this repository
git clone https://github.com/CatalaLang/catala-language-server/
# 2. Enter the freshly created directory
cd catala-language-server/
# 3. Install the JS dependencies
npm install
# 4. Install the OCaml dependencies
opam install . --deps-only
# 5. Build the extension
npm run compileFrom 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:
# 1. Install VSCode extension CLI tool: e.g.,
sudo npm install -g @vscode/vsce
# 2. Package the extension
vsce package
# 3. Install the generated .vsix extension through the VSCode GUI or
# by invoking:
code --install-extension catala-0.20.0.vsixIf you wish to test the extension without installing it, you may:
$ code .)A new VSCode window should open with the extension running
catala-format is an automated code formatting tool based on topiary. To install catala-format, use this command:
$ opam install catala-formatN.b. the installation may be lengthy as it needs to install topiary.
Once this is done, you may start (or reload) the extension and use the format document command: Ctrl-p and type 'Format Document'. You may also bind it to a handy keyboard shortcut. Beware: if the catala program you are trying to format cannot be properly parsed, the formatter call will fail.
catala-format can also be used as a standalone tool or plugged in your favorite IDE. Type catala-format --help in a terminal for more details.
The 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.
When developing on the "front" (typescript side) of the extension, you may invoke npm run watch to continuously build the extension.
All the code contained in this repository is released under the Apache license (version 2) unless another license is explicited for a sub-directory.
This extension is automatically published to the VS Code Marketplace when a new GitHub release is created.
Update Version in package.json:
package.jsonCreate a GitHub Release:
v0.23.0 or just 0.23.0)Automated Process: The CI/CD workflow automatically:
Verification: