Skip to content

LSP server for the EOLANG programming language: works with VS Code, Sublime Text, IntelliJ IDEA and other IDEs

License

Notifications You must be signed in to change notification settings

objectionary/eo-lsp-server

Repository files navigation

LSP Server for EOLANG

GitHub Workflow Status (branch) GitHub codecov Hits-of-Code

This is the LSP server for EO. It provides semantic highlighting and parsing error checking for .eo files (written in EOLANG). In order to use it, you need to have Node and npm installed.

Using with IntelliJ (with LSP4IJ)

LSP4IJ, a free LSP support plugin for IntelliJ, provides an EO LSP server template to automatically install and run the LSP Server for EOLANG:

  • Install LSP4IJ into IntelliJ
  • Open any *.eo file, a notification will appear with Install LSP Server for EOLANG
  • Click the link, confirm the server creation, then click OK
  • The server will be installed (via npm)

Once done, semantic tokens and diagnostics will be available.

Using with Sublime Text

To use this LSP server with Sublime Text, you'll need to install the LSP package and configure it in Settings → Package Settings → LSP → Settings:

{
  "clients": {
    "eo-lsp": {
      "enabled": true,
      "command": ["npx", "-y", "[email protected]", "--stdio"],
      "selector": "source.eo"
    }
  }
}

Then, create a syntax definition file in ~/Library/Application Support/Sublime Text/Packages/User/EO.sublime-syntax:

%YAML 1.2
---
name: EO
file_extensions:
  - eo
scope: source.eo
contexts:
  main:
    - match: '^\+[^\n]+$'
      scope: meta.eo
    - match: '#.*$'
      scope: comment.line.eo
    - match: '[@^*?]'
      scope: keyword.eo
    - match: '[\[\]\\>!:\.\)\(]|\+>'
      scope: keyword.operator.eo
    - match: '"[^"]*"'
      scope: string.quoted.double.eo
    - match: '\b(\+|-)?\d+(\.\d+(e(\+|-)?\d)?)?\b'
      scope: constant.numeric.eo

Should work. If it doesn't, file an issue, we'll help.

How to Contribute

First, install Node modules with:

npm install

Then, build the project:

make

Make changes on a new branch. You can run an instance of VS Code with the extension running by hitting F5 in the code editor. After modifications, test your code with:

make test

Create a pull request, we'll be glad to review it and merge.

About

LSP server for the EOLANG programming language: works with VS Code, Sublime Text, IntelliJ IDEA and other IDEs

Topics

Resources

License

Stars

Watchers

Forks