Skip to content

Commit d81f1c6

Browse files
committed
feat: add EO LSP Server
Signed-off-by: azerr <azerr@redhat.com>
1 parent 368d012 commit d81f1c6

File tree

13 files changed

+129
-0
lines changed

13 files changed

+129
-0
lines changed

docs/UserDefinedLanguageServer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pre-filled with server name, command, mappings and potential configuration.
155155
* [Clojure LSP](./user-defined-ls/clojure-lsp.md)
156156
* [Dart LSP](./user-defined-ls/dart-lsp.md)
157157
* [Docker Language Server](./user-defined-ls/docker-language-server.md)
158+
* [EO LSP Server](./user-defined-ls/eo-lsp-server.md)
158159
* [Erlang Language Server](./user-defined-ls/erlang-ls.md)
159160
* [ESLint Language Server](./user-defined-ls/vscode-eslint-language-server.md)
160161
* [Go Language Server](./user-defined-ls/gopls.md)
112 KB
Loading
66.9 KB
Loading
47.7 KB
Loading
55.9 KB
Loading
41.8 KB
Loading
113 KB
Loading

docs/user-defined-ls/eo-lsp-server.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# EO Language Server
2+
3+
To enable [EO](https://www.eolang.org/) language support in your IDE, you can integrate the [EO LSP Server](https://github.com/objectionary/eo-lsp-server) by following these steps:
4+
5+
![EO LS demo](../images/user-defined-ls/eo-lsp-server/demo_ls.gif)
6+
7+
---
8+
9+
## Step 1: Install the Language Server
10+
11+
1. Open an `.eo` file in your project.
12+
2. Click on **Install LSP Server for EOLANG**:
13+
14+
![Open file](../images/user-defined-ls/eo-lsp-server/open_file.png)
15+
16+
3. This will open the [New Language Server Dialog](../UserDefinedLanguageServer.md#new-language-server-dialog) with `LSP Server for EOLANG` pre-selected:
17+
18+
![New Language Server Dialog](../images/user-defined-ls/eo-lsp-server/new_language_server_dialog.png)
19+
20+
4. Click **OK**. This will create the `LSP Server for EOLANG` definition and start the installation:
21+
22+
![Installing Language Server](../images/user-defined-ls/eo-lsp-server/language_server_installing.png)
23+
24+
5. Once the installation completes, the server should start automatically and provide EO language support (diagnostics and semantic tokens.).
25+
26+
### Troubleshooting Installation
27+
28+
If the installation fails, you can customize the installation settings in the **Installer** tab,
29+
then click on the **Run Installation** hyperlink to reinstall the server:
30+
31+
![Installer tab](../images/user-defined-ls/eo-lsp-server/installer_tab.png)
32+
33+
See [Installer descriptor](../UserDefinedLanguageServerTemplate.md#installer-descriptor) for more information.
34+
35+
---
36+
37+
## Step 2: Install TextMate Bundle
38+
39+
Even if [EO LSP Server](https://github.com/objectionary/eo-lsp-server) can support LSP semantic tokens, You can also set up the EO TextMate bundle manually.
40+
41+
* Clone the [eo-vscode](https://github.com/objectionary/eo-vscode) repository:
42+
43+
```bash
44+
git clone https://github.com/objectionary/eo-vscode.git
45+
46+
* Open TextMate Bundles settings
47+
48+
![TextMate Bundles Settings](../images/user-defined-ls/eo-lsp-server/textmate_bundles_settings.png)
49+
50+
* Click the `+` button and select the folder [eo-vscode](https://github.com/objectionary/eo-vscode) folder.
51+
This folder contains the modified package.json and the TextMate grammar.
52+
53+
Once done, IntelliJ will apply syntax highlighting, bracket matching, and other basic editor features for .eo files.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"id": "eo-lsp-serverr",
3+
"name": "LSP Server for EOLANG",
4+
"executeOnStartServer": false,
5+
"properties": {
6+
"workingDir" : "$USER_HOME$/.lsp4ij/lsp/eo-lsp-server/node_modules"
7+
},
8+
"check": {
9+
"exec": {
10+
"name": "Trying current command",
11+
"command": "${server.command}",
12+
"timeout": 2000
13+
}
14+
},
15+
"run": {
16+
"exec": {
17+
"name": "Install LSP Server for EOLANG",
18+
"workingDir": "${workingDir}",
19+
"ignoreStderr": true,
20+
"command": {
21+
"windows": "npm.cmd install eo-lsp-server --force",
22+
"default": "npm install eo-lsp-server --force"
23+
},
24+
"onSuccess": {
25+
"configureServer": {
26+
"name": "Configure LSP Server for EOLANG command",
27+
"command": {
28+
"windows": "${workingDir}/.bin/eo-lsp-server.cmd --stdio",
29+
"default": "${workingDir}/.bin/eo-lsp-server --stdio"
30+
},
31+
"update": true
32+
}
33+
}
34+
}
35+
}
36+
}
37+

0 commit comments

Comments
 (0)