This repository implements LSP server for Amber Language
There are few ways you can use this LSP in your favorite IDE:
- VsCode extension
- Zed extension
- Download LSP server and connect manually
In order to develop Amber LSP you will need few things:
- Rust
- Node.JS
- Python
In order to use pre-commit hook you have to run following commands:
pip install pre-commit
In the project directory:
pre-commit install
This hook will check code formatting and any improvements you can do to your code.
It will also see if you used "FIXME" keyword that is a helpful way for you, to make sure you do not commit changes that need fixing.
Tests are divided based on Amber compiler version (eg. alpha034 for "0.3.4-alpha").
They are mainly based on snapshots using cargo insta.
Code coverage is generated with cargo tarpaulin.
You can test code coverage via run_coverage.ab
script, which will display results in a form of an HTML page.
./run_coverage.ab [<Json, Stdout, Xml, Html, Lcov>...]
We require 80% code coverage.
Server for now communicates only via stdio.
If you're using VsCode, you can test the extension by running pre defined script "Run Extension (Release Build)" in tests tab.
If you're using Zed, you need to clone Zed extension repo and change "cached_binary_path" to local Amber LSP server binary.