1
0
mirror of https://github.com/golang/go synced 2024-10-01 09:38:36 -06:00
go/internal/lsp/cache
Muir Manders 63859f3815 internal/lsp: add definition support for packages
Now the "type" of a *ast.PkgName is the package it points to. Of
course, a package is not a real types.Type, but we can still jump you
there. We have to pick one of the package's files, so we choose the
longest one, hoping it is the most interesting.

Similarly, the "definition" of an *ast.ImportSpec is the package being
imported.

I also added a nil check for the package in SignatureHelp. This panics
for me occasionally.

Change-Id: Ide4640530a28bcec9da6de36723eb7f0e4cc941c
GitHub-Last-Rev: 8190baa0b908065db5b53f236de03d2f3bff39b5
GitHub-Pull-Request: golang/tools#92
Reviewed-on: https://go-review.googlesource.com/c/tools/+/174081
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-05-10 15:10:30 +00:00
..
check.go internal/lsp: propagate diagnostics for reverse dependencies 2019-05-10 13:52:23 +00:00
file.go internal/lsp: propagate diagnostics for reverse dependencies 2019-05-10 13:52:23 +00:00
parse.go internal/lsp: handle completion after defer, go statements 2019-04-24 22:01:01 +00:00
pkg.go internal/lsp: add definition support for packages 2019-05-10 15:10:30 +00:00
view.go internal/lsp: support builtin types without hardcoding 2019-05-01 04:50:30 +00:00