aboutsummaryrefslogtreecommitdiff
path: root/supported-servers.lua
diff options
context:
space:
mode:
authorThim Cederlund <thim@cederlund.de>2023-10-11 17:28:59 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-10-12 18:52:19 +0200
commit7099e56062861fc8dbb143e78447cce6bf886a97 (patch)
treee4006ea49429281e125cf2e3cae62b0b25d583ba /supported-servers.lua
parentc91a9c94b1408a308a33acbe56e8eb9bcf86d197 (diff)
downloadvis-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 'supported-servers.lua')
0 files changed, 0 insertions, 0 deletions