object88 / langd

A Language Server Protocol implementation in Go for Go
MIT License
7 stars 0 forks source link

Inconsistent API for line and column numbering #34

Open object88 opened 6 years ago

object88 commented 6 years ago

Workspace APIs such as LocateDeclaration expect a 1s based numbering system. ChangeFile expects a 0s based system.

package foo
var Foof int = 1
func Foo() int {
    return Foof
}

Calling LocateDeclaration for Foof in return Foof is (4, 9). The same for ChangeFile is (3, 8).

The numbering systems must be consistent.