go/internal/lsp/source
Rob Findley 330dc7d2a4 internal/lsp/cache: assign a static temp workspace dir to the first view
Editors need a way to run commands in the same workspace that gopls
sees. Longer term, we need a good solution for this that supports
multiple workspace folders, but for now just write the first folder's
workspace to a deterministic location:
  $TMPDIR/gopls-<client PID>.workspace.

Using the client-provided PID allows this mechanism to work even for
multi-session daemons.

Along the way, simplify the snapshot reinitialization logic a bit.

Fixes golang/go#42126

Change-Id: I5b9f454fcf1a1a8fa49a4b0a122e55e762d398b4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/264618
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Robert Findley <rfindley@google.com>
2020-11-04 18:18:50 +00:00
..
completion internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
genapijson internal/lsp/source: use 'gopls.' instead of 'gopls_' 2020-10-20 14:19:29 +00:00
api_json.go internal/lsp: use the go command to fix go.mod files 2020-10-28 22:47:54 +00:00
call_hierarchy.go internal/lsp/source: handle a possible nil pointer in call hierarchy 2020-10-09 16:22:40 +00:00
code_lens.go gopls: add "go test" code action 2020-10-13 16:52:01 +00:00
command.go internal/lsp: use the go command to fix go.mod files 2020-10-28 22:47:54 +00:00
comment.go internal/lsp/source: use space character in markdown formatting 2020-08-26 03:44:07 +00:00
comment_test.go internal/lsp: convert comments to markdown before sending to client 2019-10-04 18:35:38 +00:00
diagnostics.go internal/lsp: use the go command to fix go.mod files 2020-10-28 22:47:54 +00:00
extract.go internal/lsp: clean up unused parameters 2020-10-16 23:51:31 +00:00
folding_range.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
format.go internal/lsp: clean up unused parameters 2020-10-16 23:51:31 +00:00
format_test.go internal/lsp: reproduce and fix golang/go#41057 2020-09-02 22:40:51 +00:00
gc_annotations.go internal/lsp: elide details for non-package files 2020-10-30 01:04:31 +00:00
highlight.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
hover.go internal/lsp: clean up unused parameters 2020-10-16 23:51:31 +00:00
identifier.go internal/lsp: fix hover for builtin error method (Error) 2020-10-05 18:50:03 +00:00
identifier_test.go internal/lsp/source: add a unit test for searchForEnclosing 2020-07-28 18:51:24 +00:00
implementation.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
options.go internal/lsp/source: add missing vet analyzers 2020-10-29 19:53:23 +00:00
options_test.go internal/lsp: don't show an error for "allExperiments" in (options).set 2020-10-07 03:26:33 +00:00
references.go internal/lsp/source: show references to interface methods 2020-10-06 22:15:05 +00:00
rename.go internal/lsp: do not rename in compiler directive comments 2020-11-03 16:52:30 +00:00
rename_check.go internal/lsp/source: handle nil pointer in rename_check.go 2020-10-23 17:41:41 +00:00
signature_help.go internal/lsp/source: respect user's hover kind in signature help 2020-10-29 22:52:41 +00:00
source_test.go internal/lsp/cache: assign a static temp workspace dir to the first view 2020-11-04 18:18:50 +00:00
symbols.go internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
types_format.go internal/lsp/source: respect user's hover kind in signature help 2020-10-29 22:52:41 +00:00
util.go internal/lsp: fix the logic to avoid duplicate file watching 2020-11-03 19:00:53 +00:00
view.go internal/lsp/cache: assign a static temp workspace dir to the first view 2020-11-04 18:18:50 +00:00
workspace_symbol.go internal/lsp/source: use bestMatch for fully qualified symbol style 2020-10-30 14:32:52 +00:00
workspace_symbol_test.go internal/lsp/source: support some fzf-like tokens in symbol matching 2020-09-08 16:35:05 +00:00