jonnyboyC / kos-language-server

A language server for the Kerboscript (kOS) a language for Kerbal Space Program
MIT License
27 stars 6 forks source link
kerbal-space-program kerboscript kos ksp language-server language-server-protocol typescript vscode

kOS Language Server

Build Status Azure DevOps tests Azure DevOps coverage (branch)

A language server for Kerboscript within the KOS mod for Kerbal Space Program. A language server can provide features typical to an IDE language for the supported target language, in this case Kerboscript.

The project currently supports the following clients

For additional client support such as sublime text, emacs, notepad++ or others please post an issue with the requested editor.

Features

Currently the vscode client 1.1.5 implements the follow features

Directives

The language server includes several comment directives that can be included extra functionality

Commands

All commands can be launched with ctrl+shift+p

Workspace Configuration

The workspace can be configured with a file called ksconfig.json. The following is an example

{
  "archive": "..",
  "bodies": ["earth", "moon", "sun"],
  "linting": {
    "control-flow-break": "off"
  }
}

This will set the archive folder to correspond to the folder above, the valid bodes to be earth, moon and sun and to turn off linting related to invalid break statements. More info can be found here.

Global Configuration

These settings are currently included with the tool

Influence

This project is heavily inspired by the crafting interpreters series. Definitely check it out if your interested in creating your own language, or language tooling.