sarsi
sarsi copied to clipboard
Support more structure (start/end) in `Location`.
Language like Rust provide not only the start location of the error, but also the end location.
Ideally this should be supported by the sarsi protocol, in order to provide complete highlighting in clients.
Actually, it could be simply a Length
parameter added in addition to Location
.
But I'm not sure how useful it is, I can not think of a single case where this information can not be retrieved just by highlighting the expression at Location
.
Elm provides the following
{
"region": {
"start": {
"line": 61,
"column": 4
},
"end": {
"line": 62,
"column": 32
}
},
"subregion": {
"start": {
"line": 62,
"column": 15
},
"end": {
"line": 62,
"column": 32
}
}
}
Where region
can express a piece of code and subregion
to specify exactly where the error is. subregion
can be optional
IMHO region
is enough, no need for subregion
in sarsi
35| update : Msg -> Model -> (Model, Cmd Msg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For info, in LSP they have a Range
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#range