go-langserver
go-langserver copied to clipboard
Goto definition not working for dot imports
In the below case, the definition provider fails for Println
package main
import . "fmt"
func main() {
Println("hello")
}
We also use godef as well. The use of . imports is discouraged and linting tools actually complain if you use them outside of a package test https://github.com/golang/go/wiki/CodeReviewComments#import-dot
As such this is a very very rarely used go feature. So will be pretty low priority for us to fix, so I don't think we will fix it anytime soon.
There is a pull request at godef: https://github.com/rogpeppe/godef/pull/68
Any update on this? I'm using the language server.
@RahmanQureshi I would suggest migrating to gopls
@keegancsmith yes I am using the gopls language server.
This issue is for another language server. You likely need to file an issue against gopls. https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#file-an-issue