Closed olafurpg closed 5 years ago
Given the source file
package a object A { val x: Int = "" }
has a compilation error that is reported by bloop using 1-based line/column ranges instead of 0-based line/column ranges as the LSP + BSP specifications require https://microsoft.github.io/language-server-protocol/specification#text-documents
A position inside a document (see Position definition below) is expressed as a zero-based line and character offset.
The notification from bloop
- obtained + expected { "uri": "file:/Users/ollie/dev/metals/test-workspace/src/main/scala/example/User.scala", "diagnostics": [ { "range": { "start": { - "line": 4, + "line": 3, "character": 15 }, "end": { - "line": 4, + "line": 3, "character": 17 } }, "severity": 1, "message": "type mismatch;\n found : String(\"\")\n required: Int" } ] }
The character numbers are correct, only the line numbers are 1-based
Given the source file
has a compilation error that is reported by bloop using 1-based line/column ranges instead of 0-based line/column ranges as the LSP + BSP specifications require https://microsoft.github.io/language-server-protocol/specification#text-documents
The notification from bloop