LSP range start and end always point to same character
Hey there!
I am posting here after digging into a problem with the elixir extension for the zed editor:
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:
"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?
Dialyzer is not emitting ranges but simple lines or lines and columns. In some cases ElixirLS is able to match a symbol or a line but evidently it is not working in this case. Can you share a sample repo that reproduces this problem?
Not really, sorry. This is in a proprietary codebase.
It does however happen for every file of that particular codebase across all our dev amchines (running linux/macos)