This language server provides some very basic IDE support for Grammatical Framework
Currently, it only provides error messages for the currently opened file and it only checks when you save, so I recommend enabling auto-save in your editor (VS Code).
This currently requires a patched version of Grammatical Framework, so the easiest way to build it is using nix. I'll add support for other build workflows later.
To speed up the installation, you can use my binary cache on cachix
bash <(curl -L https://nixos.org/nix/install) # Install nix
nix-env -iA cachix -f https://cachix.org/api/v1/install # Install
cachix use anka-213 # Use my binary cache
There are a couple of ways to build it:
nix-shell
cabal install
or with
nix-env -if .
or
nix-env -if https://github.com/anka-213/gf-lsp/archive/main.tar.gz
You need to enable LSP client in your editor to use this. For example, you can download the VS Code plugin at https://github.com/anka-213/gf-vscode.
For other editors, configure .gf
files to be handled by gf-lsp
.
After installing both the server and client, it should show error messages inline at the location of the error.