SogoCZE / Jails

Jai language server prototype
MIT License
52 stars 9 forks source link
jai language-server lsp

Jails

Jails is an experimental language server for the Jai programming language.

Features

In the future, the language server will support all other basic stuff you would get from any other LSP. Also, the plan is to support some specific Jai features from an editor support perspective like for example macro evaluation inside the editor etc.

Usage

Be aware that this language server is still pretty much unstable... Nonetheless, it can be quite useful even in this early stage of development.

Cloning

This repo uses git submodules. Clone it using git clone --recurse-submodules.

Building

Compile the release version of the server with jai build.jai - -release. Jails binary will be generated in the bin folder.

VS Code

  1. Make sure this repo is your working directory (e.g. cd Jails).
  2. Run npm install --global @vscode/vsce to install the Visual Studio Code Extension Manager.
  3. Run jai build.jai - -release to build the binary.
  4. Run cd vscode_extension to enter the subdirectory vscode_extension.
  5. Run npm install to install npm dependencies.
  6. Run npm run compile to generate an extension bundle.
  7. Run npm run pack:unix or npm run pack:windows to pack the bundle into a file called something like jails-x.x.x.vsix.
  8. Run code --install-extension jails-x.x.x.vsix to install the extension in VS Code.

Config file

You can create a config file jails.json inside your project root to specify:

{
    "local_modules": [
        "modules"
    ],
    "roots": [
        "server/main.jai",
        "build.jai"
    ],
    "build_root": "build.jai"
}

Run (dev)

Compile server with jai build.jai or compile and run test VSCode with preinstalled LSP with jai build.jai - -vscode.

Dependencies