1.1.5 • Published 4 years ago

kos-language-server v1.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

KOS Language Server

kos-language-server is a language server for the Kerboscript language, part of Kerbal Operating System mod.

Installation

This package should like be installed globally using

  npm install -g kos-language-server

the server can then be started by

  kls

Arguments

  • -v --version output the version number
  • --node-ipc Connect with node inter process communication
  • --stdio Connect with standard io
  • --clientProcessId Id of the attached client process
  • --harmony_async_iteration Must be enabled if using node.js pre 10.0
  • -h --help output usage information

Features

Currently the kos-language-server 1.1.5 implements the follow features

  • Code completion
    • Built in symbols and keywords
    • local in scope symbols
    • suffixes where the type can be resolved
    • can be manually triggered
  • Document Symbols for quick navigation to properties in the document.
  • Workspace Symbols
  • Diagnostics (Validation) are pushed for all documents
    • syntax errors
    • semantic errors such as:
      • invalid parameter order
      • lazy global position
      • return and break outside of function or loop body
    • semantic warnings such as:
      • potentially undefined symbols
      • symbols that are shadowed by other symbols
      • potentially unused symbols
      • unreachable code
  • Go to definition for symbols and run statements. Currently for clashing globals the first found will be shown
  • Refactoring
    • Rename symbol
  • Type Checking
    • type checker for identifying wrong types
    • can in certain scenarios correctly identify the types of symbols and expressions
  • On hover symbol information with type info
  • Signature help for functions that can be correctly resolved
  • Caching of all documents in the workspace
  • Directives
    • Foldable regions using // #region and // #endregion
    • Include symbols using // #include <file-path>
  • Linting configuration with ksconfig.json

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.

1.1.5

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.1

4 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.2

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago