go/gopls/doc
Heschi Kreinick 414ec9c3f0 internal/lsp: add ListImports
The VS Code extension uses information about imports to figure out
whether a given function is a Testify test. As of writing, it asks:
- Does the file import Testify?
- Does the package it's in do so?
To answer these questions, add ListImports, which tells you about the
packages imported by the current file, including their import name,
plus the import paths of all imports in the entire package.

I suspect the latter may be wrong in the presence of GOPATH vendoring,
but that should be a relatively rare situation at this point so I didn't
bother testing.

Fixes golang/go#40514.

Change-Id: I4c69e1db80dce6e594bdb595a81aade1ddec4d29
Reviewed-on: https://go-review.googlesource.com/c/tools/+/383354
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-04 22:09:29 +00:00
..
design gopls/doc: clean up and slightly reorganize documentation 2021-01-14 06:55:38 +00:00
advanced.md doc: update the instruction to use beta2 2022-01-31 20:30:41 +00:00
analyzers.md internal/lsp/analysis/noresultvalues: update for CL 379116 error message change 2022-01-18 21:28:05 +00:00
command-line.md gopls/doc: remove bad gopls cli link 2021-10-20 20:41:51 +00:00
commands.md internal/lsp: add ListImports 2022-02-04 22:09:29 +00:00
contributing.md gopls/doc: add instructions for the new "kokoro rerun" feature 2021-09-20 19:55:18 +00:00
daemon.md gopls/doc: clarify how to set remote.listen.timeout 2021-03-08 14:22:49 +00:00
emacs.md Update emacs.md - add .dir-locals.el example 2021-03-19 04:40:15 +00:00
features.md gopls: change the default value for templateExtensions to be empty 2022-01-13 20:56:24 +00:00
generate.go gopls/doc: use improved code generator for API doc 2021-12-16 11:15:33 +00:00
generate_test.go gopls/doc: use improved code generator for API doc 2021-12-16 11:15:33 +00:00
semantictokens.md internal/lsp: produce "method" in place of "member" as per the spec 2021-09-13 21:01:54 +00:00
settings.md gopls: make 'fastfuzzy' the default fuzzy matcher for workspace symbols 2022-02-03 14:26:36 +00:00
subl.md gopls/doc: how to request a particular gopls w/ sublime text 2022-02-04 21:02:33 +00:00
troubleshooting.md gopls: merge README and user.md 2021-01-21 18:28:06 +00:00
vim.md gopls: update coc.nvim documentation for using go.work 2022-02-04 14:04:20 +00:00
workspace.md gopls/doc: fix broken link 2021-04-26 16:33:22 +00:00