This PR has the intention of implementing the list feature for :ALEGoToDefinition and :ALEGoToImplementation. Specially :ALEGoToImplementation. There are times a LSP may return multiple results for the textDocument/implementation command. This is true when we try to find implementations of an abstract class or interface. The way ALE is implemented, only the first result is returned.
Take this example.
foobar.go:
type Foobarer interface {
Do() bool
}
foobar_a.go
type FoobarA struct {
foo int
}
func (f *FoobarA) Do() bool {
fmt.Printf("This foobar is int (%d)\n", f.foo)
return true
}
When trying to find implementations of the Do function, it will only find the one from AnotherFoobar struct (because the LSP returns in alphabetic order). But I could want the other one. This change fixes this behavior.
This PR has the intention of implementing the list feature for
:ALEGoToDefinition
and:ALEGoToImplementation
. Specially:ALEGoToImplementation
. There are times a LSP may return multiple results for thetextDocument/implementation
command. This is true when we try to find implementations of an abstract class or interface. The way ALE is implemented, only the first result is returned.Take this example.
foobar.go:
foobar_a.go
another_foobar.go
When trying to find implementations of the
Do
function, it will only find the one fromAnotherFoobar
struct (because the LSP returns in alphabetic order). But I could want the other one. This change fixes this behavior.