Skip to content

LSP range start and end always point to same character #1238

@Ansraer

Description

@Ansraer

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:

"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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions