elixir-lsp / elixir-lsp/elixir-ls

LSP range start and end always point to same character

Open
#1,238 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
227
Avg merge
31m
Merged PRs (30d)
2

Description

Hey there!

I am posting here after digging into a problem with the elixir extension for the zed editor:

Image

As you can see above, the editor only underlines the first character of any error/warning.

Using the LSP logs panel I finally discovered that the problem appears to be in the lsp. All the rpc messages always have identical start and ends, which means that the editor only ever highlights the first character:

```json
"range":{"end":{"character":8,"line":104},"start":{"character":8,"line":104}},
"relatedInformation":[],
"severity":2,
"source":"ElixirLS Dialyzer"
```

I am wondering, is this intended behavior? I have never really dug into the intricacies of how LSPs work, but this feels wrong. Should this be intended behavior, could someone please explain to me why (I am curious) and how editor extensions are supposed to work around this limitation to still highlight things properly?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.