diff options
| author | Thim Cederlund <thim@cederlund.de> | 2023-10-11 17:28:59 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-12 18:52:19 +0200 |
| commit | 7099e56062861fc8dbb143e78447cce6bf886a97 (patch) | |
| tree | e4006ea49429281e125cf2e3cae62b0b25d583ba /lspc.lua | |
| parent | c91a9c94b1408a308a33acbe56e8eb9bcf86d197 (diff) | |
| download | vis-lspc-7099e56062861fc8dbb143e78447cce6bf886a97.tar.gz vis-lspc-7099e56062861fc8dbb143e78447cce6bf886a97.zip | |
fix diagnostic highlighting and message
Some language servers report diagnostics with empty ranges, start and
end are at the same line and character, which currently results in
no highlighting at all.
Since the end of a LSP range is exclusive we always subtract 1 from
it which results in invalid ranges when the server has sent an empty one.
Introduce a check to fix this special case.
`textDocument/publishDiagnostics` doesn't always have a `code` field,
resulting in `diagnostic.code` being nil and so it is replaced with
`diagnostic` in those cases.
Diffstat (limited to 'lspc.lua')
0 files changed, 0 insertions, 0 deletions
