Skip to content

Commit 2ec9608

Browse files
authored
updated: elixir language server, replaced with expert (#783)
1 parent fb01cc3 commit 2ec9608

File tree

11 files changed

+211
-201
lines changed

11 files changed

+211
-201
lines changed

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
if: runner.os != 'Windows'
9191
uses: erlef/setup-beam@v1
9292
with:
93-
elixir-version: "1.18.4"
94-
otp-version: "26.1"
93+
elixir-version: "1.19.3"
94+
otp-version: "28"
9595
# Erlang currently not tested in CI, random hangings on macos, always hangs on ubuntu
9696
# In local tests, erlang seems to work though
9797
# - name: Install Erlang Language Server

docs/01-about/020_programming-languages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ With Serena, we provide direct, out-of-the-box support for:
2020
* **Clojure**
2121
* **Dart**
2222
* **Elixir**
23-
(requires installation of NextLS and Elixir; Windows not supported)
23+
(requires Elixir installation; Expert language server is downloaded automatically)
2424
* **Elm**
2525
(requires Elm compiler)
2626
* **Erlang**

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ markers = [
301301
"fortran: language server running for Fortran",
302302
"haskell: Haskell language server tests",
303303
"yaml: language server running for YAML",
304+
"slow: tests that require additional Expert instances and have long startup times (~60-90s each)",
304305
]
305306

306307
[tool.codespell]

src/solidlsp/language_servers/elixir_tools/README.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
# Elixir Language Server Integration
22

3-
This directory contains the integration for Elixir language support using [Next LS](https://github.com/elixir-tools/next-ls) from the elixir-tools project.
4-
5-
> **⚠️ Windows Not Supported**: Next LS does not provide Windows binaries, so Elixir language server integration is only available on Linux and macOS.
6-
7-
## Known Issues
8-
9-
### Next LS v0.23.3 Timeout Enumeration Bug
10-
There is a known intermittent bug in Next LS v0.23.3 where `textDocument/definition` requests can fail with:
11-
```
12-
Protocol.UndefinedError: protocol Enumerable not implemented for :timeout of type Atom
13-
```
14-
15-
This bug is tracked in [Next LS Issue #543](https://github.com/elixir-tools/next-ls/issues/543) and primarily occurs in CI environments. The affected test (`test_request_defining_symbol_none`) is marked as expected to fail until this upstream bug is resolved.
3+
This directory contains the integration for Elixir language support using [Expert](https://github.com/elixir-lang/expert), the official Elixir language server.
164

175
## Prerequisites
186

@@ -22,9 +10,10 @@ Before using the Elixir language server integration, you need to have:
2210
- Install from: https://elixir-lang.org/install.html
2311
- Verify with: `elixir --version`
2412

25-
2. **Next LS** installed and available in your PATH
26-
- Install from: https://github.com/elixir-tools/next-ls#installation
27-
- Verify with: `nextls --version`
13+
2. **Expert** (optional - will be downloaded automatically if not found)
14+
- Expert binaries are automatically downloaded from GitHub releases
15+
- Manual installation: https://github.com/elixir-lang/expert#installation
16+
- If installed manually, ensure `expert` is in your PATH
2817

2918
## Features
3019

@@ -42,13 +31,20 @@ The Elixir integration provides:
4231

4332
## Configuration
4433

45-
The integration uses the default Next LS configuration with:
34+
The integration uses the default Expert configuration with:
4635

4736
- **MIX_ENV**: `dev`
4837
- **MIX_TARGET**: `host`
4938
- **Experimental completions**: Disabled by default
5039
- **Credo extension**: Enabled by default
5140

41+
### Version Management (asdf)
42+
43+
Expert automatically respects project-specific Elixir versions when using asdf:
44+
- If a `.tool-versions` file exists in the project root, Expert will use the specified Elixir version
45+
- Expert is launched from the project directory, allowing it to pick up project configuration
46+
- No additional configuration needed - just ensure asdf is installed and the project has a `.tool-versions` file
47+
5248
## Usage
5349

5450
The Elixir language server is automatically selected when working with Elixir projects. It will be used for:
@@ -63,14 +59,14 @@ The Elixir language server is automatically selected when working with Elixir pr
6359

6460
### Important: Project Compilation
6561

66-
Next LS requires your Elixir project to be **compiled** for optimal performance, especially for:
62+
Expert requires your Elixir project to be **compiled** for optimal performance, especially for:
6763
- Cross-file reference resolution
6864
- Complete symbol information
6965
- Accurate go-to-definition
7066

7167
**For production use**: Ensure your project is compiled with `mix compile` before using the language server.
7268

73-
**For testing**: The test suite automatically compiles the test repositories before running tests to ensure optimal Next LS performance.
69+
**For testing**: The test suite automatically compiles the test repositories before running tests to ensure optimal Expert performance.
7470

7571
## Testing
7672

@@ -83,8 +79,9 @@ pytest test/solidlsp/elixir/ -m elixir
8379
## Implementation Details
8480

8581
- **Main class**: `ElixirTools` in `elixir_tools.py`
86-
- **Initialization parameters**: Defined in `initialize_params.json`
8782
- **Language identifier**: `"elixir"`
88-
- **Command**: `nextls --stdio`
83+
- **Command**: `expert --stdio`
84+
- **Supported platforms**: Linux (x64, arm64), macOS (x64, arm64), Windows (x64, arm64)
85+
- **Binary distribution**: Downloaded from [GitHub releases](https://github.com/elixir-lang/expert/releases)
8986

90-
The implementation follows the same patterns as other language servers in this project, inheriting from `SolidLanguageServer` and providing Elixir-specific configuration and behavior.
87+
The implementation follows the same patterns as other language servers in this project, inheriting from `SolidLanguageServer` and providing Elixir-specific configuration and behavior.

0 commit comments

Comments
 (0)