gopls: migrate internal/lsp to gopls/internal/lsp
This CL was created using the following commands:
./gopls/internal/migrate.sh
git add .
git codereview gofmt
For golang/go#54509
Change-Id: Iceeec602748a5e6f609c3ceda8d19157e5c94009
Reviewed-on: https://go-review.googlesource.com/c/tools/+/426796
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/copyright/copyright.go b/copyright/copyright.go
index eb56ef2..db63c59 100644
--- a/copyright/copyright.go
+++ b/copyright/copyright.go
@@ -94,7 +94,7 @@
return shouldAddCopyright, nil
}
-// Copied from golang.org/x/tools/internal/lsp/source/util.go.
+// Copied from golang.org/x/tools/gopls/internal/lsp/source/util.go.
// Matches cgo generated comment as well as the proposed standard:
//
// https://golang.org/s/generatedcode
diff --git a/go/analysis/analysistest/analysistest.go b/go/analysis/analysistest/analysistest.go
index ea67807..1fd0a84 100644
--- a/go/analysis/analysistest/analysistest.go
+++ b/go/analysis/analysistest/analysistest.go
@@ -24,8 +24,8 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/internal/checker"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/txtar"
diff --git a/gopls/api-diff/api_diff.go b/gopls/api-diff/api_diff.go
index 167bdbd..8e6c09e 100644
--- a/gopls/api-diff/api_diff.go
+++ b/gopls/api-diff/api_diff.go
@@ -21,10 +21,10 @@
"path/filepath"
"strings"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ difflib "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
"golang.org/x/tools/internal/gocommand"
- difflib "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
- "golang.org/x/tools/internal/lsp/source"
)
var (
diff --git a/gopls/doc/contributing.md b/gopls/doc/contributing.md
index 99e4529..110aa1b 100644
--- a/gopls/doc/contributing.md
+++ b/gopls/doc/contributing.md
@@ -18,7 +18,7 @@
## Getting started
-Most of the `gopls` logic is actually in the `golang.org/x/tools/internal/lsp`
+Most of the `gopls` logic is actually in the `golang.org/x/tools/gopls/internal/lsp`
directory, so you are most likely to develop in the golang.org/x/tools module.
## Build
diff --git a/gopls/doc/design/integrating.md b/gopls/doc/design/integrating.md
index 845f9eb..7937ba8 100644
--- a/gopls/doc/design/integrating.md
+++ b/gopls/doc/design/integrating.md
@@ -61,8 +61,8 @@
Monitoring files inside gopls directly has a lot of awkward problems, but the [LSP specification] has methods that allow gopls to request that the client notify it of file system changes, specifically [`workspace/didChangeWatchedFiles`].
This is currently being added to gopls by a community member, and tracked in [#31553]
-[InitializeResult]: https://pkg.go.dev/golang.org/x/tools/internal/lsp/protocol#InitializeResult
-[ServerCapabilities]: https://pkg.go.dev/golang.org/x/tools/internal/lsp/protocol#ServerCapabilities
+[InitializeResult]: https://pkg.go.dev/golang.org/x/tools/gopls/internal/lsp/protocol#InitializeResult
+[ServerCapabilities]: https://pkg.go.dev/golang.org/x/tools/gopls/internal/lsp/protocol#ServerCapabilities
[`golang.org/x/tools/internal/span`]: https://pkg.go.dev/golang.org/x/tools/internal/span#NewPoint
[LSP specification]: https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/
diff --git a/gopls/doc/generate.go b/gopls/doc/generate.go
index 28e0444..449751e 100644
--- a/gopls/doc/generate.go
+++ b/gopls/doc/generate.go
@@ -33,10 +33,10 @@
"github.com/jba/printsrc"
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/command/commandmeta"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/command/commandmeta"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func main() {
@@ -52,7 +52,7 @@
return false, err
}
- sourceDir, err := pkgDir("golang.org/x/tools/internal/lsp/source")
+ sourceDir, err := pkgDir("golang.org/x/tools/gopls/internal/lsp/source")
if err != nil {
return false, err
}
@@ -96,7 +96,7 @@
&packages.Config{
Mode: packages.NeedTypes | packages.NeedTypesInfo | packages.NeedSyntax | packages.NeedDeps,
},
- "golang.org/x/tools/internal/lsp/source",
+ "golang.org/x/tools/gopls/internal/lsp/source",
)
if err != nil {
return nil, err
@@ -587,7 +587,7 @@
func rewriteAPI(_ []byte, api *source.APIJSON) ([]byte, error) {
var buf bytes.Buffer
fmt.Fprintf(&buf, "// Code generated by \"golang.org/x/tools/gopls/doc/generate\"; DO NOT EDIT.\n\npackage source\n\nvar GeneratedAPIJSON = ")
- if err := printsrc.NewPrinter("golang.org/x/tools/internal/lsp/source").Fprint(&buf, api); err != nil {
+ if err := printsrc.NewPrinter("golang.org/x/tools/gopls/internal/lsp/source").Fprint(&buf, api); err != nil {
return nil, err
}
return format.Source(buf.Bytes())
diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md
index 43dd54b..0412468 100644
--- a/gopls/doc/settings.md
+++ b/gopls/doc/settings.md
@@ -1,6 +1,6 @@
# Settings
-<!--TODO: Generate this file from the documentation in golang/org/x/tools/internal/lsp/source/options.go.-->
+<!--TODO: Generate this file from the documentation in golang.org/x/tools/gopls/internal/lsp/source/options.go.-->
This document describes the global settings for `gopls` inside the editor.
The settings block will be called `"gopls"` and contains a collection of
diff --git a/gopls/internal/coverage/coverage.go b/gopls/internal/coverage/coverage.go
index 7bb3640..1ceabef 100644
--- a/gopls/internal/coverage/coverage.go
+++ b/gopls/internal/coverage/coverage.go
@@ -12,9 +12,13 @@
// -o controls where the coverage file is written, defaulting to /tmp/cover.out
// -i coverage-file will generate the report from an existing coverage file
// -v controls verbosity (0: only report coverage, 1: report as each directory is finished,
-// 2: report on each test, 3: more details, 4: too much)
+//
+// 2: report on each test, 3: more details, 4: too much)
+//
// -t tests only tests packages in the given comma-separated list of directories in gopls.
-// The names should start with ., as in ./internal/regtest/bench
+//
+// The names should start with ., as in ./internal/regtest/bench
+//
// -run tests. If set, -run tests is passed on to the go test command.
//
// Despite gopls' use of goroutines, the counts are almost deterministic.
@@ -60,7 +64,7 @@
tests = realTestName(tests)
// report coverage for packages under internal/lsp
- parg := "golang.org/x/tools/internal/lsp/..."
+ parg := "golang.org/x/tools/gopls/internal/lsp/..."
accum := []string{}
seen := make(map[string]bool)
diff --git a/gopls/internal/hooks/analysis.go b/gopls/internal/hooks/analysis.go
index 5104899..27ab9a6 100644
--- a/gopls/internal/hooks/analysis.go
+++ b/gopls/internal/hooks/analysis.go
@@ -8,8 +8,8 @@
package hooks
import (
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"honnef.co/go/tools/analysis/lint"
"honnef.co/go/tools/quickfix"
"honnef.co/go/tools/simple"
diff --git a/gopls/internal/hooks/analysis_117.go b/gopls/internal/hooks/analysis_117.go
index 02f9170..dd429de 100644
--- a/gopls/internal/hooks/analysis_117.go
+++ b/gopls/internal/hooks/analysis_117.go
@@ -7,7 +7,7 @@
package hooks
-import "golang.org/x/tools/internal/lsp/source"
+import "golang.org/x/tools/gopls/internal/lsp/source"
func updateAnalyzers(options *source.Options) {
options.StaticcheckSupported = false
diff --git a/gopls/internal/hooks/diff.go b/gopls/internal/hooks/diff.go
index e0461a1..01a37ae 100644
--- a/gopls/internal/hooks/diff.go
+++ b/gopls/internal/hooks/diff.go
@@ -20,7 +20,7 @@
"unicode"
"github.com/sergi/go-diff/diffmatchpatch"
- "golang.org/x/tools/internal/lsp/diff"
+ "golang.org/x/tools/internal/diff"
"golang.org/x/tools/internal/span"
)
diff --git a/gopls/internal/hooks/diff_test.go b/gopls/internal/hooks/diff_test.go
index a9e5367..acc5d29 100644
--- a/gopls/internal/hooks/diff_test.go
+++ b/gopls/internal/hooks/diff_test.go
@@ -11,7 +11,7 @@
"testing"
"unicode/utf8"
- "golang.org/x/tools/internal/lsp/diff/difftest"
+ "golang.org/x/tools/internal/diff/difftest"
)
func TestDiff(t *testing.T) {
diff --git a/gopls/internal/hooks/hooks.go b/gopls/internal/hooks/hooks.go
index b55917e..9d497e9 100644
--- a/gopls/internal/hooks/hooks.go
+++ b/gopls/internal/hooks/hooks.go
@@ -10,9 +10,9 @@
import (
"context"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/gopls/internal/vulncheck"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
"mvdan.cc/gofumpt/format"
"mvdan.cc/xurls/v2"
)
diff --git a/internal/lsp/README.md b/gopls/internal/lsp/README.md
similarity index 100%
rename from internal/lsp/README.md
rename to gopls/internal/lsp/README.md
diff --git a/internal/lsp/analysis/embeddirective/embeddirective.go b/gopls/internal/lsp/analysis/embeddirective/embeddirective.go
similarity index 100%
rename from internal/lsp/analysis/embeddirective/embeddirective.go
rename to gopls/internal/lsp/analysis/embeddirective/embeddirective.go
diff --git a/internal/lsp/analysis/embeddirective/embeddirective_test.go b/gopls/internal/lsp/analysis/embeddirective/embeddirective_test.go
similarity index 100%
rename from internal/lsp/analysis/embeddirective/embeddirective_test.go
rename to gopls/internal/lsp/analysis/embeddirective/embeddirective_test.go
diff --git a/internal/lsp/analysis/embeddirective/testdata/src/a/a.go b/gopls/internal/lsp/analysis/embeddirective/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/embeddirective/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/embeddirective/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/embeddirective/testdata/src/a/b.go b/gopls/internal/lsp/analysis/embeddirective/testdata/src/a/b.go
similarity index 100%
rename from internal/lsp/analysis/embeddirective/testdata/src/a/b.go
rename to gopls/internal/lsp/analysis/embeddirective/testdata/src/a/b.go
diff --git a/internal/lsp/analysis/embeddirective/testdata/src/a/embedText b/gopls/internal/lsp/analysis/embeddirective/testdata/src/a/embedText
similarity index 100%
rename from internal/lsp/analysis/embeddirective/testdata/src/a/embedText
rename to gopls/internal/lsp/analysis/embeddirective/testdata/src/a/embedText
diff --git a/internal/lsp/analysis/fillreturns/fillreturns.go b/gopls/internal/lsp/analysis/fillreturns/fillreturns.go
similarity index 99%
rename from internal/lsp/analysis/fillreturns/fillreturns.go
rename to gopls/internal/lsp/analysis/fillreturns/fillreturns.go
index 8be83ad..d71defb 100644
--- a/internal/lsp/analysis/fillreturns/fillreturns.go
+++ b/gopls/internal/lsp/analysis/fillreturns/fillreturns.go
@@ -19,7 +19,7 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/analysisinternal"
- "golang.org/x/tools/internal/lsp/fuzzy"
+ "golang.org/x/tools/internal/fuzzy"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/fillreturns/fillreturns_test.go b/gopls/internal/lsp/analysis/fillreturns/fillreturns_test.go
similarity index 89%
rename from internal/lsp/analysis/fillreturns/fillreturns_test.go
rename to gopls/internal/lsp/analysis/fillreturns/fillreturns_test.go
index 7ef0d46..1f76275 100644
--- a/internal/lsp/analysis/fillreturns/fillreturns_test.go
+++ b/gopls/internal/lsp/analysis/fillreturns/fillreturns_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/fillreturns"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/fillreturns"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/fillreturns/testdata/src/a/a.go b/gopls/internal/lsp/analysis/fillreturns/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/fillreturns/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/fillreturns/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/fillreturns/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/fillreturns/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/fillreturns/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/fillreturns/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go b/gopls/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go
similarity index 100%
rename from internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go
rename to gopls/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go
diff --git a/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go.golden b/gopls/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go.golden
rename to gopls/internal/lsp/analysis/fillreturns/testdata/src/a/typeparams/a.go.golden
diff --git a/internal/lsp/analysis/fillstruct/fillstruct.go b/gopls/internal/lsp/analysis/fillstruct/fillstruct.go
similarity index 99%
rename from internal/lsp/analysis/fillstruct/fillstruct.go
rename to gopls/internal/lsp/analysis/fillstruct/fillstruct.go
index 2c0084f..aaa3075 100644
--- a/internal/lsp/analysis/fillstruct/fillstruct.go
+++ b/gopls/internal/lsp/analysis/fillstruct/fillstruct.go
@@ -21,7 +21,7 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/ast/inspector"
"golang.org/x/tools/internal/analysisinternal"
- "golang.org/x/tools/internal/lsp/fuzzy"
+ "golang.org/x/tools/internal/fuzzy"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/fillstruct/fillstruct_test.go b/gopls/internal/lsp/analysis/fillstruct/fillstruct_test.go
similarity index 89%
rename from internal/lsp/analysis/fillstruct/fillstruct_test.go
rename to gopls/internal/lsp/analysis/fillstruct/fillstruct_test.go
index 51a516c..66642b7 100644
--- a/internal/lsp/analysis/fillstruct/fillstruct_test.go
+++ b/gopls/internal/lsp/analysis/fillstruct/fillstruct_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/fillstruct"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/fillstruct"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/fillstruct/testdata/src/a/a.go b/gopls/internal/lsp/analysis/fillstruct/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/fillstruct/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/fillstruct/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/fillstruct/testdata/src/b/b.go b/gopls/internal/lsp/analysis/fillstruct/testdata/src/b/b.go
similarity index 100%
rename from internal/lsp/analysis/fillstruct/testdata/src/b/b.go
rename to gopls/internal/lsp/analysis/fillstruct/testdata/src/b/b.go
diff --git a/internal/lsp/analysis/fillstruct/testdata/src/typeparams/typeparams.go b/gopls/internal/lsp/analysis/fillstruct/testdata/src/typeparams/typeparams.go
similarity index 100%
rename from internal/lsp/analysis/fillstruct/testdata/src/typeparams/typeparams.go
rename to gopls/internal/lsp/analysis/fillstruct/testdata/src/typeparams/typeparams.go
diff --git a/internal/lsp/analysis/infertypeargs/infertypeargs.go b/gopls/internal/lsp/analysis/infertypeargs/infertypeargs.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/infertypeargs.go
rename to gopls/internal/lsp/analysis/infertypeargs/infertypeargs.go
diff --git a/internal/lsp/analysis/infertypeargs/infertypeargs_test.go b/gopls/internal/lsp/analysis/infertypeargs/infertypeargs_test.go
similarity index 89%
rename from internal/lsp/analysis/infertypeargs/infertypeargs_test.go
rename to gopls/internal/lsp/analysis/infertypeargs/infertypeargs_test.go
index 2957f46..2d687f0 100644
--- a/internal/lsp/analysis/infertypeargs/infertypeargs_test.go
+++ b/gopls/internal/lsp/analysis/infertypeargs/infertypeargs_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/infertypeargs"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/infertypeargs"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/infertypeargs/run_go117.go b/gopls/internal/lsp/analysis/infertypeargs/run_go117.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/run_go117.go
rename to gopls/internal/lsp/analysis/infertypeargs/run_go117.go
diff --git a/internal/lsp/analysis/infertypeargs/run_go118.go b/gopls/internal/lsp/analysis/infertypeargs/run_go118.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/run_go118.go
rename to gopls/internal/lsp/analysis/infertypeargs/run_go118.go
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go.golden b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go.golden
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go.golden
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/basic.go.golden
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go.golden b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go.golden
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go.golden
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported.go.golden
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/imported/imported.go b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported/imported.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/imported/imported.go
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/imported/imported.go
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go
diff --git a/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go.golden b/gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go.golden
similarity index 100%
rename from internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go.golden
rename to gopls/internal/lsp/analysis/infertypeargs/testdata/src/a/notypechange.go.golden
diff --git a/internal/lsp/analysis/nonewvars/nonewvars.go b/gopls/internal/lsp/analysis/nonewvars/nonewvars.go
similarity index 100%
rename from internal/lsp/analysis/nonewvars/nonewvars.go
rename to gopls/internal/lsp/analysis/nonewvars/nonewvars.go
diff --git a/internal/lsp/analysis/nonewvars/nonewvars_test.go b/gopls/internal/lsp/analysis/nonewvars/nonewvars_test.go
similarity index 89%
rename from internal/lsp/analysis/nonewvars/nonewvars_test.go
rename to gopls/internal/lsp/analysis/nonewvars/nonewvars_test.go
index dc58ab0..8f6f0a5 100644
--- a/internal/lsp/analysis/nonewvars/nonewvars_test.go
+++ b/gopls/internal/lsp/analysis/nonewvars/nonewvars_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/nonewvars"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/nonewvars"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/nonewvars/testdata/src/a/a.go b/gopls/internal/lsp/analysis/nonewvars/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/nonewvars/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/nonewvars/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/nonewvars/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/nonewvars/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/nonewvars/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/nonewvars/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go b/gopls/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go
similarity index 100%
rename from internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go
rename to gopls/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go
diff --git a/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go.golden b/gopls/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go.golden
rename to gopls/internal/lsp/analysis/nonewvars/testdata/src/typeparams/a.go.golden
diff --git a/internal/lsp/analysis/noresultvalues/noresultvalues.go b/gopls/internal/lsp/analysis/noresultvalues/noresultvalues.go
similarity index 100%
rename from internal/lsp/analysis/noresultvalues/noresultvalues.go
rename to gopls/internal/lsp/analysis/noresultvalues/noresultvalues.go
diff --git a/internal/lsp/analysis/noresultvalues/noresultvalues_test.go b/gopls/internal/lsp/analysis/noresultvalues/noresultvalues_test.go
similarity index 89%
rename from internal/lsp/analysis/noresultvalues/noresultvalues_test.go
rename to gopls/internal/lsp/analysis/noresultvalues/noresultvalues_test.go
index 12198a1..24ce392 100644
--- a/internal/lsp/analysis/noresultvalues/noresultvalues_test.go
+++ b/gopls/internal/lsp/analysis/noresultvalues/noresultvalues_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/noresultvalues"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/noresultvalues"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go b/gopls/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/noresultvalues/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/noresultvalues/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/noresultvalues/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go b/gopls/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go
similarity index 100%
rename from internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go
rename to gopls/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go
diff --git a/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go.golden b/gopls/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go.golden
rename to gopls/internal/lsp/analysis/noresultvalues/testdata/src/typeparams/a.go.golden
diff --git a/internal/lsp/analysis/simplifycompositelit/simplifycompositelit.go b/gopls/internal/lsp/analysis/simplifycompositelit/simplifycompositelit.go
similarity index 100%
rename from internal/lsp/analysis/simplifycompositelit/simplifycompositelit.go
rename to gopls/internal/lsp/analysis/simplifycompositelit/simplifycompositelit.go
diff --git a/internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go b/gopls/internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go
similarity index 85%
rename from internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go
rename to gopls/internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go
index e60f7d6..b0365a6 100644
--- a/internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go
+++ b/gopls/internal/lsp/analysis/simplifycompositelit/simplifycompositelit_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/simplifycompositelit"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifycompositelit"
)
func Test(t *testing.T) {
diff --git a/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go b/gopls/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/simplifycompositelit/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/simplifyrange/simplifyrange.go b/gopls/internal/lsp/analysis/simplifyrange/simplifyrange.go
similarity index 100%
rename from internal/lsp/analysis/simplifyrange/simplifyrange.go
rename to gopls/internal/lsp/analysis/simplifyrange/simplifyrange.go
diff --git a/internal/lsp/analysis/simplifyrange/simplifyrange_test.go b/gopls/internal/lsp/analysis/simplifyrange/simplifyrange_test.go
similarity index 86%
rename from internal/lsp/analysis/simplifyrange/simplifyrange_test.go
rename to gopls/internal/lsp/analysis/simplifyrange/simplifyrange_test.go
index ecc7a96..fbd57ec 100644
--- a/internal/lsp/analysis/simplifyrange/simplifyrange_test.go
+++ b/gopls/internal/lsp/analysis/simplifyrange/simplifyrange_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/simplifyrange"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifyrange"
)
func Test(t *testing.T) {
diff --git a/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go b/gopls/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/simplifyrange/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/simplifyrange/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/simplifyrange/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/simplifyslice/simplifyslice.go b/gopls/internal/lsp/analysis/simplifyslice/simplifyslice.go
similarity index 100%
rename from internal/lsp/analysis/simplifyslice/simplifyslice.go
rename to gopls/internal/lsp/analysis/simplifyslice/simplifyslice.go
diff --git a/internal/lsp/analysis/simplifyslice/simplifyslice_test.go b/gopls/internal/lsp/analysis/simplifyslice/simplifyslice_test.go
similarity index 89%
rename from internal/lsp/analysis/simplifyslice/simplifyslice_test.go
rename to gopls/internal/lsp/analysis/simplifyslice/simplifyslice_test.go
index cff6267..41914ba 100644
--- a/internal/lsp/analysis/simplifyslice/simplifyslice_test.go
+++ b/gopls/internal/lsp/analysis/simplifyslice/simplifyslice_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/simplifyslice"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifyslice"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go b/gopls/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/simplifyslice/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/simplifyslice/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/simplifyslice/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go b/gopls/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go
similarity index 100%
rename from internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go
rename to gopls/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go
diff --git a/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go.golden b/gopls/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go.golden
similarity index 100%
rename from internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go.golden
rename to gopls/internal/lsp/analysis/simplifyslice/testdata/src/typeparams/typeparams.go.golden
diff --git a/internal/lsp/analysis/stubmethods/stubmethods.go b/gopls/internal/lsp/analysis/stubmethods/stubmethods.go
similarity index 100%
rename from internal/lsp/analysis/stubmethods/stubmethods.go
rename to gopls/internal/lsp/analysis/stubmethods/stubmethods.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/a.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/channels.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/channels.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/channels.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/channels.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/consecutive_params.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/consecutive_params.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/consecutive_params.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/consecutive_params.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/error_param.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/error_param.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/error_param.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/error_param.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/literals.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/literals.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/literals.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/literals.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/operation.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/operation.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/operation.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/operation.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/selector.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/selector.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/selector.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/selector.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/slice.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/slice.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/slice.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/slice.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/tuple.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/tuple.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/tuple.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/tuple.go
diff --git a/internal/lsp/analysis/undeclaredname/testdata/src/a/unique_params.go b/gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/unique_params.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/testdata/src/a/unique_params.go
rename to gopls/internal/lsp/analysis/undeclaredname/testdata/src/a/unique_params.go
diff --git a/internal/lsp/analysis/undeclaredname/undeclared.go b/gopls/internal/lsp/analysis/undeclaredname/undeclared.go
similarity index 100%
rename from internal/lsp/analysis/undeclaredname/undeclared.go
rename to gopls/internal/lsp/analysis/undeclaredname/undeclared.go
diff --git a/internal/lsp/analysis/undeclaredname/undeclared_test.go b/gopls/internal/lsp/analysis/undeclaredname/undeclared_test.go
similarity index 85%
rename from internal/lsp/analysis/undeclaredname/undeclared_test.go
rename to gopls/internal/lsp/analysis/undeclaredname/undeclared_test.go
index b715439..306c3f0 100644
--- a/internal/lsp/analysis/undeclaredname/undeclared_test.go
+++ b/gopls/internal/lsp/analysis/undeclaredname/undeclared_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/undeclaredname"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/undeclaredname"
)
func Test(t *testing.T) {
diff --git a/internal/lsp/analysis/unusedparams/testdata/src/a/a.go b/gopls/internal/lsp/analysis/unusedparams/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/unusedparams/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/unusedparams/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/unusedparams/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/unusedparams/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/unusedparams/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/unusedparams/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go b/gopls/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go
similarity index 100%
rename from internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go
rename to gopls/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go
diff --git a/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go.golden b/gopls/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go.golden
similarity index 100%
rename from internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go.golden
rename to gopls/internal/lsp/analysis/unusedparams/testdata/src/typeparams/typeparams.go.golden
diff --git a/internal/lsp/analysis/unusedparams/unusedparams.go b/gopls/internal/lsp/analysis/unusedparams/unusedparams.go
similarity index 100%
rename from internal/lsp/analysis/unusedparams/unusedparams.go
rename to gopls/internal/lsp/analysis/unusedparams/unusedparams.go
diff --git a/internal/lsp/analysis/unusedparams/unusedparams_test.go b/gopls/internal/lsp/analysis/unusedparams/unusedparams_test.go
similarity index 89%
rename from internal/lsp/analysis/unusedparams/unusedparams_test.go
rename to gopls/internal/lsp/analysis/unusedparams/unusedparams_test.go
index dff17c9..fdd43b8 100644
--- a/internal/lsp/analysis/unusedparams/unusedparams_test.go
+++ b/gopls/internal/lsp/analysis/unusedparams/unusedparams_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/unusedparams"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/unusedparams"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go b/gopls/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go
similarity index 100%
rename from internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go
rename to gopls/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go
diff --git a/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go.golden b/gopls/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go.golden
rename to gopls/internal/lsp/analysis/unusedvariable/testdata/src/assign/a.go.golden
diff --git a/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go b/gopls/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go
similarity index 100%
rename from internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go
rename to gopls/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go
diff --git a/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go.golden b/gopls/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go.golden
rename to gopls/internal/lsp/analysis/unusedvariable/testdata/src/decl/a.go.golden
diff --git a/internal/lsp/analysis/unusedvariable/unusedvariable.go b/gopls/internal/lsp/analysis/unusedvariable/unusedvariable.go
similarity index 100%
rename from internal/lsp/analysis/unusedvariable/unusedvariable.go
rename to gopls/internal/lsp/analysis/unusedvariable/unusedvariable.go
diff --git a/internal/lsp/analysis/unusedvariable/unusedvariable_test.go b/gopls/internal/lsp/analysis/unusedvariable/unusedvariable_test.go
similarity index 89%
rename from internal/lsp/analysis/unusedvariable/unusedvariable_test.go
rename to gopls/internal/lsp/analysis/unusedvariable/unusedvariable_test.go
index e6d7c02..0822315 100644
--- a/internal/lsp/analysis/unusedvariable/unusedvariable_test.go
+++ b/gopls/internal/lsp/analysis/unusedvariable/unusedvariable_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/unusedvariable"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/unusedvariable"
)
func Test(t *testing.T) {
diff --git a/internal/lsp/analysis/useany/testdata/src/a/a.go b/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go
similarity index 100%
rename from internal/lsp/analysis/useany/testdata/src/a/a.go
rename to gopls/internal/lsp/analysis/useany/testdata/src/a/a.go
diff --git a/internal/lsp/analysis/useany/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
similarity index 100%
rename from internal/lsp/analysis/useany/testdata/src/a/a.go.golden
rename to gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
diff --git a/internal/lsp/analysis/useany/useany.go b/gopls/internal/lsp/analysis/useany/useany.go
similarity index 100%
rename from internal/lsp/analysis/useany/useany.go
rename to gopls/internal/lsp/analysis/useany/useany.go
diff --git a/internal/lsp/analysis/useany/useany_test.go b/gopls/internal/lsp/analysis/useany/useany_test.go
similarity index 89%
rename from internal/lsp/analysis/useany/useany_test.go
rename to gopls/internal/lsp/analysis/useany/useany_test.go
index 535d915..083c3d5 100644
--- a/internal/lsp/analysis/useany/useany_test.go
+++ b/gopls/internal/lsp/analysis/useany/useany_test.go
@@ -8,7 +8,7 @@
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "golang.org/x/tools/internal/lsp/analysis/useany"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/useany"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/browser/README.md b/gopls/internal/lsp/browser/README.md
similarity index 100%
rename from internal/lsp/browser/README.md
rename to gopls/internal/lsp/browser/README.md
diff --git a/internal/lsp/browser/browser.go b/gopls/internal/lsp/browser/browser.go
similarity index 100%
rename from internal/lsp/browser/browser.go
rename to gopls/internal/lsp/browser/browser.go
diff --git a/internal/lsp/cache/analysis.go b/gopls/internal/lsp/cache/analysis.go
similarity index 99%
rename from internal/lsp/cache/analysis.go
rename to gopls/internal/lsp/cache/analysis.go
index 144ef3c..0b5ce89 100644
--- a/internal/lsp/cache/analysis.go
+++ b/gopls/internal/lsp/cache/analysis.go
@@ -16,8 +16,8 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/internal/analysisinternal"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/cache.go b/gopls/internal/lsp/cache/cache.go
similarity index 98%
rename from internal/lsp/cache/cache.go
rename to gopls/internal/lsp/cache/cache.go
index eea3021..5056111 100644
--- a/internal/lsp/cache/cache.go
+++ b/gopls/internal/lsp/cache/cache.go
@@ -22,8 +22,8 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/check.go b/gopls/internal/lsp/cache/check.go
similarity index 99%
rename from internal/lsp/cache/check.go
rename to gopls/internal/lsp/cache/check.go
index 6beee1f..1fbd9c0 100644
--- a/internal/lsp/cache/check.go
+++ b/gopls/internal/lsp/cache/check.go
@@ -22,10 +22,10 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/packagesinternal"
"golang.org/x/tools/internal/span"
diff --git a/internal/lsp/cache/debug.go b/gopls/internal/lsp/cache/debug.go
similarity index 100%
rename from internal/lsp/cache/debug.go
rename to gopls/internal/lsp/cache/debug.go
diff --git a/internal/lsp/cache/error_test.go b/gopls/internal/lsp/cache/error_test.go
similarity index 100%
rename from internal/lsp/cache/error_test.go
rename to gopls/internal/lsp/cache/error_test.go
diff --git a/internal/lsp/cache/errors.go b/gopls/internal/lsp/cache/errors.go
similarity index 98%
rename from internal/lsp/cache/errors.go
rename to gopls/internal/lsp/cache/errors.go
index 9437829..d01bf7f 100644
--- a/internal/lsp/cache/errors.go
+++ b/gopls/internal/lsp/cache/errors.go
@@ -16,10 +16,10 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/internal/analysisinternal"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typesinternal"
)
diff --git a/internal/lsp/cache/graph.go b/gopls/internal/lsp/cache/graph.go
similarity index 98%
rename from internal/lsp/cache/graph.go
rename to gopls/internal/lsp/cache/graph.go
index d0f80cc..f90ee96 100644
--- a/internal/lsp/cache/graph.go
+++ b/gopls/internal/lsp/cache/graph.go
@@ -7,7 +7,7 @@
import (
"sort"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/imports.go b/gopls/internal/lsp/cache/imports.go
similarity index 99%
rename from internal/lsp/cache/imports.go
rename to gopls/internal/lsp/cache/imports.go
index 6510bbd..a73f9be 100644
--- a/internal/lsp/cache/imports.go
+++ b/gopls/internal/lsp/cache/imports.go
@@ -17,7 +17,7 @@
"golang.org/x/tools/internal/event/keys"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
type importsState struct {
diff --git a/internal/lsp/cache/keys.go b/gopls/internal/lsp/cache/keys.go
similarity index 100%
rename from internal/lsp/cache/keys.go
rename to gopls/internal/lsp/cache/keys.go
diff --git a/internal/lsp/cache/load.go b/gopls/internal/lsp/cache/load.go
similarity index 99%
rename from internal/lsp/cache/load.go
rename to gopls/internal/lsp/cache/load.go
index 2bc9277..2bf4a33 100644
--- a/internal/lsp/cache/load.go
+++ b/gopls/internal/lsp/cache/load.go
@@ -19,9 +19,9 @@
"golang.org/x/tools/go/packages"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/packagesinternal"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/maps.go b/gopls/internal/lsp/cache/maps.go
similarity index 98%
rename from internal/lsp/cache/maps.go
rename to gopls/internal/lsp/cache/maps.go
index eef9188..0493398 100644
--- a/internal/lsp/cache/maps.go
+++ b/gopls/internal/lsp/cache/maps.go
@@ -5,7 +5,7 @@
package cache
import (
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/persistent"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/metadata.go b/gopls/internal/lsp/cache/metadata.go
similarity index 76%
rename from internal/lsp/cache/metadata.go
rename to gopls/internal/lsp/cache/metadata.go
index 668d082..711508c 100644
--- a/internal/lsp/cache/metadata.go
+++ b/gopls/internal/lsp/cache/metadata.go
@@ -42,23 +42,23 @@
// IsIntermediateTestVariant reports whether the given package is an
// intermediate test variant, e.g.
- // "golang.org/x/tools/internal/lsp/cache [golang.org/x/tools/internal/lsp/source.test]".
+ // "golang.org/x/tools/gopls/internal/lsp/cache [golang.org/x/tools/gopls/internal/lsp/source.test]".
//
// Such test variants arise when an x_test package (in this case source_test)
// imports a package (in this case cache) that itself imports the the
// non-x_test package (in this case source).
//
// This is done so that the forward transitive closure of source_test has
- // only one package for the "golang.org/x/tools/internal/lsp/source" import.
+ // only one package for the "golang.org/x/tools/gopls/internal/lsp/source" import.
// The intermediate test variant exists to hold the test variant import:
//
- // golang.org/x/tools/internal/lsp/source_test [golang.org/x/tools/internal/lsp/source.test]
- // | "golang.org/x/tools/internal/lsp/cache" -> golang.org/x/tools/internal/lsp/cache [golang.org/x/tools/internal/lsp/source.test]
- // | "golang.org/x/tools/internal/lsp/source" -> golang.org/x/tools/internal/lsp/source [golang.org/x/tools/internal/lsp/source.test]
+ // golang.org/x/tools/gopls/internal/lsp/source_test [golang.org/x/tools/gopls/internal/lsp/source.test]
+ // | "golang.org/x/tools/gopls/internal/lsp/cache" -> golang.org/x/tools/gopls/internal/lsp/cache [golang.org/x/tools/gopls/internal/lsp/source.test]
+ // | "golang.org/x/tools/gopls/internal/lsp/source" -> golang.org/x/tools/gopls/internal/lsp/source [golang.org/x/tools/gopls/internal/lsp/source.test]
// | ...
//
- // golang.org/x/tools/internal/lsp/cache [golang.org/x/tools/internal/lsp/source.test]
- // | "golang.org/x/tools/internal/lsp/source" -> golang.org/x/tools/internal/lsp/source [golang.org/x/tools/internal/lsp/source.test]
+ // golang.org/x/tools/gopls/internal/lsp/cache [golang.org/x/tools/gopls/internal/lsp/source.test]
+ // | "golang.org/x/tools/gopls/internal/lsp/source" -> golang.org/x/tools/gopls/internal/lsp/source [golang.org/x/tools/gopls/internal/lsp/source.test]
// | ...
//
// We filter these variants out in certain places. For example, there is
diff --git a/internal/lsp/cache/mod.go b/gopls/internal/lsp/cache/mod.go
similarity index 98%
rename from internal/lsp/cache/mod.go
rename to gopls/internal/lsp/cache/mod.go
index 57fa1e2..50fa0a4 100644
--- a/internal/lsp/cache/mod.go
+++ b/gopls/internal/lsp/cache/mod.go
@@ -16,10 +16,10 @@
"golang.org/x/mod/module"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/mod_tidy.go b/gopls/internal/lsp/cache/mod_tidy.go
similarity index 98%
rename from internal/lsp/cache/mod_tidy.go
rename to gopls/internal/lsp/cache/mod_tidy.go
index 704e1a6..1bbc623 100644
--- a/internal/lsp/cache/mod_tidy.go
+++ b/gopls/internal/lsp/cache/mod_tidy.go
@@ -18,11 +18,11 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/os_darwin.go b/gopls/internal/lsp/cache/os_darwin.go
similarity index 100%
rename from internal/lsp/cache/os_darwin.go
rename to gopls/internal/lsp/cache/os_darwin.go
diff --git a/internal/lsp/cache/os_windows.go b/gopls/internal/lsp/cache/os_windows.go
similarity index 100%
rename from internal/lsp/cache/os_windows.go
rename to gopls/internal/lsp/cache/os_windows.go
diff --git a/internal/lsp/cache/parse.go b/gopls/internal/lsp/cache/parse.go
similarity index 98%
rename from internal/lsp/cache/parse.go
rename to gopls/internal/lsp/cache/parse.go
index 77e893a..5cb5ef7 100644
--- a/internal/lsp/cache/parse.go
+++ b/gopls/internal/lsp/cache/parse.go
@@ -19,12 +19,12 @@
"strings"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
)
diff --git a/internal/lsp/cache/parse_test.go b/gopls/internal/lsp/cache/parse_test.go
similarity index 100%
rename from internal/lsp/cache/parse_test.go
rename to gopls/internal/lsp/cache/parse_test.go
diff --git a/internal/lsp/cache/parsemode_go116.go b/gopls/internal/lsp/cache/parsemode_go116.go
similarity index 100%
rename from internal/lsp/cache/parsemode_go116.go
rename to gopls/internal/lsp/cache/parsemode_go116.go
diff --git a/internal/lsp/cache/parsemode_go117.go b/gopls/internal/lsp/cache/parsemode_go117.go
similarity index 100%
rename from internal/lsp/cache/parsemode_go117.go
rename to gopls/internal/lsp/cache/parsemode_go117.go
diff --git a/internal/lsp/cache/pkg.go b/gopls/internal/lsp/cache/pkg.go
similarity index 98%
rename from internal/lsp/cache/pkg.go
rename to gopls/internal/lsp/cache/pkg.go
index 3478c58..b1ee50e 100644
--- a/internal/lsp/cache/pkg.go
+++ b/gopls/internal/lsp/cache/pkg.go
@@ -11,7 +11,7 @@
"go/types"
"golang.org/x/mod/module"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/session.go b/gopls/internal/lsp/cache/session.go
similarity index 99%
rename from internal/lsp/cache/session.go
rename to gopls/internal/lsp/cache/session.go
index 32fd448..5931813 100644
--- a/internal/lsp/cache/session.go
+++ b/gopls/internal/lsp/cache/session.go
@@ -16,8 +16,8 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/progress"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/progress"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/persistent"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
diff --git a/internal/lsp/cache/snapshot.go b/gopls/internal/lsp/cache/snapshot.go
similarity index 99%
rename from internal/lsp/cache/snapshot.go
rename to gopls/internal/lsp/cache/snapshot.go
index 87ef595..aa088bb 100644
--- a/internal/lsp/cache/snapshot.go
+++ b/gopls/internal/lsp/cache/snapshot.go
@@ -33,9 +33,9 @@
"golang.org/x/tools/go/packages"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/packagesinternal"
"golang.org/x/tools/internal/persistent"
diff --git a/internal/lsp/cache/symbols.go b/gopls/internal/lsp/cache/symbols.go
similarity index 97%
rename from internal/lsp/cache/symbols.go
rename to gopls/internal/lsp/cache/symbols.go
index e98f554..69b2b04 100644
--- a/internal/lsp/cache/symbols.go
+++ b/gopls/internal/lsp/cache/symbols.go
@@ -12,9 +12,9 @@
"go/types"
"strings"
- "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
)
diff --git a/internal/lsp/cache/view.go b/gopls/internal/lsp/cache/view.go
similarity index 99%
rename from internal/lsp/cache/view.go
rename to gopls/internal/lsp/cache/view.go
index 6eec353..cc88c3d 100644
--- a/internal/lsp/cache/view.go
+++ b/gopls/internal/lsp/cache/view.go
@@ -27,9 +27,9 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/cache/view_test.go b/gopls/internal/lsp/cache/view_test.go
similarity index 97%
rename from internal/lsp/cache/view_test.go
rename to gopls/internal/lsp/cache/view_test.go
index 59684ea..f3851e9 100644
--- a/internal/lsp/cache/view_test.go
+++ b/gopls/internal/lsp/cache/view_test.go
@@ -10,8 +10,8 @@
"path/filepath"
"testing"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cache/workspace.go b/gopls/internal/lsp/cache/workspace.go
similarity index 99%
rename from internal/lsp/cache/workspace.go
rename to gopls/internal/lsp/cache/workspace.go
index f04fbe8..e066c7e 100644
--- a/internal/lsp/cache/workspace.go
+++ b/gopls/internal/lsp/cache/workspace.go
@@ -16,7 +16,7 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/cache/workspace_test.go b/gopls/internal/lsp/cache/workspace_test.go
similarity index 98%
rename from internal/lsp/cache/workspace_test.go
rename to gopls/internal/lsp/cache/workspace_test.go
index f1cd00b..e6047a9 100644
--- a/internal/lsp/cache/workspace_test.go
+++ b/gopls/internal/lsp/cache/workspace_test.go
@@ -12,8 +12,8 @@
"testing"
"golang.org/x/mod/modfile"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/call_hierarchy.go b/gopls/internal/lsp/call_hierarchy.go
similarity index 92%
rename from internal/lsp/call_hierarchy.go
rename to gopls/internal/lsp/call_hierarchy.go
index 43c4ea8..79eeb25 100644
--- a/internal/lsp/call_hierarchy.go
+++ b/gopls/internal/lsp/call_hierarchy.go
@@ -7,8 +7,8 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) prepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) ([]protocol.CallHierarchyItem, error) {
diff --git a/internal/lsp/cmd/call_hierarchy.go b/gopls/internal/lsp/cmd/call_hierarchy.go
similarity index 98%
rename from internal/lsp/cmd/call_hierarchy.go
rename to gopls/internal/lsp/cmd/call_hierarchy.go
index c9f9e73..643b2f7 100644
--- a/internal/lsp/cmd/call_hierarchy.go
+++ b/gopls/internal/lsp/cmd/call_hierarchy.go
@@ -10,7 +10,7 @@
"fmt"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/capabilities_test.go b/gopls/internal/lsp/cmd/capabilities_test.go
similarity index 97%
rename from internal/lsp/cmd/capabilities_test.go
rename to gopls/internal/lsp/cmd/capabilities_test.go
index 930621b..bd20963 100644
--- a/internal/lsp/cmd/capabilities_test.go
+++ b/gopls/internal/lsp/cmd/capabilities_test.go
@@ -12,9 +12,9 @@
"path/filepath"
"testing"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// TestCapabilities does some minimal validation of the server's adherence to the LSP.
diff --git a/internal/lsp/cmd/check.go b/gopls/internal/lsp/cmd/check.go
similarity index 100%
rename from internal/lsp/cmd/check.go
rename to gopls/internal/lsp/cmd/check.go
diff --git a/internal/lsp/cmd/cmd.go b/gopls/internal/lsp/cmd/cmd.go
similarity index 98%
rename from internal/lsp/cmd/cmd.go
rename to gopls/internal/lsp/cmd/cmd.go
index 5911f97..254313a 100644
--- a/internal/lsp/cmd/cmd.go
+++ b/gopls/internal/lsp/cmd/cmd.go
@@ -23,12 +23,12 @@
"time"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/lsprpc"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
"golang.org/x/tools/internal/xcontext"
diff --git a/internal/lsp/cmd/cmd_test.go b/gopls/internal/lsp/cmd/cmd_test.go
similarity index 76%
rename from internal/lsp/cmd/cmd_test.go
rename to gopls/internal/lsp/cmd/cmd_test.go
index c44bd57..877ceb6 100644
--- a/internal/lsp/cmd/cmd_test.go
+++ b/gopls/internal/lsp/cmd/cmd_test.go
@@ -8,9 +8,9 @@
"os"
"testing"
- "golang.org/x/tools/internal/lsp/bug"
- cmdtest "golang.org/x/tools/internal/lsp/cmd/test"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/internal/bug"
+ cmdtest "golang.org/x/tools/gopls/internal/lsp/cmd/test"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/cmd/definition.go b/gopls/internal/lsp/cmd/definition.go
similarity index 97%
rename from internal/lsp/cmd/definition.go
rename to gopls/internal/lsp/cmd/definition.go
index 44e6fc8..3c4474a 100644
--- a/internal/lsp/cmd/definition.go
+++ b/gopls/internal/lsp/cmd/definition.go
@@ -12,8 +12,8 @@
"os"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/export_test.go b/gopls/internal/lsp/cmd/export_test.go
similarity index 100%
rename from internal/lsp/cmd/export_test.go
rename to gopls/internal/lsp/cmd/export_test.go
diff --git a/internal/lsp/cmd/folding_range.go b/gopls/internal/lsp/cmd/folding_range.go
similarity index 96%
rename from internal/lsp/cmd/folding_range.go
rename to gopls/internal/lsp/cmd/folding_range.go
index 513c9bd..ee40715 100644
--- a/internal/lsp/cmd/folding_range.go
+++ b/gopls/internal/lsp/cmd/folding_range.go
@@ -9,7 +9,7 @@
"flag"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/format.go b/gopls/internal/lsp/cmd/format.go
similarity index 94%
rename from internal/lsp/cmd/format.go
rename to gopls/internal/lsp/cmd/format.go
index 5e17ed4..4098506 100644
--- a/internal/lsp/cmd/format.go
+++ b/gopls/internal/lsp/cmd/format.go
@@ -10,9 +10,9 @@
"fmt"
"io/ioutil"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/help_test.go b/gopls/internal/lsp/cmd/help_test.go
similarity index 96%
rename from internal/lsp/cmd/help_test.go
rename to gopls/internal/lsp/cmd/help_test.go
index 536d19d..f8d9b0b 100644
--- a/internal/lsp/cmd/help_test.go
+++ b/gopls/internal/lsp/cmd/help_test.go
@@ -12,7 +12,7 @@
"path/filepath"
"testing"
- "golang.org/x/tools/internal/lsp/cmd"
+ "golang.org/x/tools/gopls/internal/lsp/cmd"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/highlight.go b/gopls/internal/lsp/cmd/highlight.go
similarity index 97%
rename from internal/lsp/cmd/highlight.go
rename to gopls/internal/lsp/cmd/highlight.go
index a325a2d..ace8125 100644
--- a/internal/lsp/cmd/highlight.go
+++ b/gopls/internal/lsp/cmd/highlight.go
@@ -10,7 +10,7 @@
"fmt"
"sort"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/implementation.go b/gopls/internal/lsp/cmd/implementation.go
similarity index 97%
rename from internal/lsp/cmd/implementation.go
rename to gopls/internal/lsp/cmd/implementation.go
index 7b42d99..073a61a 100644
--- a/internal/lsp/cmd/implementation.go
+++ b/gopls/internal/lsp/cmd/implementation.go
@@ -10,7 +10,7 @@
"fmt"
"sort"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/imports.go b/gopls/internal/lsp/cmd/imports.go
similarity index 95%
rename from internal/lsp/cmd/imports.go
rename to gopls/internal/lsp/cmd/imports.go
index 8f12a94..d6a968d 100644
--- a/internal/lsp/cmd/imports.go
+++ b/gopls/internal/lsp/cmd/imports.go
@@ -10,9 +10,9 @@
"fmt"
"io/ioutil"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/info.go b/gopls/internal/lsp/cmd/info.go
similarity index 97%
rename from internal/lsp/cmd/info.go
rename to gopls/internal/lsp/cmd/info.go
index 8e581a3..68ef40f 100644
--- a/internal/lsp/cmd/info.go
+++ b/gopls/internal/lsp/cmd/info.go
@@ -14,9 +14,9 @@
"os"
"strings"
- "golang.org/x/tools/internal/lsp/browser"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/browser"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/links.go b/gopls/internal/lsp/cmd/links.go
similarity index 97%
rename from internal/lsp/cmd/links.go
rename to gopls/internal/lsp/cmd/links.go
index 1c48c8c..d63ac21 100644
--- a/internal/lsp/cmd/links.go
+++ b/gopls/internal/lsp/cmd/links.go
@@ -11,7 +11,7 @@
"fmt"
"os"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/prepare_rename.go b/gopls/internal/lsp/cmd/prepare_rename.go
similarity index 97%
rename from internal/lsp/cmd/prepare_rename.go
rename to gopls/internal/lsp/cmd/prepare_rename.go
index 44a192b..7dfac9b 100644
--- a/internal/lsp/cmd/prepare_rename.go
+++ b/gopls/internal/lsp/cmd/prepare_rename.go
@@ -10,7 +10,7 @@
"flag"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/references.go b/gopls/internal/lsp/cmd/references.go
similarity index 97%
rename from internal/lsp/cmd/references.go
rename to gopls/internal/lsp/cmd/references.go
index 0697d2e..13c30bd 100644
--- a/internal/lsp/cmd/references.go
+++ b/gopls/internal/lsp/cmd/references.go
@@ -10,7 +10,7 @@
"fmt"
"sort"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/remote.go b/gopls/internal/lsp/cmd/remote.go
similarity index 97%
rename from internal/lsp/cmd/remote.go
rename to gopls/internal/lsp/cmd/remote.go
index 0f4c721..684981c 100644
--- a/internal/lsp/cmd/remote.go
+++ b/gopls/internal/lsp/cmd/remote.go
@@ -13,8 +13,8 @@
"log"
"os"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/lsprpc"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
)
type remote struct {
diff --git a/internal/lsp/cmd/rename.go b/gopls/internal/lsp/cmd/rename.go
similarity index 96%
rename from internal/lsp/cmd/rename.go
rename to gopls/internal/lsp/cmd/rename.go
index be7fd09..eb7e10a 100644
--- a/internal/lsp/cmd/rename.go
+++ b/gopls/internal/lsp/cmd/rename.go
@@ -13,9 +13,9 @@
"path/filepath"
"sort"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/semantictokens.go b/gopls/internal/lsp/cmd/semantictokens.go
similarity index 97%
rename from internal/lsp/cmd/semantictokens.go
rename to gopls/internal/lsp/cmd/semantictokens.go
index 7dbb7f9..547b019 100644
--- a/internal/lsp/cmd/semantictokens.go
+++ b/gopls/internal/lsp/cmd/semantictokens.go
@@ -16,9 +16,9 @@
"os"
"unicode/utf8"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/serve.go b/gopls/internal/lsp/cmd/serve.go
similarity index 95%
rename from internal/lsp/cmd/serve.go
rename to gopls/internal/lsp/cmd/serve.go
index 10730fd..8a4de5e 100644
--- a/internal/lsp/cmd/serve.go
+++ b/gopls/internal/lsp/cmd/serve.go
@@ -16,10 +16,10 @@
"golang.org/x/tools/internal/fakenet"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/lsprpc"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/signature.go b/gopls/internal/lsp/cmd/signature.go
similarity index 97%
rename from internal/lsp/cmd/signature.go
rename to gopls/internal/lsp/cmd/signature.go
index db94843..81ec4fe 100644
--- a/internal/lsp/cmd/signature.go
+++ b/gopls/internal/lsp/cmd/signature.go
@@ -9,7 +9,7 @@
"flag"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/subcommands.go b/gopls/internal/lsp/cmd/subcommands.go
similarity index 100%
rename from internal/lsp/cmd/subcommands.go
rename to gopls/internal/lsp/cmd/subcommands.go
diff --git a/internal/lsp/cmd/suggested_fix.go b/gopls/internal/lsp/cmd/suggested_fix.go
similarity index 96%
rename from internal/lsp/cmd/suggested_fix.go
rename to gopls/internal/lsp/cmd/suggested_fix.go
index a3e5132..048dcd6 100644
--- a/internal/lsp/cmd/suggested_fix.go
+++ b/gopls/internal/lsp/cmd/suggested_fix.go
@@ -10,9 +10,9 @@
"fmt"
"io/ioutil"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/symbols.go b/gopls/internal/lsp/cmd/symbols.go
similarity index 97%
rename from internal/lsp/cmd/symbols.go
rename to gopls/internal/lsp/cmd/symbols.go
index b43a6dc..0d6e4db 100644
--- a/internal/lsp/cmd/symbols.go
+++ b/gopls/internal/lsp/cmd/symbols.go
@@ -11,7 +11,7 @@
"fmt"
"sort"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/test/call_hierarchy.go b/gopls/internal/lsp/cmd/test/call_hierarchy.go
similarity index 96%
rename from internal/lsp/cmd/test/call_hierarchy.go
rename to gopls/internal/lsp/cmd/test/call_hierarchy.go
index 38f8ed7..be4ebe8 100644
--- a/internal/lsp/cmd/test/call_hierarchy.go
+++ b/gopls/internal/lsp/cmd/test/call_hierarchy.go
@@ -10,8 +10,8 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/check.go b/gopls/internal/lsp/cmd/test/check.go
similarity index 91%
rename from internal/lsp/cmd/test/check.go
rename to gopls/internal/lsp/cmd/test/check.go
index ac1eac4..4f5e471 100644
--- a/internal/lsp/cmd/test/check.go
+++ b/gopls/internal/lsp/cmd/test/check.go
@@ -9,9 +9,9 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/cmdtest.go b/gopls/internal/lsp/cmd/test/cmdtest.go
similarity index 93%
rename from internal/lsp/cmd/test/cmdtest.go
rename to gopls/internal/lsp/cmd/test/cmdtest.go
index 5342e9b..86608c7 100644
--- a/internal/lsp/cmd/test/cmdtest.go
+++ b/gopls/internal/lsp/cmd/test/cmdtest.go
@@ -16,13 +16,13 @@
"testing"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/cmd"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/lsprpc"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/cmd"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/cmd/test/definition.go b/gopls/internal/lsp/cmd/test/definition.go
similarity index 96%
rename from internal/lsp/cmd/test/definition.go
rename to gopls/internal/lsp/cmd/test/definition.go
index 9c49eaa..2f8c5ab 100644
--- a/internal/lsp/cmd/test/definition.go
+++ b/gopls/internal/lsp/cmd/test/definition.go
@@ -10,7 +10,7 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/folding_range.go b/gopls/internal/lsp/cmd/test/folding_range.go
similarity index 100%
rename from internal/lsp/cmd/test/folding_range.go
rename to gopls/internal/lsp/cmd/test/folding_range.go
diff --git a/internal/lsp/cmd/test/format.go b/gopls/internal/lsp/cmd/test/format.go
similarity index 100%
rename from internal/lsp/cmd/test/format.go
rename to gopls/internal/lsp/cmd/test/format.go
diff --git a/internal/lsp/cmd/test/highlight.go b/gopls/internal/lsp/cmd/test/highlight.go
similarity index 100%
rename from internal/lsp/cmd/test/highlight.go
rename to gopls/internal/lsp/cmd/test/highlight.go
diff --git a/internal/lsp/cmd/test/implementation.go b/gopls/internal/lsp/cmd/test/implementation.go
similarity index 100%
rename from internal/lsp/cmd/test/implementation.go
rename to gopls/internal/lsp/cmd/test/implementation.go
diff --git a/internal/lsp/cmd/test/imports.go b/gopls/internal/lsp/cmd/test/imports.go
similarity index 88%
rename from internal/lsp/cmd/test/imports.go
rename to gopls/internal/lsp/cmd/test/imports.go
index ce8aee5..6bb8af9 100644
--- a/internal/lsp/cmd/test/imports.go
+++ b/gopls/internal/lsp/cmd/test/imports.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/links.go b/gopls/internal/lsp/cmd/test/links.go
similarity index 86%
rename from internal/lsp/cmd/test/links.go
rename to gopls/internal/lsp/cmd/test/links.go
index 88df768..52d2a31 100644
--- a/internal/lsp/cmd/test/links.go
+++ b/gopls/internal/lsp/cmd/test/links.go
@@ -8,8 +8,8 @@
"encoding/json"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/prepare_rename.go b/gopls/internal/lsp/cmd/test/prepare_rename.go
similarity index 88%
rename from internal/lsp/cmd/test/prepare_rename.go
rename to gopls/internal/lsp/cmd/test/prepare_rename.go
index b5359e5..4ae6d1a 100644
--- a/internal/lsp/cmd/test/prepare_rename.go
+++ b/gopls/internal/lsp/cmd/test/prepare_rename.go
@@ -8,9 +8,9 @@
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/cmd"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/cmd"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/references.go b/gopls/internal/lsp/cmd/test/references.go
similarity index 100%
rename from internal/lsp/cmd/test/references.go
rename to gopls/internal/lsp/cmd/test/references.go
diff --git a/internal/lsp/cmd/test/rename.go b/gopls/internal/lsp/cmd/test/rename.go
similarity index 100%
rename from internal/lsp/cmd/test/rename.go
rename to gopls/internal/lsp/cmd/test/rename.go
diff --git a/internal/lsp/cmd/test/semanticdriver.go b/gopls/internal/lsp/cmd/test/semanticdriver.go
similarity index 100%
rename from internal/lsp/cmd/test/semanticdriver.go
rename to gopls/internal/lsp/cmd/test/semanticdriver.go
diff --git a/internal/lsp/cmd/test/signature.go b/gopls/internal/lsp/cmd/test/signature.go
similarity index 90%
rename from internal/lsp/cmd/test/signature.go
rename to gopls/internal/lsp/cmd/test/signature.go
index f6bdaeb..9419d45 100644
--- a/internal/lsp/cmd/test/signature.go
+++ b/gopls/internal/lsp/cmd/test/signature.go
@@ -8,8 +8,8 @@
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/suggested_fix.go b/gopls/internal/lsp/cmd/test/suggested_fix.go
similarity index 91%
rename from internal/lsp/cmd/test/suggested_fix.go
rename to gopls/internal/lsp/cmd/test/suggested_fix.go
index 1481d8b..0981e26 100644
--- a/internal/lsp/cmd/test/suggested_fix.go
+++ b/gopls/internal/lsp/cmd/test/suggested_fix.go
@@ -8,8 +8,8 @@
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/tests"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/symbols.go b/gopls/internal/lsp/cmd/test/symbols.go
similarity index 92%
rename from internal/lsp/cmd/test/symbols.go
rename to gopls/internal/lsp/cmd/test/symbols.go
index 055be03..f75b3a4 100644
--- a/internal/lsp/cmd/test/symbols.go
+++ b/gopls/internal/lsp/cmd/test/symbols.go
@@ -7,7 +7,7 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/test/workspace_symbol.go b/gopls/internal/lsp/cmd/test/workspace_symbol.go
similarity index 90%
rename from internal/lsp/cmd/test/workspace_symbol.go
rename to gopls/internal/lsp/cmd/test/workspace_symbol.go
index 244ce04..876887b 100644
--- a/internal/lsp/cmd/test/workspace_symbol.go
+++ b/gopls/internal/lsp/cmd/test/workspace_symbol.go
@@ -11,9 +11,9 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/cmd/usage/api-json.hlp b/gopls/internal/lsp/cmd/usage/api-json.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/api-json.hlp
rename to gopls/internal/lsp/cmd/usage/api-json.hlp
diff --git a/internal/lsp/cmd/usage/bug.hlp b/gopls/internal/lsp/cmd/usage/bug.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/bug.hlp
rename to gopls/internal/lsp/cmd/usage/bug.hlp
diff --git a/internal/lsp/cmd/usage/call_hierarchy.hlp b/gopls/internal/lsp/cmd/usage/call_hierarchy.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/call_hierarchy.hlp
rename to gopls/internal/lsp/cmd/usage/call_hierarchy.hlp
diff --git a/internal/lsp/cmd/usage/check.hlp b/gopls/internal/lsp/cmd/usage/check.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/check.hlp
rename to gopls/internal/lsp/cmd/usage/check.hlp
diff --git a/internal/lsp/cmd/usage/definition.hlp b/gopls/internal/lsp/cmd/usage/definition.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/definition.hlp
rename to gopls/internal/lsp/cmd/usage/definition.hlp
diff --git a/internal/lsp/cmd/usage/fix.hlp b/gopls/internal/lsp/cmd/usage/fix.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/fix.hlp
rename to gopls/internal/lsp/cmd/usage/fix.hlp
diff --git a/internal/lsp/cmd/usage/folding_ranges.hlp b/gopls/internal/lsp/cmd/usage/folding_ranges.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/folding_ranges.hlp
rename to gopls/internal/lsp/cmd/usage/folding_ranges.hlp
diff --git a/internal/lsp/cmd/usage/format.hlp b/gopls/internal/lsp/cmd/usage/format.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/format.hlp
rename to gopls/internal/lsp/cmd/usage/format.hlp
diff --git a/internal/lsp/cmd/usage/help.hlp b/gopls/internal/lsp/cmd/usage/help.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/help.hlp
rename to gopls/internal/lsp/cmd/usage/help.hlp
diff --git a/internal/lsp/cmd/usage/highlight.hlp b/gopls/internal/lsp/cmd/usage/highlight.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/highlight.hlp
rename to gopls/internal/lsp/cmd/usage/highlight.hlp
diff --git a/internal/lsp/cmd/usage/implementation.hlp b/gopls/internal/lsp/cmd/usage/implementation.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/implementation.hlp
rename to gopls/internal/lsp/cmd/usage/implementation.hlp
diff --git a/internal/lsp/cmd/usage/imports.hlp b/gopls/internal/lsp/cmd/usage/imports.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/imports.hlp
rename to gopls/internal/lsp/cmd/usage/imports.hlp
diff --git a/internal/lsp/cmd/usage/inspect.hlp b/gopls/internal/lsp/cmd/usage/inspect.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/inspect.hlp
rename to gopls/internal/lsp/cmd/usage/inspect.hlp
diff --git a/internal/lsp/cmd/usage/licenses.hlp b/gopls/internal/lsp/cmd/usage/licenses.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/licenses.hlp
rename to gopls/internal/lsp/cmd/usage/licenses.hlp
diff --git a/internal/lsp/cmd/usage/links.hlp b/gopls/internal/lsp/cmd/usage/links.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/links.hlp
rename to gopls/internal/lsp/cmd/usage/links.hlp
diff --git a/internal/lsp/cmd/usage/prepare_rename.hlp b/gopls/internal/lsp/cmd/usage/prepare_rename.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/prepare_rename.hlp
rename to gopls/internal/lsp/cmd/usage/prepare_rename.hlp
diff --git a/internal/lsp/cmd/usage/references.hlp b/gopls/internal/lsp/cmd/usage/references.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/references.hlp
rename to gopls/internal/lsp/cmd/usage/references.hlp
diff --git a/internal/lsp/cmd/usage/remote.hlp b/gopls/internal/lsp/cmd/usage/remote.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/remote.hlp
rename to gopls/internal/lsp/cmd/usage/remote.hlp
diff --git a/internal/lsp/cmd/usage/rename.hlp b/gopls/internal/lsp/cmd/usage/rename.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/rename.hlp
rename to gopls/internal/lsp/cmd/usage/rename.hlp
diff --git a/internal/lsp/cmd/usage/semtok.hlp b/gopls/internal/lsp/cmd/usage/semtok.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/semtok.hlp
rename to gopls/internal/lsp/cmd/usage/semtok.hlp
diff --git a/internal/lsp/cmd/usage/serve.hlp b/gopls/internal/lsp/cmd/usage/serve.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/serve.hlp
rename to gopls/internal/lsp/cmd/usage/serve.hlp
diff --git a/internal/lsp/cmd/usage/signature.hlp b/gopls/internal/lsp/cmd/usage/signature.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/signature.hlp
rename to gopls/internal/lsp/cmd/usage/signature.hlp
diff --git a/internal/lsp/cmd/usage/symbols.hlp b/gopls/internal/lsp/cmd/usage/symbols.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/symbols.hlp
rename to gopls/internal/lsp/cmd/usage/symbols.hlp
diff --git a/internal/lsp/cmd/usage/usage.hlp b/gopls/internal/lsp/cmd/usage/usage.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/usage.hlp
rename to gopls/internal/lsp/cmd/usage/usage.hlp
diff --git a/internal/lsp/cmd/usage/version.hlp b/gopls/internal/lsp/cmd/usage/version.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/version.hlp
rename to gopls/internal/lsp/cmd/usage/version.hlp
diff --git a/internal/lsp/cmd/usage/vulncheck.hlp b/gopls/internal/lsp/cmd/usage/vulncheck.hlp
similarity index 84%
rename from internal/lsp/cmd/usage/vulncheck.hlp
rename to gopls/internal/lsp/cmd/usage/vulncheck.hlp
index 19a674b..4cdb8f3 100644
--- a/internal/lsp/cmd/usage/vulncheck.hlp
+++ b/gopls/internal/lsp/cmd/usage/vulncheck.hlp
@@ -6,7 +6,7 @@
WARNING: this command is experimental.
By default, the command outputs a JSON-encoded
- golang.org/x/tools/internal/lsp/command.VulncheckResult
+ golang.org/x/tools/gopls/internal/lsp/command.VulncheckResult
message.
Example:
$ gopls vulncheck <packages>
diff --git a/internal/lsp/cmd/usage/workspace.hlp b/gopls/internal/lsp/cmd/usage/workspace.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/workspace.hlp
rename to gopls/internal/lsp/cmd/usage/workspace.hlp
diff --git a/internal/lsp/cmd/usage/workspace_symbol.hlp b/gopls/internal/lsp/cmd/usage/workspace_symbol.hlp
similarity index 100%
rename from internal/lsp/cmd/usage/workspace_symbol.hlp
rename to gopls/internal/lsp/cmd/usage/workspace_symbol.hlp
diff --git a/internal/lsp/cmd/vulncheck.go b/gopls/internal/lsp/cmd/vulncheck.go
similarity index 95%
rename from internal/lsp/cmd/vulncheck.go
rename to gopls/internal/lsp/cmd/vulncheck.go
index d5b05a9..5ee9b0e 100644
--- a/internal/lsp/cmd/vulncheck.go
+++ b/gopls/internal/lsp/cmd/vulncheck.go
@@ -12,7 +12,7 @@
"os"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/tool"
)
@@ -44,7 +44,7 @@
WARNING: this command is experimental.
By default, the command outputs a JSON-encoded
- golang.org/x/tools/internal/lsp/command.VulncheckResult
+ golang.org/x/tools/gopls/internal/lsp/command.VulncheckResult
message.
Example:
$ gopls vulncheck <packages>
diff --git a/internal/lsp/cmd/workspace.go b/gopls/internal/lsp/cmd/workspace.go
similarity index 92%
rename from internal/lsp/cmd/workspace.go
rename to gopls/internal/lsp/cmd/workspace.go
index c0ddd9e..2038d27 100644
--- a/internal/lsp/cmd/workspace.go
+++ b/gopls/internal/lsp/cmd/workspace.go
@@ -9,9 +9,9 @@
"flag"
"fmt"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// workspace is a top-level command for working with the gopls workspace. This
diff --git a/internal/lsp/cmd/workspace_symbol.go b/gopls/internal/lsp/cmd/workspace_symbol.go
similarity index 95%
rename from internal/lsp/cmd/workspace_symbol.go
rename to gopls/internal/lsp/cmd/workspace_symbol.go
index 38fe5de..71a121e 100644
--- a/internal/lsp/cmd/workspace_symbol.go
+++ b/gopls/internal/lsp/cmd/workspace_symbol.go
@@ -9,8 +9,8 @@
"flag"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/tool"
)
diff --git a/internal/lsp/code_action.go b/gopls/internal/lsp/code_action.go
similarity index 97%
rename from internal/lsp/code_action.go
rename to gopls/internal/lsp/code_action.go
index 450d678..b09f422 100644
--- a/internal/lsp/code_action.go
+++ b/gopls/internal/lsp/code_action.go
@@ -12,11 +12,11 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/code_lens.go b/gopls/internal/lsp/code_lens.go
similarity index 88%
rename from internal/lsp/code_lens.go
rename to gopls/internal/lsp/code_lens.go
index e194458..4bbe2bb 100644
--- a/internal/lsp/code_lens.go
+++ b/gopls/internal/lsp/code_lens.go
@@ -10,10 +10,10 @@
"sort"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) codeLens(ctx context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error) {
diff --git a/internal/lsp/command.go b/gopls/internal/lsp/command.go
similarity index 98%
rename from internal/lsp/command.go
rename to gopls/internal/lsp/command.go
index 06dc2a4..1868255 100644
--- a/internal/lsp/command.go
+++ b/gopls/internal/lsp/command.go
@@ -22,11 +22,11 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/progress"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/progress"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/command/command_gen.go b/gopls/internal/lsp/command/command_gen.go
similarity index 99%
rename from internal/lsp/command/command_gen.go
rename to gopls/internal/lsp/command/command_gen.go
index 207def4..301cf6f 100644
--- a/internal/lsp/command/command_gen.go
+++ b/gopls/internal/lsp/command/command_gen.go
@@ -15,7 +15,7 @@
"context"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
const (
diff --git a/internal/lsp/command/commandmeta/meta.go b/gopls/internal/lsp/command/commandmeta/meta.go
similarity index 98%
rename from internal/lsp/command/commandmeta/meta.go
rename to gopls/internal/lsp/command/commandmeta/meta.go
index a3a357d..11d9940 100644
--- a/internal/lsp/command/commandmeta/meta.go
+++ b/gopls/internal/lsp/command/commandmeta/meta.go
@@ -17,7 +17,7 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/command"
)
type Command struct {
@@ -52,7 +52,7 @@
Mode: packages.NeedTypes | packages.NeedTypesInfo | packages.NeedSyntax | packages.NeedImports | packages.NeedDeps,
BuildFlags: []string{"-tags=generate"},
},
- "golang.org/x/tools/internal/lsp/command",
+ "golang.org/x/tools/gopls/internal/lsp/command",
)
if err != nil {
return nil, nil, fmt.Errorf("packages.Load: %v", err)
diff --git a/internal/lsp/command/gen/gen.go b/gopls/internal/lsp/command/gen/gen.go
similarity index 94%
rename from internal/lsp/command/gen/gen.go
rename to gopls/internal/lsp/command/gen/gen.go
index 8f7a2d5..2942869 100644
--- a/internal/lsp/command/gen/gen.go
+++ b/gopls/internal/lsp/command/gen/gen.go
@@ -13,7 +13,7 @@
"text/template"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/command/commandmeta"
+ "golang.org/x/tools/gopls/internal/lsp/command/commandmeta"
)
const src = `// Copyright 2021 The Go Authors. All rights reserved.
@@ -109,10 +109,10 @@
Imports: map[string]bool{
"context": true,
"fmt": true,
- "golang.org/x/tools/internal/lsp/protocol": true,
+ "golang.org/x/tools/gopls/internal/lsp/protocol": true,
},
}
- const thispkg = "golang.org/x/tools/internal/lsp/command"
+ const thispkg = "golang.org/x/tools/gopls/internal/lsp/command"
for _, c := range d.Commands {
for _, arg := range c.Args {
pth := pkgPath(arg.Type)
diff --git a/internal/lsp/command/generate.go b/gopls/internal/lsp/command/generate.go
similarity index 88%
rename from internal/lsp/command/generate.go
rename to gopls/internal/lsp/command/generate.go
index 14628c7..79ff49b 100644
--- a/internal/lsp/command/generate.go
+++ b/gopls/internal/lsp/command/generate.go
@@ -12,7 +12,7 @@
"io/ioutil"
"os"
- "golang.org/x/tools/internal/lsp/command/gen"
+ "golang.org/x/tools/gopls/internal/lsp/command/gen"
)
func main() {
diff --git a/internal/lsp/command/interface.go b/gopls/internal/lsp/command/interface.go
similarity index 99%
rename from internal/lsp/command/interface.go
rename to gopls/internal/lsp/command/interface.go
index 4a4498a..1fff896 100644
--- a/internal/lsp/command/interface.go
+++ b/gopls/internal/lsp/command/interface.go
@@ -17,7 +17,7 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// Interface defines the interface gopls exposes for the
diff --git a/internal/lsp/command/interface_test.go b/gopls/internal/lsp/command/interface_test.go
similarity index 91%
rename from internal/lsp/command/interface_test.go
rename to gopls/internal/lsp/command/interface_test.go
index 9ea30b4..de3ce62 100644
--- a/internal/lsp/command/interface_test.go
+++ b/gopls/internal/lsp/command/interface_test.go
@@ -9,7 +9,7 @@
"io/ioutil"
"testing"
- "golang.org/x/tools/internal/lsp/command/gen"
+ "golang.org/x/tools/gopls/internal/lsp/command/gen"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/command/util.go b/gopls/internal/lsp/command/util.go
similarity index 100%
rename from internal/lsp/command/util.go
rename to gopls/internal/lsp/command/util.go
diff --git a/internal/lsp/completion.go b/gopls/internal/lsp/completion.go
similarity index 92%
rename from internal/lsp/completion.go
rename to gopls/internal/lsp/completion.go
index 06af1bd..4655266 100644
--- a/internal/lsp/completion.go
+++ b/gopls/internal/lsp/completion.go
@@ -10,13 +10,13 @@
"strings"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/source/completion"
- "golang.org/x/tools/internal/lsp/template"
- "golang.org/x/tools/internal/lsp/work"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source/completion"
+ "golang.org/x/tools/gopls/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/work"
)
func (s *Server) completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error) {
diff --git a/internal/lsp/completion_test.go b/gopls/internal/lsp/completion_test.go
similarity index 96%
rename from internal/lsp/completion_test.go
rename to gopls/internal/lsp/completion_test.go
index d496a40..98d92b9 100644
--- a/internal/lsp/completion_test.go
+++ b/gopls/internal/lsp/completion_test.go
@@ -8,9 +8,9 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/debounce.go b/gopls/internal/lsp/debounce.go
similarity index 100%
rename from internal/lsp/debounce.go
rename to gopls/internal/lsp/debounce.go
diff --git a/internal/lsp/debounce_test.go b/gopls/internal/lsp/debounce_test.go
similarity index 100%
rename from internal/lsp/debounce_test.go
rename to gopls/internal/lsp/debounce_test.go
diff --git a/internal/lsp/debug/buildinfo_go1.12.go b/gopls/internal/lsp/debug/buildinfo_go1.12.go
similarity index 100%
rename from internal/lsp/debug/buildinfo_go1.12.go
rename to gopls/internal/lsp/debug/buildinfo_go1.12.go
diff --git a/internal/lsp/debug/buildinfo_go1.18.go b/gopls/internal/lsp/debug/buildinfo_go1.18.go
similarity index 100%
rename from internal/lsp/debug/buildinfo_go1.18.go
rename to gopls/internal/lsp/debug/buildinfo_go1.18.go
diff --git a/internal/lsp/debug/info.go b/gopls/internal/lsp/debug/info.go
similarity index 98%
rename from internal/lsp/debug/info.go
rename to gopls/internal/lsp/debug/info.go
index bcc2f4f..8784e74 100644
--- a/internal/lsp/debug/info.go
+++ b/gopls/internal/lsp/debug/info.go
@@ -16,7 +16,7 @@
"sort"
"strings"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
type PrintMode int
diff --git a/internal/lsp/debug/info_test.go b/gopls/internal/lsp/debug/info_test.go
similarity index 100%
rename from internal/lsp/debug/info_test.go
rename to gopls/internal/lsp/debug/info_test.go
diff --git a/internal/lsp/debug/log/log.go b/gopls/internal/lsp/debug/log/log.go
similarity index 95%
rename from internal/lsp/debug/log/log.go
rename to gopls/internal/lsp/debug/log/log.go
index 44638f8..e3eaa10 100644
--- a/internal/lsp/debug/log/log.go
+++ b/gopls/internal/lsp/debug/log/log.go
@@ -12,7 +12,7 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/debug/tag"
+ "golang.org/x/tools/internal/event/tag"
)
// Level parameterizes log severity.
diff --git a/internal/lsp/debug/metrics.go b/gopls/internal/lsp/debug/metrics.go
similarity index 97%
rename from internal/lsp/debug/metrics.go
rename to gopls/internal/lsp/debug/metrics.go
index 8efc1d4..c8da803 100644
--- a/internal/lsp/debug/metrics.go
+++ b/gopls/internal/lsp/debug/metrics.go
@@ -7,7 +7,7 @@
import (
"golang.org/x/tools/internal/event/export/metric"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/debug/tag"
+ "golang.org/x/tools/internal/event/tag"
)
var (
diff --git a/internal/lsp/debug/rpc.go b/gopls/internal/lsp/debug/rpc.go
similarity index 98%
rename from internal/lsp/debug/rpc.go
rename to gopls/internal/lsp/debug/rpc.go
index 033ee37..5610021 100644
--- a/internal/lsp/debug/rpc.go
+++ b/gopls/internal/lsp/debug/rpc.go
@@ -17,7 +17,7 @@
"golang.org/x/tools/internal/event/core"
"golang.org/x/tools/internal/event/export"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/debug/tag"
+ "golang.org/x/tools/internal/event/tag"
)
var RPCTmpl = template.Must(template.Must(BaseTemplate.Clone()).Parse(`
diff --git a/internal/lsp/debug/serve.go b/gopls/internal/lsp/debug/serve.go
similarity index 98%
rename from internal/lsp/debug/serve.go
rename to gopls/internal/lsp/debug/serve.go
index d343a6d..da0d68d 100644
--- a/internal/lsp/debug/serve.go
+++ b/gopls/internal/lsp/debug/serve.go
@@ -34,12 +34,12 @@
"golang.org/x/tools/internal/event/export/prometheus"
"golang.org/x/tools/internal/event/keys"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug/log"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug/log"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
type contextKeyType int
diff --git a/internal/lsp/debug/trace.go b/gopls/internal/lsp/debug/trace.go
similarity index 100%
rename from internal/lsp/debug/trace.go
rename to gopls/internal/lsp/debug/trace.go
diff --git a/internal/lsp/definition.go b/gopls/internal/lsp/definition.go
similarity index 92%
rename from internal/lsp/definition.go
rename to gopls/internal/lsp/definition.go
index 9487c68..d2ad474 100644
--- a/internal/lsp/definition.go
+++ b/gopls/internal/lsp/definition.go
@@ -8,9 +8,9 @@
"context"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
)
func (s *Server) definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error) {
diff --git a/internal/lsp/diagnostics.go b/gopls/internal/lsp/diagnostics.go
similarity index 98%
rename from internal/lsp/diagnostics.go
rename to gopls/internal/lsp/diagnostics.go
index 1977614..d758762 100644
--- a/internal/lsp/diagnostics.go
+++ b/gopls/internal/lsp/diagnostics.go
@@ -16,13 +16,13 @@
"time"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/log"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
- "golang.org/x/tools/internal/lsp/work"
+ "golang.org/x/tools/gopls/internal/lsp/debug/log"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/work"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/fake/client.go b/gopls/internal/lsp/fake/client.go
similarity index 98%
rename from internal/lsp/fake/client.go
rename to gopls/internal/lsp/fake/client.go
index dd44ed0..037de8e 100644
--- a/internal/lsp/fake/client.go
+++ b/gopls/internal/lsp/fake/client.go
@@ -8,7 +8,7 @@
"context"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// ClientHooks are called to handle the corresponding client LSP method.
diff --git a/internal/lsp/fake/doc.go b/gopls/internal/lsp/fake/doc.go
similarity index 100%
rename from internal/lsp/fake/doc.go
rename to gopls/internal/lsp/fake/doc.go
diff --git a/internal/lsp/fake/edit.go b/gopls/internal/lsp/fake/edit.go
similarity index 98%
rename from internal/lsp/fake/edit.go
rename to gopls/internal/lsp/fake/edit.go
index 579c3a1..b45f23f 100644
--- a/internal/lsp/fake/edit.go
+++ b/gopls/internal/lsp/fake/edit.go
@@ -9,7 +9,7 @@
"sort"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// Pos represents a position in a text buffer. Both Line and Column are
diff --git a/internal/lsp/fake/edit_test.go b/gopls/internal/lsp/fake/edit_test.go
similarity index 100%
rename from internal/lsp/fake/edit_test.go
rename to gopls/internal/lsp/fake/edit_test.go
diff --git a/internal/lsp/fake/editor.go b/gopls/internal/lsp/fake/editor.go
similarity index 99%
rename from internal/lsp/fake/editor.go
rename to gopls/internal/lsp/fake/editor.go
index eb721f1..ebdf1a8 100644
--- a/internal/lsp/fake/editor.go
+++ b/gopls/internal/lsp/fake/editor.go
@@ -18,8 +18,8 @@
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/fake/editor_test.go b/gopls/internal/lsp/fake/editor_test.go
similarity index 100%
rename from internal/lsp/fake/editor_test.go
rename to gopls/internal/lsp/fake/editor_test.go
diff --git a/internal/lsp/fake/proxy.go b/gopls/internal/lsp/fake/proxy.go
similarity index 100%
rename from internal/lsp/fake/proxy.go
rename to gopls/internal/lsp/fake/proxy.go
diff --git a/internal/lsp/fake/sandbox.go b/gopls/internal/lsp/fake/sandbox.go
similarity index 100%
rename from internal/lsp/fake/sandbox.go
rename to gopls/internal/lsp/fake/sandbox.go
diff --git a/internal/lsp/fake/workdir.go b/gopls/internal/lsp/fake/workdir.go
similarity index 99%
rename from internal/lsp/fake/workdir.go
rename to gopls/internal/lsp/fake/workdir.go
index 0a72083..4b8c2f3 100644
--- a/internal/lsp/fake/workdir.go
+++ b/gopls/internal/lsp/fake/workdir.go
@@ -17,7 +17,7 @@
"sync"
"time"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/fake/workdir_test.go b/gopls/internal/lsp/fake/workdir_test.go
similarity index 98%
rename from internal/lsp/fake/workdir_test.go
rename to gopls/internal/lsp/fake/workdir_test.go
index 33fbb9f..77c6684 100644
--- a/internal/lsp/fake/workdir_test.go
+++ b/gopls/internal/lsp/fake/workdir_test.go
@@ -12,7 +12,7 @@
"testing"
"time"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
const data = `
diff --git a/internal/lsp/fake/workdir_windows.go b/gopls/internal/lsp/fake/workdir_windows.go
similarity index 100%
rename from internal/lsp/fake/workdir_windows.go
rename to gopls/internal/lsp/fake/workdir_windows.go
diff --git a/internal/lsp/folding_range.go b/gopls/internal/lsp/folding_range.go
similarity index 91%
rename from internal/lsp/folding_range.go
rename to gopls/internal/lsp/folding_range.go
index 75f48a4..4a2d828 100644
--- a/internal/lsp/folding_range.go
+++ b/gopls/internal/lsp/folding_range.go
@@ -7,8 +7,8 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) foldingRange(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error) {
diff --git a/internal/lsp/format.go b/gopls/internal/lsp/format.go
similarity index 78%
rename from internal/lsp/format.go
rename to gopls/internal/lsp/format.go
index 19736af..773a469 100644
--- a/internal/lsp/format.go
+++ b/gopls/internal/lsp/format.go
@@ -7,10 +7,10 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/work"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/work"
)
func (s *Server) formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error) {
diff --git a/internal/lsp/general.go b/gopls/internal/lsp/general.go
similarity index 98%
rename from internal/lsp/general.go
rename to gopls/internal/lsp/general.go
index 8ea4d7f..ee0739f 100644
--- a/internal/lsp/general.go
+++ b/gopls/internal/lsp/general.go
@@ -17,10 +17,10 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/helper/README.md b/gopls/internal/lsp/helper/README.md
similarity index 100%
rename from internal/lsp/helper/README.md
rename to gopls/internal/lsp/helper/README.md
diff --git a/internal/lsp/helper/helper.go b/gopls/internal/lsp/helper/helper.go
similarity index 98%
rename from internal/lsp/helper/helper.go
rename to gopls/internal/lsp/helper/helper.go
index cadda02..391d75a 100644
--- a/internal/lsp/helper/helper.go
+++ b/gopls/internal/lsp/helper/helper.go
@@ -56,7 +56,7 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
{{range $key, $v := .Stuff}}
diff --git a/internal/lsp/highlight.go b/gopls/internal/lsp/highlight.go
similarity index 85%
rename from internal/lsp/highlight.go
rename to gopls/internal/lsp/highlight.go
index 5dc636e..290444e 100644
--- a/internal/lsp/highlight.go
+++ b/gopls/internal/lsp/highlight.go
@@ -8,10 +8,10 @@
"context"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
)
func (s *Server) documentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error) {
diff --git a/internal/lsp/hover.go b/gopls/internal/lsp/hover.go
similarity index 77%
rename from internal/lsp/hover.go
rename to gopls/internal/lsp/hover.go
index d59f5db..2d1aae7 100644
--- a/internal/lsp/hover.go
+++ b/gopls/internal/lsp/hover.go
@@ -7,11 +7,11 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/mod"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
- "golang.org/x/tools/internal/lsp/work"
+ "golang.org/x/tools/gopls/internal/lsp/mod"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/work"
)
func (s *Server) hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error) {
diff --git a/internal/lsp/implementation.go b/gopls/internal/lsp/implementation.go
similarity index 84%
rename from internal/lsp/implementation.go
rename to gopls/internal/lsp/implementation.go
index 49992b9..0eb8265 100644
--- a/internal/lsp/implementation.go
+++ b/gopls/internal/lsp/implementation.go
@@ -7,8 +7,8 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) implementation(ctx context.Context, params *protocol.ImplementationParams) ([]protocol.Location, error) {
diff --git a/internal/lsp/inlay_hint.go b/gopls/internal/lsp/inlay_hint.go
similarity index 83%
rename from internal/lsp/inlay_hint.go
rename to gopls/internal/lsp/inlay_hint.go
index 8d8a419..6aceecb 100644
--- a/internal/lsp/inlay_hint.go
+++ b/gopls/internal/lsp/inlay_hint.go
@@ -7,8 +7,8 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) inlayHint(ctx context.Context, params *protocol.InlayHintParams) ([]protocol.InlayHint, error) {
diff --git a/internal/lsp/link.go b/gopls/internal/lsp/link.go
similarity index 97%
rename from internal/lsp/link.go
rename to gopls/internal/lsp/link.go
index 65da8a5..456f417 100644
--- a/internal/lsp/link.go
+++ b/gopls/internal/lsp/link.go
@@ -18,9 +18,9 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/lsp_test.go b/gopls/internal/lsp/lsp_test.go
similarity index 98%
rename from internal/lsp/lsp_test.go
rename to gopls/internal/lsp/lsp_test.go
index e8188fe..6656549 100644
--- a/internal/lsp/lsp_test.go
+++ b/gopls/internal/lsp/lsp_test.go
@@ -15,14 +15,14 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/lsppos/lsppos.go b/gopls/internal/lsp/lsppos/lsppos.go
similarity index 98%
rename from internal/lsp/lsppos/lsppos.go
rename to gopls/internal/lsp/lsppos/lsppos.go
index 6afad47..7db25fe 100644
--- a/internal/lsp/lsppos/lsppos.go
+++ b/gopls/internal/lsp/lsppos/lsppos.go
@@ -22,7 +22,7 @@
"sort"
"unicode/utf8"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// Mapper maps utf-8 byte offsets to LSP positions for a single file.
diff --git a/internal/lsp/lsppos/lsppos_test.go b/gopls/internal/lsp/lsppos/lsppos_test.go
similarity index 96%
rename from internal/lsp/lsppos/lsppos_test.go
rename to gopls/internal/lsp/lsppos/lsppos_test.go
index 8353f92..f65b64f 100644
--- a/internal/lsp/lsppos/lsppos_test.go
+++ b/gopls/internal/lsp/lsppos/lsppos_test.go
@@ -9,8 +9,8 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
type testCase struct {
diff --git a/internal/lsp/lsppos/token.go b/gopls/internal/lsp/lsppos/token.go
similarity index 94%
rename from internal/lsp/lsppos/token.go
rename to gopls/internal/lsp/lsppos/token.go
index 0f1f2b2..2a16ba2 100644
--- a/internal/lsp/lsppos/token.go
+++ b/gopls/internal/lsp/lsppos/token.go
@@ -8,8 +8,8 @@
"errors"
"go/token"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
)
// TokenMapper maps token.Pos to LSP positions for a single file.
diff --git a/internal/lsp/lsppos/token_test.go b/gopls/internal/lsp/lsppos/token_test.go
similarity index 92%
rename from internal/lsp/lsppos/token_test.go
rename to gopls/internal/lsp/lsppos/token_test.go
index c12d150..a8fa6f6 100644
--- a/internal/lsp/lsppos/token_test.go
+++ b/gopls/internal/lsp/lsppos/token_test.go
@@ -8,8 +8,8 @@
"go/token"
"testing"
- . "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func makeTokenMapper(content []byte) (*TokenMapper, *token.File) {
diff --git a/internal/lsp/lsprpc/autostart_default.go b/gopls/internal/lsp/lsprpc/autostart_default.go
similarity index 100%
rename from internal/lsp/lsprpc/autostart_default.go
rename to gopls/internal/lsp/lsprpc/autostart_default.go
diff --git a/internal/lsp/lsprpc/autostart_posix.go b/gopls/internal/lsp/lsprpc/autostart_posix.go
similarity index 100%
rename from internal/lsp/lsprpc/autostart_posix.go
rename to gopls/internal/lsp/lsprpc/autostart_posix.go
diff --git a/internal/lsp/lsprpc/binder.go b/gopls/internal/lsp/lsprpc/binder.go
similarity index 98%
rename from internal/lsp/lsprpc/binder.go
rename to gopls/internal/lsp/lsprpc/binder.go
index aa2edb3..b12cc49 100644
--- a/internal/lsp/lsprpc/binder.go
+++ b/gopls/internal/lsp/lsprpc/binder.go
@@ -11,7 +11,7 @@
"golang.org/x/tools/internal/event"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/lsprpc/binder_test.go b/gopls/internal/lsp/lsprpc/binder_test.go
similarity index 97%
rename from internal/lsp/lsprpc/binder_test.go
rename to gopls/internal/lsp/lsprpc/binder_test.go
index f7dd830..8b048ab 100644
--- a/internal/lsp/lsprpc/binder_test.go
+++ b/gopls/internal/lsp/lsprpc/binder_test.go
@@ -12,9 +12,9 @@
"time"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/lsprpc"
+ . "golang.org/x/tools/gopls/internal/lsp/lsprpc"
)
type TestEnv struct {
diff --git a/internal/lsp/lsprpc/commandinterceptor.go b/gopls/internal/lsp/lsprpc/commandinterceptor.go
similarity index 96%
rename from internal/lsp/lsprpc/commandinterceptor.go
rename to gopls/internal/lsp/lsprpc/commandinterceptor.go
index 5c36af7..be68efe 100644
--- a/internal/lsp/lsprpc/commandinterceptor.go
+++ b/gopls/internal/lsp/lsprpc/commandinterceptor.go
@@ -9,7 +9,7 @@
"encoding/json"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// HandlerMiddleware is a middleware that only modifies the jsonrpc2 handler.
diff --git a/internal/lsp/lsprpc/commandinterceptor_test.go b/gopls/internal/lsp/lsprpc/commandinterceptor_test.go
similarity index 90%
rename from internal/lsp/lsprpc/commandinterceptor_test.go
rename to gopls/internal/lsp/lsprpc/commandinterceptor_test.go
index 06550e8..555f151 100644
--- a/internal/lsp/lsprpc/commandinterceptor_test.go
+++ b/gopls/internal/lsp/lsprpc/commandinterceptor_test.go
@@ -8,9 +8,9 @@
"context"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/lsprpc"
+ . "golang.org/x/tools/gopls/internal/lsp/lsprpc"
)
func TestCommandInterceptor(t *testing.T) {
diff --git a/internal/lsp/lsprpc/dialer.go b/gopls/internal/lsp/lsprpc/dialer.go
similarity index 100%
rename from internal/lsp/lsprpc/dialer.go
rename to gopls/internal/lsp/lsprpc/dialer.go
diff --git a/internal/lsp/lsprpc/goenv.go b/gopls/internal/lsp/lsprpc/goenv.go
similarity index 97%
rename from internal/lsp/lsprpc/goenv.go
rename to gopls/internal/lsp/lsprpc/goenv.go
index f313724..c316ea0 100644
--- a/internal/lsp/lsprpc/goenv.go
+++ b/gopls/internal/lsp/lsprpc/goenv.go
@@ -13,7 +13,7 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func GoEnvMiddleware() (Middleware, error) {
diff --git a/internal/lsp/lsprpc/goenv_test.go b/gopls/internal/lsp/lsprpc/goenv_test.go
similarity index 94%
rename from internal/lsp/lsprpc/goenv_test.go
rename to gopls/internal/lsp/lsprpc/goenv_test.go
index cdfe23c..b4a1b0d 100644
--- a/internal/lsp/lsprpc/goenv_test.go
+++ b/gopls/internal/lsp/lsprpc/goenv_test.go
@@ -8,10 +8,10 @@
"context"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
- . "golang.org/x/tools/internal/lsp/lsprpc"
+ . "golang.org/x/tools/gopls/internal/lsp/lsprpc"
)
type initServer struct {
diff --git a/internal/lsp/lsprpc/lsprpc.go b/gopls/internal/lsp/lsprpc/lsprpc.go
similarity index 98%
rename from internal/lsp/lsprpc/lsprpc.go
rename to gopls/internal/lsp/lsprpc/lsprpc.go
index 7e37229..f0fe53d 100644
--- a/internal/lsp/lsprpc/lsprpc.go
+++ b/gopls/internal/lsp/lsprpc/lsprpc.go
@@ -21,12 +21,12 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// Unique identifiers for client/server.
diff --git a/internal/lsp/lsprpc/lsprpc_test.go b/gopls/internal/lsp/lsprpc/lsprpc_test.go
similarity index 97%
rename from internal/lsp/lsprpc/lsprpc_test.go
rename to gopls/internal/lsp/lsprpc/lsprpc_test.go
index b43629b..5718dfe 100644
--- a/internal/lsp/lsprpc/lsprpc_test.go
+++ b/gopls/internal/lsp/lsprpc/lsprpc_test.go
@@ -15,10 +15,10 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/lsprpc/middleware.go b/gopls/internal/lsp/lsprpc/middleware.go
similarity index 100%
rename from internal/lsp/lsprpc/middleware.go
rename to gopls/internal/lsp/lsprpc/middleware.go
diff --git a/internal/lsp/lsprpc/middleware_test.go b/gopls/internal/lsp/lsprpc/middleware_test.go
similarity index 97%
rename from internal/lsp/lsprpc/middleware_test.go
rename to gopls/internal/lsp/lsprpc/middleware_test.go
index a385f10..a37294a 100644
--- a/internal/lsp/lsprpc/middleware_test.go
+++ b/gopls/internal/lsp/lsprpc/middleware_test.go
@@ -12,7 +12,7 @@
"time"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
- . "golang.org/x/tools/internal/lsp/lsprpc"
+ . "golang.org/x/tools/gopls/internal/lsp/lsprpc"
)
var noopBinder = BinderFunc(func(context.Context, *jsonrpc2_v2.Connection) (jsonrpc2_v2.ConnectionOptions, error) {
diff --git a/internal/lsp/mod/code_lens.go b/gopls/internal/lsp/mod/code_lens.go
similarity index 97%
rename from internal/lsp/mod/code_lens.go
rename to gopls/internal/lsp/mod/code_lens.go
index 1de25c2..2068e60 100644
--- a/internal/lsp/mod/code_lens.go
+++ b/gopls/internal/lsp/mod/code_lens.go
@@ -11,9 +11,9 @@
"path/filepath"
"golang.org/x/mod/modfile"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// LensFuncs returns the supported lensFuncs for go.mod files.
diff --git a/internal/lsp/mod/diagnostics.go b/gopls/internal/lsp/mod/diagnostics.go
similarity index 94%
rename from internal/lsp/mod/diagnostics.go
rename to gopls/internal/lsp/mod/diagnostics.go
index d866cfd..96b95c0 100644
--- a/internal/lsp/mod/diagnostics.go
+++ b/gopls/internal/lsp/mod/diagnostics.go
@@ -11,10 +11,10 @@
"fmt"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Diagnostics(ctx context.Context, snapshot source.Snapshot) (map[source.VersionedFileIdentity][]*source.Diagnostic, error) {
diff --git a/internal/lsp/mod/format.go b/gopls/internal/lsp/mod/format.go
similarity index 88%
rename from internal/lsp/mod/format.go
rename to gopls/internal/lsp/mod/format.go
index c355766..d2bce4c 100644
--- a/internal/lsp/mod/format.go
+++ b/gopls/internal/lsp/mod/format.go
@@ -8,8 +8,8 @@
"context"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Format(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle) ([]protocol.TextEdit, error) {
diff --git a/internal/lsp/mod/hover.go b/gopls/internal/lsp/mod/hover.go
similarity index 97%
rename from internal/lsp/mod/hover.go
rename to gopls/internal/lsp/mod/hover.go
index 1461d52..0f3dfc4 100644
--- a/internal/lsp/mod/hover.go
+++ b/gopls/internal/lsp/mod/hover.go
@@ -12,8 +12,8 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Hover(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle, position protocol.Position) (*protocol.Hover, error) {
diff --git a/internal/lsp/mod/mod_test.go b/gopls/internal/lsp/mod/mod_test.go
similarity index 91%
rename from internal/lsp/mod/mod_test.go
rename to gopls/internal/lsp/mod/mod_test.go
index 56af986..75c1666 100644
--- a/internal/lsp/mod/mod_test.go
+++ b/gopls/internal/lsp/mod/mod_test.go
@@ -10,9 +10,9 @@
"path/filepath"
"testing"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/mod/testdata/unchanged/go.mod b/gopls/internal/lsp/mod/testdata/unchanged/go.mod
similarity index 100%
rename from internal/lsp/mod/testdata/unchanged/go.mod
rename to gopls/internal/lsp/mod/testdata/unchanged/go.mod
diff --git a/internal/lsp/mod/testdata/unchanged/main.go b/gopls/internal/lsp/mod/testdata/unchanged/main.go
similarity index 100%
rename from internal/lsp/mod/testdata/unchanged/main.go
rename to gopls/internal/lsp/mod/testdata/unchanged/main.go
diff --git a/internal/lsp/progress/progress.go b/gopls/internal/lsp/progress/progress.go
similarity index 98%
rename from internal/lsp/progress/progress.go
rename to gopls/internal/lsp/progress/progress.go
index ee63bb7..31a8cb6 100644
--- a/internal/lsp/progress/progress.go
+++ b/gopls/internal/lsp/progress/progress.go
@@ -13,8 +13,8 @@
"sync"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/progress/progress_test.go b/gopls/internal/lsp/progress/progress_test.go
similarity index 98%
rename from internal/lsp/progress/progress_test.go
rename to gopls/internal/lsp/progress/progress_test.go
index 6e901d1..ef87eba 100644
--- a/internal/lsp/progress/progress_test.go
+++ b/gopls/internal/lsp/progress/progress_test.go
@@ -10,7 +10,7 @@
"sync"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
type fakeClient struct {
diff --git a/internal/lsp/protocol/codeactionkind.go b/gopls/internal/lsp/protocol/codeactionkind.go
similarity index 100%
rename from internal/lsp/protocol/codeactionkind.go
rename to gopls/internal/lsp/protocol/codeactionkind.go
diff --git a/internal/lsp/protocol/context.go b/gopls/internal/lsp/protocol/context.go
similarity index 100%
rename from internal/lsp/protocol/context.go
rename to gopls/internal/lsp/protocol/context.go
diff --git a/internal/lsp/protocol/doc.go b/gopls/internal/lsp/protocol/doc.go
similarity index 100%
rename from internal/lsp/protocol/doc.go
rename to gopls/internal/lsp/protocol/doc.go
diff --git a/internal/lsp/protocol/enums.go b/gopls/internal/lsp/protocol/enums.go
similarity index 100%
rename from internal/lsp/protocol/enums.go
rename to gopls/internal/lsp/protocol/enums.go
diff --git a/internal/lsp/protocol/log.go b/gopls/internal/lsp/protocol/log.go
similarity index 100%
rename from internal/lsp/protocol/log.go
rename to gopls/internal/lsp/protocol/log.go
diff --git a/internal/lsp/protocol/protocol.go b/gopls/internal/lsp/protocol/protocol.go
similarity index 100%
rename from internal/lsp/protocol/protocol.go
rename to gopls/internal/lsp/protocol/protocol.go
diff --git a/internal/lsp/protocol/span.go b/gopls/internal/lsp/protocol/span.go
similarity index 100%
rename from internal/lsp/protocol/span.go
rename to gopls/internal/lsp/protocol/span.go
diff --git a/internal/lsp/protocol/tsclient.go b/gopls/internal/lsp/protocol/tsclient.go
similarity index 100%
rename from internal/lsp/protocol/tsclient.go
rename to gopls/internal/lsp/protocol/tsclient.go
diff --git a/internal/lsp/protocol/tsdocument_changes.go b/gopls/internal/lsp/protocol/tsdocument_changes.go
similarity index 100%
rename from internal/lsp/protocol/tsdocument_changes.go
rename to gopls/internal/lsp/protocol/tsdocument_changes.go
diff --git a/internal/lsp/protocol/tsprotocol.go b/gopls/internal/lsp/protocol/tsprotocol.go
similarity index 100%
rename from internal/lsp/protocol/tsprotocol.go
rename to gopls/internal/lsp/protocol/tsprotocol.go
diff --git a/internal/lsp/protocol/tsserver.go b/gopls/internal/lsp/protocol/tsserver.go
similarity index 100%
rename from internal/lsp/protocol/tsserver.go
rename to gopls/internal/lsp/protocol/tsserver.go
diff --git a/internal/lsp/protocol/typescript/README.md b/gopls/internal/lsp/protocol/typescript/README.md
similarity index 100%
rename from internal/lsp/protocol/typescript/README.md
rename to gopls/internal/lsp/protocol/typescript/README.md
diff --git a/internal/lsp/protocol/typescript/code.ts b/gopls/internal/lsp/protocol/typescript/code.ts
similarity index 100%
rename from internal/lsp/protocol/typescript/code.ts
rename to gopls/internal/lsp/protocol/typescript/code.ts
diff --git a/internal/lsp/protocol/typescript/tsconfig.json b/gopls/internal/lsp/protocol/typescript/tsconfig.json
similarity index 100%
rename from internal/lsp/protocol/typescript/tsconfig.json
rename to gopls/internal/lsp/protocol/typescript/tsconfig.json
diff --git a/internal/lsp/protocol/typescript/util.ts b/gopls/internal/lsp/protocol/typescript/util.ts
similarity index 100%
rename from internal/lsp/protocol/typescript/util.ts
rename to gopls/internal/lsp/protocol/typescript/util.ts
diff --git a/internal/lsp/references.go b/gopls/internal/lsp/references.go
similarity index 87%
rename from internal/lsp/references.go
rename to gopls/internal/lsp/references.go
index f96e553..6f4e3ee 100644
--- a/internal/lsp/references.go
+++ b/gopls/internal/lsp/references.go
@@ -7,9 +7,9 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
)
func (s *Server) references(ctx context.Context, params *protocol.ReferenceParams) ([]protocol.Location, error) {
diff --git a/internal/lsp/regtest/doc.go b/gopls/internal/lsp/regtest/doc.go
similarity index 95%
rename from internal/lsp/regtest/doc.go
rename to gopls/internal/lsp/regtest/doc.go
index e972769..39eddd8 100644
--- a/internal/lsp/regtest/doc.go
+++ b/gopls/internal/lsp/regtest/doc.go
@@ -19,7 +19,7 @@
// - the Env type provides a collection of resources to use in writing tests
// (for example a temporary working directory and fake text editor)
// - user interactions with these resources are scripted using test wrappers
-// around the API provided by the golang.org/x/tools/internal/lsp/fake
+// around the API provided by the golang.org/x/tools/gopls/internal/lsp/fake
// package.
//
// Regressions are expressed in terms of Expectations, which at a high level
diff --git a/internal/lsp/regtest/env.go b/gopls/internal/lsp/regtest/env.go
similarity index 98%
rename from internal/lsp/regtest/env.go
rename to gopls/internal/lsp/regtest/env.go
index 77744ae..23be64e 100644
--- a/internal/lsp/regtest/env.go
+++ b/gopls/internal/lsp/regtest/env.go
@@ -12,8 +12,8 @@
"testing"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// Env holds the building blocks of an editor testing environment, providing
diff --git a/internal/lsp/regtest/env_test.go b/gopls/internal/lsp/regtest/env_test.go
similarity index 97%
rename from internal/lsp/regtest/env_test.go
rename to gopls/internal/lsp/regtest/env_test.go
index f54f7f2..824c602 100644
--- a/internal/lsp/regtest/env_test.go
+++ b/gopls/internal/lsp/regtest/env_test.go
@@ -9,7 +9,7 @@
"encoding/json"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func TestProgressUpdating(t *testing.T) {
diff --git a/internal/lsp/regtest/expectation.go b/gopls/internal/lsp/regtest/expectation.go
similarity index 99%
rename from internal/lsp/regtest/expectation.go
rename to gopls/internal/lsp/regtest/expectation.go
index e85f409..5234f7e 100644
--- a/internal/lsp/regtest/expectation.go
+++ b/gopls/internal/lsp/regtest/expectation.go
@@ -9,9 +9,9 @@
"regexp"
"strings"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/regtest/regtest.go b/gopls/internal/lsp/regtest/regtest.go
similarity index 97%
rename from internal/lsp/regtest/regtest.go
rename to gopls/internal/lsp/regtest/regtest.go
index d499bde..2698aab 100644
--- a/internal/lsp/regtest/regtest.go
+++ b/gopls/internal/lsp/regtest/regtest.go
@@ -15,8 +15,8 @@
"testing"
"time"
- "golang.org/x/tools/internal/lsp/cmd"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/cmd"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/internal/tool"
diff --git a/internal/lsp/regtest/runner.go b/gopls/internal/lsp/regtest/runner.go
similarity index 97%
rename from internal/lsp/regtest/runner.go
rename to gopls/internal/lsp/regtest/runner.go
index 93bb139..effc8aa 100644
--- a/internal/lsp/regtest/runner.go
+++ b/gopls/internal/lsp/regtest/runner.go
@@ -25,12 +25,12 @@
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/lsprpc"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/memoize"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/internal/xcontext"
diff --git a/internal/lsp/regtest/wrappers.go b/gopls/internal/lsp/regtest/wrappers.go
similarity index 98%
rename from internal/lsp/regtest/wrappers.go
rename to gopls/internal/lsp/regtest/wrappers.go
index e8f49a6..b5d1783 100644
--- a/internal/lsp/regtest/wrappers.go
+++ b/gopls/internal/lsp/regtest/wrappers.go
@@ -8,9 +8,9 @@
"encoding/json"
"path"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func (e *Env) ChangeFilesOnDisk(events []fake.FileEvent) {
diff --git a/internal/lsp/rename.go b/gopls/internal/lsp/rename.go
similarity index 93%
rename from internal/lsp/rename.go
rename to gopls/internal/lsp/rename.go
index e78e216..5127b5d 100644
--- a/internal/lsp/rename.go
+++ b/gopls/internal/lsp/rename.go
@@ -7,8 +7,8 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error) {
diff --git a/internal/lsp/reset_golden.sh b/gopls/internal/lsp/reset_golden.sh
similarity index 100%
rename from internal/lsp/reset_golden.sh
rename to gopls/internal/lsp/reset_golden.sh
diff --git a/internal/lsp/safetoken/safetoken.go b/gopls/internal/lsp/safetoken/safetoken.go
similarity index 100%
rename from internal/lsp/safetoken/safetoken.go
rename to gopls/internal/lsp/safetoken/safetoken.go
diff --git a/internal/lsp/safetoken/safetoken_test.go b/gopls/internal/lsp/safetoken/safetoken_test.go
similarity index 83%
rename from internal/lsp/safetoken/safetoken_test.go
rename to gopls/internal/lsp/safetoken/safetoken_test.go
index 43d73a7..1486d68 100644
--- a/internal/lsp/safetoken/safetoken_test.go
+++ b/gopls/internal/lsp/safetoken/safetoken_test.go
@@ -21,7 +21,7 @@
pkgs, err := packages.Load(&packages.Config{
Fset: fset,
Mode: packages.NeedName | packages.NeedModule | packages.NeedCompiledGoFiles | packages.NeedTypes | packages.NeedTypesInfo | packages.NeedSyntax | packages.NeedImports | packages.NeedDeps,
- }, "go/token", "golang.org/x/tools/internal/lsp/...", "golang.org/x/tools/gopls/...")
+ }, "go/token", "golang.org/x/tools/gopls/internal/lsp/...", "golang.org/x/tools/gopls/...")
if err != nil {
t.Fatal(err)
}
@@ -30,7 +30,7 @@
switch pkg.PkgPath {
case "go/token":
tokenPkg = pkg
- case "golang.org/x/tools/internal/lsp/safetoken":
+ case "golang.org/x/tools/gopls/internal/lsp/safetoken":
safePkg = pkg
}
}
@@ -39,7 +39,7 @@
t.Fatal("missing package go/token")
}
if safePkg == nil {
- t.Fatal("missing package golang.org/x/tools/internal/lsp/safetoken")
+ t.Fatal("missing package golang.org/x/tools/gopls/internal/lsp/safetoken")
}
fileObj := tokenPkg.Types.Scope().Lookup("File")
@@ -58,7 +58,7 @@
if safeOffset.Pos() <= ident.Pos() && ident.Pos() <= safeOffset.Scope().End() {
continue // accepted usage
}
- t.Errorf(`%s: Unexpected use of (*go/token.File).Offset. Please use golang.org/x/tools/internal/lsp/safetoken.Offset instead.`, fset.Position(ident.Pos()))
+ t.Errorf(`%s: Unexpected use of (*go/token.File).Offset. Please use golang.org/x/tools/gopls/internal/lsp/safetoken.Offset instead.`, fset.Position(ident.Pos()))
}
}
}
diff --git a/internal/lsp/semantic.go b/gopls/internal/lsp/semantic.go
similarity index 98%
rename from internal/lsp/semantic.go
rename to gopls/internal/lsp/semantic.go
index 648d5c4..641c2c4 100644
--- a/internal/lsp/semantic.go
+++ b/gopls/internal/lsp/semantic.go
@@ -19,10 +19,10 @@
"time"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/server.go b/gopls/internal/lsp/server.go
similarity index 96%
rename from internal/lsp/server.go
rename to gopls/internal/lsp/server.go
index fb820cc..25ef565 100644
--- a/internal/lsp/server.go
+++ b/gopls/internal/lsp/server.go
@@ -11,9 +11,9 @@
"sync"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp/progress"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/progress"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/server_gen.go b/gopls/internal/lsp/server_gen.go
similarity index 99%
rename from internal/lsp/server_gen.go
rename to gopls/internal/lsp/server_gen.go
index 4e9db0e..42635c6 100644
--- a/internal/lsp/server_gen.go
+++ b/gopls/internal/lsp/server_gen.go
@@ -9,7 +9,7 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error) {
diff --git a/internal/lsp/signature_help.go b/gopls/internal/lsp/signature_help.go
similarity index 85%
rename from internal/lsp/signature_help.go
rename to gopls/internal/lsp/signature_help.go
index 24dee1b..8a343fb 100644
--- a/internal/lsp/signature_help.go
+++ b/gopls/internal/lsp/signature_help.go
@@ -8,9 +8,9 @@
"context"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) signatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error) {
diff --git a/internal/lsp/snippet/snippet_builder.go b/gopls/internal/lsp/snippet/snippet_builder.go
similarity index 100%
rename from internal/lsp/snippet/snippet_builder.go
rename to gopls/internal/lsp/snippet/snippet_builder.go
diff --git a/internal/lsp/snippet/snippet_builder_test.go b/gopls/internal/lsp/snippet/snippet_builder_test.go
similarity index 100%
rename from internal/lsp/snippet/snippet_builder_test.go
rename to gopls/internal/lsp/snippet/snippet_builder_test.go
diff --git a/internal/lsp/source/add_import.go b/gopls/internal/lsp/source/add_import.go
similarity index 93%
rename from internal/lsp/source/add_import.go
rename to gopls/internal/lsp/source/add_import.go
index 816acc2..2fc03e5 100644
--- a/internal/lsp/source/add_import.go
+++ b/gopls/internal/lsp/source/add_import.go
@@ -8,7 +8,7 @@
"context"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// AddImport adds a single import statement to the given file
diff --git a/internal/lsp/source/api_json.go b/gopls/internal/lsp/source/api_json.go
similarity index 100%
rename from internal/lsp/source/api_json.go
rename to gopls/internal/lsp/source/api_json.go
diff --git a/internal/lsp/source/call_hierarchy.go b/gopls/internal/lsp/source/call_hierarchy.go
similarity index 98%
rename from internal/lsp/source/call_hierarchy.go
rename to gopls/internal/lsp/source/call_hierarchy.go
index 4e7daf0..298c712 100644
--- a/internal/lsp/source/call_hierarchy.go
+++ b/gopls/internal/lsp/source/call_hierarchy.go
@@ -15,8 +15,8 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/code_lens.go b/gopls/internal/lsp/source/code_lens.go
similarity index 98%
rename from internal/lsp/source/code_lens.go
rename to gopls/internal/lsp/source/code_lens.go
index 85a0a2f..6f1d720 100644
--- a/internal/lsp/source/code_lens.go
+++ b/gopls/internal/lsp/source/code_lens.go
@@ -13,8 +13,8 @@
"regexp"
"strings"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/comment.go b/gopls/internal/lsp/source/comment.go
similarity index 100%
rename from internal/lsp/source/comment.go
rename to gopls/internal/lsp/source/comment.go
diff --git a/internal/lsp/source/comment_go118.go b/gopls/internal/lsp/source/comment_go118.go
similarity index 100%
rename from internal/lsp/source/comment_go118.go
rename to gopls/internal/lsp/source/comment_go118.go
diff --git a/internal/lsp/source/comment_go118_test.go b/gopls/internal/lsp/source/comment_go118_test.go
similarity index 100%
rename from internal/lsp/source/comment_go118_test.go
rename to gopls/internal/lsp/source/comment_go118_test.go
diff --git a/internal/lsp/source/completion/builtin.go b/gopls/internal/lsp/source/completion/builtin.go
similarity index 100%
rename from internal/lsp/source/completion/builtin.go
rename to gopls/internal/lsp/source/completion/builtin.go
diff --git a/internal/lsp/source/completion/completion.go b/gopls/internal/lsp/source/completion/completion.go
similarity index 99%
rename from internal/lsp/source/completion/completion.go
rename to gopls/internal/lsp/source/completion/completion.go
index e230fc5..2ffd9bf 100644
--- a/internal/lsp/source/completion/completion.go
+++ b/gopls/internal/lsp/source/completion/completion.go
@@ -25,10 +25,10 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/fuzzy"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/fuzzy"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/completion/deep_completion.go b/gopls/internal/lsp/source/completion/deep_completion.go
similarity index 100%
rename from internal/lsp/source/completion/deep_completion.go
rename to gopls/internal/lsp/source/completion/deep_completion.go
diff --git a/internal/lsp/source/completion/deep_completion_test.go b/gopls/internal/lsp/source/completion/deep_completion_test.go
similarity index 100%
rename from internal/lsp/source/completion/deep_completion_test.go
rename to gopls/internal/lsp/source/completion/deep_completion_test.go
diff --git a/internal/lsp/source/completion/definition.go b/gopls/internal/lsp/source/completion/definition.go
similarity index 95%
rename from internal/lsp/source/completion/definition.go
rename to gopls/internal/lsp/source/completion/definition.go
index 7644fc4..e61a9fa 100644
--- a/internal/lsp/source/completion/definition.go
+++ b/gopls/internal/lsp/source/completion/definition.go
@@ -12,9 +12,9 @@
"unicode"
"unicode/utf8"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/completion/format.go b/gopls/internal/lsp/source/completion/format.go
similarity index 97%
rename from internal/lsp/source/completion/format.go
rename to gopls/internal/lsp/source/completion/format.go
index d34cee2..bcf523f 100644
--- a/internal/lsp/source/completion/format.go
+++ b/gopls/internal/lsp/source/completion/format.go
@@ -15,10 +15,10 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/completion/fuzz.go b/gopls/internal/lsp/source/completion/fuzz.go
similarity index 98%
rename from internal/lsp/source/completion/fuzz.go
rename to gopls/internal/lsp/source/completion/fuzz.go
index 92349ab..d7912ce 100644
--- a/internal/lsp/source/completion/fuzz.go
+++ b/gopls/internal/lsp/source/completion/fuzz.go
@@ -11,7 +11,7 @@
"go/types"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// golang/go#51089
diff --git a/internal/lsp/source/completion/keywords.go b/gopls/internal/lsp/source/completion/keywords.go
similarity index 97%
rename from internal/lsp/source/completion/keywords.go
rename to gopls/internal/lsp/source/completion/keywords.go
index bbf59b0..a068ca2 100644
--- a/internal/lsp/source/completion/keywords.go
+++ b/gopls/internal/lsp/source/completion/keywords.go
@@ -7,8 +7,8 @@
import (
"go/ast"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
const (
diff --git a/internal/lsp/source/completion/labels.go b/gopls/internal/lsp/source/completion/labels.go
similarity index 100%
rename from internal/lsp/source/completion/labels.go
rename to gopls/internal/lsp/source/completion/labels.go
diff --git a/internal/lsp/source/completion/literal.go b/gopls/internal/lsp/source/completion/literal.go
similarity index 98%
rename from internal/lsp/source/completion/literal.go
rename to gopls/internal/lsp/source/completion/literal.go
index 139ec17..8f0e43c 100644
--- a/internal/lsp/source/completion/literal.go
+++ b/gopls/internal/lsp/source/completion/literal.go
@@ -12,9 +12,9 @@
"unicode"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/completion/package.go b/gopls/internal/lsp/source/completion/package.go
similarity index 97%
rename from internal/lsp/source/completion/package.go
rename to gopls/internal/lsp/source/completion/package.go
index 566d8ee..1f3649b 100644
--- a/internal/lsp/source/completion/package.go
+++ b/gopls/internal/lsp/source/completion/package.go
@@ -18,11 +18,11 @@
"strings"
"unicode"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/fuzzy"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/internal/fuzzy"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/completion/package_test.go b/gopls/internal/lsp/source/completion/package_test.go
similarity index 100%
rename from internal/lsp/source/completion/package_test.go
rename to gopls/internal/lsp/source/completion/package_test.go
diff --git a/internal/lsp/source/completion/postfix_snippets.go b/gopls/internal/lsp/source/completion/postfix_snippets.go
similarity index 98%
rename from internal/lsp/source/completion/postfix_snippets.go
rename to gopls/internal/lsp/source/completion/postfix_snippets.go
index aa8454f..414db42 100644
--- a/internal/lsp/source/completion/postfix_snippets.go
+++ b/gopls/internal/lsp/source/completion/postfix_snippets.go
@@ -18,9 +18,9 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// Postfix snippets are artificial methods that allow the user to
diff --git a/internal/lsp/source/completion/printf.go b/gopls/internal/lsp/source/completion/printf.go
similarity index 100%
rename from internal/lsp/source/completion/printf.go
rename to gopls/internal/lsp/source/completion/printf.go
diff --git a/internal/lsp/source/completion/printf_test.go b/gopls/internal/lsp/source/completion/printf_test.go
similarity index 100%
rename from internal/lsp/source/completion/printf_test.go
rename to gopls/internal/lsp/source/completion/printf_test.go
diff --git a/internal/lsp/source/completion/snippet.go b/gopls/internal/lsp/source/completion/snippet.go
similarity index 98%
rename from internal/lsp/source/completion/snippet.go
rename to gopls/internal/lsp/source/completion/snippet.go
index 72c351f..1a9ebb1 100644
--- a/internal/lsp/source/completion/snippet.go
+++ b/gopls/internal/lsp/source/completion/snippet.go
@@ -7,7 +7,7 @@
import (
"go/ast"
- "golang.org/x/tools/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
)
// structFieldSnippets calculates the snippet for struct literal field names.
diff --git a/internal/lsp/source/completion/statements.go b/gopls/internal/lsp/source/completion/statements.go
similarity index 98%
rename from internal/lsp/source/completion/statements.go
rename to gopls/internal/lsp/source/completion/statements.go
index d8e30a2..b43629c 100644
--- a/internal/lsp/source/completion/statements.go
+++ b/gopls/internal/lsp/source/completion/statements.go
@@ -10,9 +10,9 @@
"go/token"
"go/types"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/snippet"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/snippet"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// addStatementCandidates adds full statement completion candidates
diff --git a/internal/lsp/source/completion/util.go b/gopls/internal/lsp/source/completion/util.go
similarity index 98%
rename from internal/lsp/source/completion/util.go
rename to gopls/internal/lsp/source/completion/util.go
index e0a264b..f40c0b3 100644
--- a/internal/lsp/source/completion/util.go
+++ b/gopls/internal/lsp/source/completion/util.go
@@ -10,9 +10,9 @@
"go/types"
"golang.org/x/tools/go/types/typeutil"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/completion/util_test.go b/gopls/internal/lsp/source/completion/util_test.go
similarity index 100%
rename from internal/lsp/source/completion/util_test.go
rename to gopls/internal/lsp/source/completion/util_test.go
diff --git a/internal/lsp/source/diagnostics.go b/gopls/internal/lsp/source/diagnostics.go
similarity index 97%
rename from internal/lsp/source/diagnostics.go
rename to gopls/internal/lsp/source/diagnostics.go
index e393c2f..faf4919 100644
--- a/internal/lsp/source/diagnostics.go
+++ b/gopls/internal/lsp/source/diagnostics.go
@@ -7,7 +7,7 @@
import (
"context"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/extract.go b/gopls/internal/lsp/source/extract.go
similarity index 99%
rename from internal/lsp/source/extract.go
rename to gopls/internal/lsp/source/extract.go
index a4e0a14..b09ed9e 100644
--- a/internal/lsp/source/extract.go
+++ b/gopls/internal/lsp/source/extract.go
@@ -18,8 +18,8 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/analysisinternal"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/fix.go b/gopls/internal/lsp/source/fix.go
similarity index 95%
rename from internal/lsp/source/fix.go
rename to gopls/internal/lsp/source/fix.go
index dce279e..bce2536 100644
--- a/internal/lsp/source/fix.go
+++ b/gopls/internal/lsp/source/fix.go
@@ -12,10 +12,10 @@
"go/types"
"golang.org/x/tools/go/analysis"
- "golang.org/x/tools/internal/lsp/analysis/fillstruct"
- "golang.org/x/tools/internal/lsp/analysis/undeclaredname"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/fillstruct"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/undeclaredname"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/folding_range.go b/gopls/internal/lsp/source/folding_range.go
similarity index 98%
rename from internal/lsp/source/folding_range.go
rename to gopls/internal/lsp/source/folding_range.go
index b70cb4d..157dff2 100644
--- a/internal/lsp/source/folding_range.go
+++ b/gopls/internal/lsp/source/folding_range.go
@@ -11,7 +11,7 @@
"sort"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// FoldingRangeInfo holds range and kind info of folding for an ast.Node
diff --git a/internal/lsp/source/format.go b/gopls/internal/lsp/source/format.go
similarity index 98%
rename from internal/lsp/source/format.go
rename to gopls/internal/lsp/source/format.go
index 1dd914e..e230117 100644
--- a/internal/lsp/source/format.go
+++ b/gopls/internal/lsp/source/format.go
@@ -18,10 +18,10 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
)
// Format formats a file with a given range.
diff --git a/internal/lsp/source/format_test.go b/gopls/internal/lsp/source/format_test.go
similarity index 96%
rename from internal/lsp/source/format_test.go
rename to gopls/internal/lsp/source/format_test.go
index ab12012..fac80c3 100644
--- a/internal/lsp/source/format_test.go
+++ b/gopls/internal/lsp/source/format_test.go
@@ -8,7 +8,7 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
func TestImportPrefix(t *testing.T) {
diff --git a/internal/lsp/source/gc_annotations.go b/gopls/internal/lsp/source/gc_annotations.go
similarity index 98%
rename from internal/lsp/source/gc_annotations.go
rename to gopls/internal/lsp/source/gc_annotations.go
index 3616bbf..111cd4f 100644
--- a/internal/lsp/source/gc_annotations.go
+++ b/gopls/internal/lsp/source/gc_annotations.go
@@ -15,7 +15,7 @@
"strings"
"golang.org/x/tools/internal/gocommand"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/highlight.go b/gopls/internal/lsp/source/highlight.go
similarity index 99%
rename from internal/lsp/source/highlight.go
rename to gopls/internal/lsp/source/highlight.go
index 4be078b..0cde628 100644
--- a/internal/lsp/source/highlight.go
+++ b/gopls/internal/lsp/source/highlight.go
@@ -14,7 +14,7 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func Highlight(ctx context.Context, snapshot Snapshot, fh FileHandle, position protocol.Position) ([]protocol.Range, error) {
diff --git a/internal/lsp/source/hover.go b/gopls/internal/lsp/source/hover.go
similarity index 99%
rename from internal/lsp/source/hover.go
rename to gopls/internal/lsp/source/hover.go
index 9ab1023..74b7e57 100644
--- a/internal/lsp/source/hover.go
+++ b/gopls/internal/lsp/source/hover.go
@@ -23,9 +23,9 @@
"golang.org/x/text/unicode/runenames"
"golang.org/x/tools/go/types/typeutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/identifier.go b/gopls/internal/lsp/source/identifier.go
similarity index 98%
rename from internal/lsp/source/identifier.go
rename to gopls/internal/lsp/source/identifier.go
index 5378ae8..9ab3fe7 100644
--- a/internal/lsp/source/identifier.go
+++ b/gopls/internal/lsp/source/identifier.go
@@ -17,9 +17,9 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/identifier_test.go b/gopls/internal/lsp/source/identifier_test.go
similarity index 100%
rename from internal/lsp/source/identifier_test.go
rename to gopls/internal/lsp/source/identifier_test.go
diff --git a/internal/lsp/source/implementation.go b/gopls/internal/lsp/source/implementation.go
similarity index 98%
rename from internal/lsp/source/implementation.go
rename to gopls/internal/lsp/source/implementation.go
index 39a9289..f612e35 100644
--- a/internal/lsp/source/implementation.go
+++ b/gopls/internal/lsp/source/implementation.go
@@ -14,8 +14,8 @@
"sort"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/inlay_hint.go b/gopls/internal/lsp/source/inlay_hint.go
similarity index 98%
rename from internal/lsp/source/inlay_hint.go
rename to gopls/internal/lsp/source/inlay_hint.go
index 4fb1cfb..9d9152f 100644
--- a/internal/lsp/source/inlay_hint.go
+++ b/gopls/internal/lsp/source/inlay_hint.go
@@ -14,8 +14,8 @@
"strings"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/lsppos"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/lsppos"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/known_packages.go b/gopls/internal/lsp/source/known_packages.go
similarity index 100%
rename from internal/lsp/source/known_packages.go
rename to gopls/internal/lsp/source/known_packages.go
diff --git a/internal/lsp/source/options.go b/gopls/internal/lsp/source/options.go
similarity index 97%
rename from internal/lsp/source/options.go
rename to gopls/internal/lsp/source/options.go
index 984f228..c904340 100644
--- a/internal/lsp/source/options.go
+++ b/gopls/internal/lsp/source/options.go
@@ -50,24 +50,24 @@
"golang.org/x/tools/go/analysis/passes/unusedresult"
"golang.org/x/tools/go/analysis/passes/unusedwrite"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/analysis/embeddirective"
- "golang.org/x/tools/internal/lsp/analysis/fillreturns"
- "golang.org/x/tools/internal/lsp/analysis/fillstruct"
- "golang.org/x/tools/internal/lsp/analysis/infertypeargs"
- "golang.org/x/tools/internal/lsp/analysis/nonewvars"
- "golang.org/x/tools/internal/lsp/analysis/noresultvalues"
- "golang.org/x/tools/internal/lsp/analysis/simplifycompositelit"
- "golang.org/x/tools/internal/lsp/analysis/simplifyrange"
- "golang.org/x/tools/internal/lsp/analysis/simplifyslice"
- "golang.org/x/tools/internal/lsp/analysis/stubmethods"
- "golang.org/x/tools/internal/lsp/analysis/undeclaredname"
- "golang.org/x/tools/internal/lsp/analysis/unusedparams"
- "golang.org/x/tools/internal/lsp/analysis/unusedvariable"
- "golang.org/x/tools/internal/lsp/analysis/useany"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/embeddirective"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/fillreturns"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/fillstruct"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/infertypeargs"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/nonewvars"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/noresultvalues"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifycompositelit"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifyrange"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/simplifyslice"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/stubmethods"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/undeclaredname"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/unusedparams"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/unusedvariable"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/useany"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
var (
diff --git a/internal/lsp/source/options_test.go b/gopls/internal/lsp/source/options_test.go
similarity index 100%
rename from internal/lsp/source/options_test.go
rename to gopls/internal/lsp/source/options_test.go
diff --git a/internal/lsp/source/references.go b/gopls/internal/lsp/source/references.go
similarity index 98%
rename from internal/lsp/source/references.go
rename to gopls/internal/lsp/source/references.go
index 2bbdc07..eacadab 100644
--- a/internal/lsp/source/references.go
+++ b/gopls/internal/lsp/source/references.go
@@ -16,8 +16,8 @@
"strconv"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/rename.go b/gopls/internal/lsp/source/rename.go
similarity index 98%
rename from internal/lsp/source/rename.go
rename to gopls/internal/lsp/source/rename.go
index 85d7c12..e31dfd5 100644
--- a/internal/lsp/source/rename.go
+++ b/gopls/internal/lsp/source/rename.go
@@ -18,8 +18,8 @@
"golang.org/x/tools/go/types/typeutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/refactor/satisfy"
)
diff --git a/internal/lsp/source/rename_check.go b/gopls/internal/lsp/source/rename_check.go
similarity index 100%
rename from internal/lsp/source/rename_check.go
rename to gopls/internal/lsp/source/rename_check.go
diff --git a/internal/lsp/source/signature_help.go b/gopls/internal/lsp/source/signature_help.go
similarity index 98%
rename from internal/lsp/source/signature_help.go
rename to gopls/internal/lsp/source/signature_help.go
index 5b087e8..f1a4bac 100644
--- a/internal/lsp/source/signature_help.go
+++ b/gopls/internal/lsp/source/signature_help.go
@@ -13,7 +13,7 @@
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func SignatureHelp(ctx context.Context, snapshot Snapshot, fh FileHandle, position protocol.Position) (*protocol.SignatureInformation, int, error) {
diff --git a/internal/lsp/source/source_test.go b/gopls/internal/lsp/source/source_test.go
similarity index 98%
rename from internal/lsp/source/source_test.go
rename to gopls/internal/lsp/source/source_test.go
index 761b910..25a642a 100644
--- a/internal/lsp/source/source_test.go
+++ b/gopls/internal/lsp/source/source_test.go
@@ -15,15 +15,15 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/fuzzy"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/source/completion"
- "golang.org/x/tools/internal/lsp/tests"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/fuzzy"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source/completion"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/source/stub.go b/gopls/internal/lsp/source/stub.go
similarity index 98%
rename from internal/lsp/source/stub.go
rename to gopls/internal/lsp/source/stub.go
index 0d19817..9a17802 100644
--- a/internal/lsp/source/stub.go
+++ b/gopls/internal/lsp/source/stub.go
@@ -17,9 +17,9 @@
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/ast/astutil"
- "golang.org/x/tools/internal/lsp/analysis/stubmethods"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/safetoken"
+ "golang.org/x/tools/gopls/internal/lsp/analysis/stubmethods"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/safetoken"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/symbols.go b/gopls/internal/lsp/source/symbols.go
similarity index 98%
rename from internal/lsp/source/symbols.go
rename to gopls/internal/lsp/source/symbols.go
index 074b24e..802de37 100644
--- a/internal/lsp/source/symbols.go
+++ b/gopls/internal/lsp/source/symbols.go
@@ -11,7 +11,7 @@
"go/types"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func DocumentSymbols(ctx context.Context, snapshot Snapshot, fh FileHandle) ([]protocol.DocumentSymbol, error) {
diff --git a/internal/lsp/source/types_format.go b/gopls/internal/lsp/source/types_format.go
similarity index 98%
rename from internal/lsp/source/types_format.go
rename to gopls/internal/lsp/source/types_format.go
index 756d02d..036c8c7 100644
--- a/internal/lsp/source/types_format.go
+++ b/gopls/internal/lsp/source/types_format.go
@@ -16,8 +16,8 @@
"strings"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/typeparams"
)
diff --git a/internal/lsp/source/util.go b/gopls/internal/lsp/source/util.go
similarity index 99%
rename from internal/lsp/source/util.go
rename to gopls/internal/lsp/source/util.go
index 78448af..da9c3b5 100644
--- a/internal/lsp/source/util.go
+++ b/gopls/internal/lsp/source/util.go
@@ -18,8 +18,8 @@
"strings"
"golang.org/x/mod/modfile"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/bug"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/util_test.go b/gopls/internal/lsp/source/util_test.go
similarity index 97%
rename from internal/lsp/source/util_test.go
rename to gopls/internal/lsp/source/util_test.go
index fe505e4..e0b2a29 100644
--- a/internal/lsp/source/util_test.go
+++ b/gopls/internal/lsp/source/util_test.go
@@ -10,7 +10,7 @@
"go/token"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/view.go b/gopls/internal/lsp/source/view.go
similarity index 99%
rename from internal/lsp/source/view.go
rename to gopls/internal/lsp/source/view.go
index 498299e..8bf0344 100644
--- a/internal/lsp/source/view.go
+++ b/gopls/internal/lsp/source/view.go
@@ -23,8 +23,8 @@
"golang.org/x/tools/go/packages"
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/imports"
- "golang.org/x/tools/internal/lsp/progress"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/progress"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/workspace_symbol.go b/gopls/internal/lsp/source/workspace_symbol.go
similarity index 99%
rename from internal/lsp/source/workspace_symbol.go
rename to gopls/internal/lsp/source/workspace_symbol.go
index e9da569..8fe2388 100644
--- a/internal/lsp/source/workspace_symbol.go
+++ b/gopls/internal/lsp/source/workspace_symbol.go
@@ -17,8 +17,8 @@
"unicode"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/fuzzy"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/internal/fuzzy"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/source/workspace_symbol_test.go b/gopls/internal/lsp/source/workspace_symbol_test.go
similarity index 100%
rename from internal/lsp/source/workspace_symbol_test.go
rename to gopls/internal/lsp/source/workspace_symbol_test.go
diff --git a/internal/lsp/symbols.go b/gopls/internal/lsp/symbols.go
similarity index 89%
rename from internal/lsp/symbols.go
rename to gopls/internal/lsp/symbols.go
index f04e457..0cc0b33 100644
--- a/internal/lsp/symbols.go
+++ b/gopls/internal/lsp/symbols.go
@@ -8,10 +8,10 @@
"context"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/template"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/template"
)
func (s *Server) documentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error) {
diff --git a/internal/lsp/template/completion.go b/gopls/internal/lsp/template/completion.go
similarity index 98%
rename from internal/lsp/template/completion.go
rename to gopls/internal/lsp/template/completion.go
index 13dbdf1..7040081 100644
--- a/internal/lsp/template/completion.go
+++ b/gopls/internal/lsp/template/completion.go
@@ -12,8 +12,8 @@
"go/token"
"strings"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// information needed for completion
diff --git a/internal/lsp/template/completion_test.go b/gopls/internal/lsp/template/completion_test.go
similarity index 98%
rename from internal/lsp/template/completion_test.go
rename to gopls/internal/lsp/template/completion_test.go
index bfcdb53..0fc4788 100644
--- a/internal/lsp/template/completion_test.go
+++ b/gopls/internal/lsp/template/completion_test.go
@@ -10,7 +10,7 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
func init() {
diff --git a/internal/lsp/template/highlight.go b/gopls/internal/lsp/template/highlight.go
similarity index 96%
rename from internal/lsp/template/highlight.go
rename to gopls/internal/lsp/template/highlight.go
index a45abaf..1e06b92 100644
--- a/internal/lsp/template/highlight.go
+++ b/gopls/internal/lsp/template/highlight.go
@@ -9,8 +9,8 @@
"fmt"
"regexp"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Highlight(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle, loc protocol.Position) ([]protocol.DocumentHighlight, error) {
diff --git a/internal/lsp/template/implementations.go b/gopls/internal/lsp/template/implementations.go
similarity index 98%
rename from internal/lsp/template/implementations.go
rename to gopls/internal/lsp/template/implementations.go
index cda3e7e..3d14f6b 100644
--- a/internal/lsp/template/implementations.go
+++ b/gopls/internal/lsp/template/implementations.go
@@ -11,8 +11,8 @@
"strconv"
"time"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/template/parse.go b/gopls/internal/lsp/template/parse.go
similarity index 98%
rename from internal/lsp/template/parse.go
rename to gopls/internal/lsp/template/parse.go
index 181a522..f2e4f25 100644
--- a/internal/lsp/template/parse.go
+++ b/gopls/internal/lsp/template/parse.go
@@ -25,8 +25,8 @@
"unicode/utf8"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/template/parse_test.go b/gopls/internal/lsp/template/parse_test.go
similarity index 100%
rename from internal/lsp/template/parse_test.go
rename to gopls/internal/lsp/template/parse_test.go
diff --git a/internal/lsp/template/symbols.go b/gopls/internal/lsp/template/symbols.go
similarity index 98%
rename from internal/lsp/template/symbols.go
rename to gopls/internal/lsp/template/symbols.go
index ce5a1e7..24f9604 100644
--- a/internal/lsp/template/symbols.go
+++ b/gopls/internal/lsp/template/symbols.go
@@ -12,8 +12,8 @@
"unicode/utf8"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
// in local coordinates, to be translated to protocol.DocumentSymbol
diff --git a/internal/lsp/testdata/%percent/perc%ent.go b/gopls/internal/lsp/testdata/%percent/perc%ent.go
similarity index 100%
rename from internal/lsp/testdata/%percent/perc%ent.go
rename to gopls/internal/lsp/testdata/%percent/perc%ent.go
diff --git a/internal/lsp/testdata/addimport/addimport.go.golden b/gopls/internal/lsp/testdata/addimport/addimport.go.golden
similarity index 100%
rename from internal/lsp/testdata/addimport/addimport.go.golden
rename to gopls/internal/lsp/testdata/addimport/addimport.go.golden
diff --git a/internal/lsp/testdata/addimport/addimport.go.in b/gopls/internal/lsp/testdata/addimport/addimport.go.in
similarity index 100%
rename from internal/lsp/testdata/addimport/addimport.go.in
rename to gopls/internal/lsp/testdata/addimport/addimport.go.in
diff --git a/internal/lsp/testdata/address/address.go b/gopls/internal/lsp/testdata/address/address.go
similarity index 100%
rename from internal/lsp/testdata/address/address.go
rename to gopls/internal/lsp/testdata/address/address.go
diff --git a/internal/lsp/testdata/analyzer/bad_test.go b/gopls/internal/lsp/testdata/analyzer/bad_test.go
similarity index 100%
rename from internal/lsp/testdata/analyzer/bad_test.go
rename to gopls/internal/lsp/testdata/analyzer/bad_test.go
diff --git a/internal/lsp/testdata/anon/anon.go.in b/gopls/internal/lsp/testdata/anon/anon.go.in
similarity index 100%
rename from internal/lsp/testdata/anon/anon.go.in
rename to gopls/internal/lsp/testdata/anon/anon.go.in
diff --git a/internal/lsp/testdata/append/append.go b/gopls/internal/lsp/testdata/append/append.go
similarity index 100%
rename from internal/lsp/testdata/append/append.go
rename to gopls/internal/lsp/testdata/append/append.go
diff --git a/internal/lsp/testdata/append/append2.go.in b/gopls/internal/lsp/testdata/append/append2.go.in
similarity index 100%
rename from internal/lsp/testdata/append/append2.go.in
rename to gopls/internal/lsp/testdata/append/append2.go.in
diff --git a/internal/lsp/testdata/arraytype/array_type.go.in b/gopls/internal/lsp/testdata/arraytype/array_type.go.in
similarity index 100%
rename from internal/lsp/testdata/arraytype/array_type.go.in
rename to gopls/internal/lsp/testdata/arraytype/array_type.go.in
diff --git a/internal/lsp/testdata/assign/assign.go.in b/gopls/internal/lsp/testdata/assign/assign.go.in
similarity index 100%
rename from internal/lsp/testdata/assign/assign.go.in
rename to gopls/internal/lsp/testdata/assign/assign.go.in
diff --git a/internal/lsp/testdata/assign/internal/secret/secret.go b/gopls/internal/lsp/testdata/assign/internal/secret/secret.go
similarity index 100%
rename from internal/lsp/testdata/assign/internal/secret/secret.go
rename to gopls/internal/lsp/testdata/assign/internal/secret/secret.go
diff --git a/internal/lsp/testdata/bad/bad0.go b/gopls/internal/lsp/testdata/bad/bad0.go
similarity index 100%
rename from internal/lsp/testdata/bad/bad0.go
rename to gopls/internal/lsp/testdata/bad/bad0.go
diff --git a/internal/lsp/testdata/bad/bad1.go b/gopls/internal/lsp/testdata/bad/bad1.go
similarity index 100%
rename from internal/lsp/testdata/bad/bad1.go
rename to gopls/internal/lsp/testdata/bad/bad1.go
diff --git a/internal/lsp/testdata/badstmt/badstmt.go.in b/gopls/internal/lsp/testdata/badstmt/badstmt.go.in
similarity index 100%
rename from internal/lsp/testdata/badstmt/badstmt.go.in
rename to gopls/internal/lsp/testdata/badstmt/badstmt.go.in
diff --git a/internal/lsp/testdata/badstmt/badstmt_2.go.in b/gopls/internal/lsp/testdata/badstmt/badstmt_2.go.in
similarity index 100%
rename from internal/lsp/testdata/badstmt/badstmt_2.go.in
rename to gopls/internal/lsp/testdata/badstmt/badstmt_2.go.in
diff --git a/internal/lsp/testdata/badstmt/badstmt_3.go.in b/gopls/internal/lsp/testdata/badstmt/badstmt_3.go.in
similarity index 100%
rename from internal/lsp/testdata/badstmt/badstmt_3.go.in
rename to gopls/internal/lsp/testdata/badstmt/badstmt_3.go.in
diff --git a/internal/lsp/testdata/badstmt/badstmt_4.go.in b/gopls/internal/lsp/testdata/badstmt/badstmt_4.go.in
similarity index 100%
rename from internal/lsp/testdata/badstmt/badstmt_4.go.in
rename to gopls/internal/lsp/testdata/badstmt/badstmt_4.go.in
diff --git a/internal/lsp/testdata/bar/bar.go.in b/gopls/internal/lsp/testdata/bar/bar.go.in
similarity index 100%
rename from internal/lsp/testdata/bar/bar.go.in
rename to gopls/internal/lsp/testdata/bar/bar.go.in
diff --git a/internal/lsp/testdata/basiclit/basiclit.go b/gopls/internal/lsp/testdata/basiclit/basiclit.go
similarity index 100%
rename from internal/lsp/testdata/basiclit/basiclit.go
rename to gopls/internal/lsp/testdata/basiclit/basiclit.go
diff --git a/internal/lsp/testdata/baz/baz.go.in b/gopls/internal/lsp/testdata/baz/baz.go.in
similarity index 100%
rename from internal/lsp/testdata/baz/baz.go.in
rename to gopls/internal/lsp/testdata/baz/baz.go.in
diff --git a/internal/lsp/testdata/builtins/builtin_args.go b/gopls/internal/lsp/testdata/builtins/builtin_args.go
similarity index 100%
rename from internal/lsp/testdata/builtins/builtin_args.go
rename to gopls/internal/lsp/testdata/builtins/builtin_args.go
diff --git a/internal/lsp/testdata/builtins/builtin_types.go b/gopls/internal/lsp/testdata/builtins/builtin_types.go
similarity index 100%
rename from internal/lsp/testdata/builtins/builtin_types.go
rename to gopls/internal/lsp/testdata/builtins/builtin_types.go
diff --git a/internal/lsp/testdata/builtins/builtins.go b/gopls/internal/lsp/testdata/builtins/builtins.go
similarity index 100%
rename from internal/lsp/testdata/builtins/builtins.go
rename to gopls/internal/lsp/testdata/builtins/builtins.go
diff --git a/internal/lsp/testdata/builtins/constants.go b/gopls/internal/lsp/testdata/builtins/constants.go
similarity index 100%
rename from internal/lsp/testdata/builtins/constants.go
rename to gopls/internal/lsp/testdata/builtins/constants.go
diff --git a/internal/lsp/testdata/callhierarchy/callhierarchy.go b/gopls/internal/lsp/testdata/callhierarchy/callhierarchy.go
similarity index 100%
rename from internal/lsp/testdata/callhierarchy/callhierarchy.go
rename to gopls/internal/lsp/testdata/callhierarchy/callhierarchy.go
diff --git a/internal/lsp/testdata/callhierarchy/incoming/incoming.go b/gopls/internal/lsp/testdata/callhierarchy/incoming/incoming.go
similarity index 100%
rename from internal/lsp/testdata/callhierarchy/incoming/incoming.go
rename to gopls/internal/lsp/testdata/callhierarchy/incoming/incoming.go
diff --git a/internal/lsp/testdata/callhierarchy/outgoing/outgoing.go b/gopls/internal/lsp/testdata/callhierarchy/outgoing/outgoing.go
similarity index 100%
rename from internal/lsp/testdata/callhierarchy/outgoing/outgoing.go
rename to gopls/internal/lsp/testdata/callhierarchy/outgoing/outgoing.go
diff --git a/internal/lsp/testdata/casesensitive/casesensitive.go b/gopls/internal/lsp/testdata/casesensitive/casesensitive.go
similarity index 100%
rename from internal/lsp/testdata/casesensitive/casesensitive.go
rename to gopls/internal/lsp/testdata/casesensitive/casesensitive.go
diff --git a/internal/lsp/testdata/cast/cast.go.in b/gopls/internal/lsp/testdata/cast/cast.go.in
similarity index 100%
rename from internal/lsp/testdata/cast/cast.go.in
rename to gopls/internal/lsp/testdata/cast/cast.go.in
diff --git a/internal/lsp/testdata/cgo/declarecgo.go b/gopls/internal/lsp/testdata/cgo/declarecgo.go
similarity index 100%
rename from internal/lsp/testdata/cgo/declarecgo.go
rename to gopls/internal/lsp/testdata/cgo/declarecgo.go
diff --git a/internal/lsp/testdata/cgo/declarecgo.go.golden b/gopls/internal/lsp/testdata/cgo/declarecgo.go.golden
similarity index 100%
rename from internal/lsp/testdata/cgo/declarecgo.go.golden
rename to gopls/internal/lsp/testdata/cgo/declarecgo.go.golden
diff --git a/internal/lsp/testdata/cgo/declarecgo_nocgo.go b/gopls/internal/lsp/testdata/cgo/declarecgo_nocgo.go
similarity index 100%
rename from internal/lsp/testdata/cgo/declarecgo_nocgo.go
rename to gopls/internal/lsp/testdata/cgo/declarecgo_nocgo.go
diff --git a/internal/lsp/testdata/cgoimport/usecgo.go.golden b/gopls/internal/lsp/testdata/cgoimport/usecgo.go.golden
similarity index 100%
rename from internal/lsp/testdata/cgoimport/usecgo.go.golden
rename to gopls/internal/lsp/testdata/cgoimport/usecgo.go.golden
diff --git a/internal/lsp/testdata/cgoimport/usecgo.go.in b/gopls/internal/lsp/testdata/cgoimport/usecgo.go.in
similarity index 100%
rename from internal/lsp/testdata/cgoimport/usecgo.go.in
rename to gopls/internal/lsp/testdata/cgoimport/usecgo.go.in
diff --git a/internal/lsp/testdata/channel/channel.go b/gopls/internal/lsp/testdata/channel/channel.go
similarity index 100%
rename from internal/lsp/testdata/channel/channel.go
rename to gopls/internal/lsp/testdata/channel/channel.go
diff --git a/internal/lsp/testdata/codelens/codelens_test.go b/gopls/internal/lsp/testdata/codelens/codelens_test.go
similarity index 100%
rename from internal/lsp/testdata/codelens/codelens_test.go
rename to gopls/internal/lsp/testdata/codelens/codelens_test.go
diff --git a/internal/lsp/testdata/comment_completion/comment_completion.go.in b/gopls/internal/lsp/testdata/comment_completion/comment_completion.go.in
similarity index 100%
rename from internal/lsp/testdata/comment_completion/comment_completion.go.in
rename to gopls/internal/lsp/testdata/comment_completion/comment_completion.go.in
diff --git a/internal/lsp/testdata/complit/complit.go.in b/gopls/internal/lsp/testdata/complit/complit.go.in
similarity index 100%
rename from internal/lsp/testdata/complit/complit.go.in
rename to gopls/internal/lsp/testdata/complit/complit.go.in
diff --git a/internal/lsp/testdata/constant/constant.go b/gopls/internal/lsp/testdata/constant/constant.go
similarity index 100%
rename from internal/lsp/testdata/constant/constant.go
rename to gopls/internal/lsp/testdata/constant/constant.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_for.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_for.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_for.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_for.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_for_init.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_for_init.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_for_init.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_for_init.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_for_init_cond.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_for_init_cond.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_for_init_cond.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_for_init_cond.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_for_init_cond_post.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_for_init_cond_post.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_for_init_cond_post.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_for_init_cond_post.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_if.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_if.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_if.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_if.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_if_eof.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_if_eof.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_if_eof.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_if_eof.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_if_init.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_if_init.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_if_init.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_if_init.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_if_init_cond.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_if_init_cond.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_if_init_cond.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_if_init_cond.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_multiline_if.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_multiline_if.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_multiline_if.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_multiline_if.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_selector_1.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_selector_1.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_selector_1.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_selector_1.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_selector_2.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_selector_2.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_selector_2.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_selector_2.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_switch_init.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_switch_init.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_switch_init.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_switch_init.go
diff --git a/internal/lsp/testdata/danglingstmt/dangling_switch_init_tag.go b/gopls/internal/lsp/testdata/danglingstmt/dangling_switch_init_tag.go
similarity index 100%
rename from internal/lsp/testdata/danglingstmt/dangling_switch_init_tag.go
rename to gopls/internal/lsp/testdata/danglingstmt/dangling_switch_init_tag.go
diff --git a/internal/lsp/testdata/deep/deep.go b/gopls/internal/lsp/testdata/deep/deep.go
similarity index 100%
rename from internal/lsp/testdata/deep/deep.go
rename to gopls/internal/lsp/testdata/deep/deep.go
diff --git a/internal/lsp/testdata/errors/errors.go b/gopls/internal/lsp/testdata/errors/errors.go
similarity index 100%
rename from internal/lsp/testdata/errors/errors.go
rename to gopls/internal/lsp/testdata/errors/errors.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_args_returns.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_args_returns.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_args_returns.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_args_returns.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_args_returns.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_args_returns.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_args_returns.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_args_returns.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_basic.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_basic.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_basic.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_basic.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_basic.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_basic.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_basic.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_basic.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_basic_comment.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_basic_comment.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_basic_comment.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_issue_44813.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_issue_44813.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_redefine.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_redefine.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_redefine.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_redefine.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_redefine.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_redefine.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_redefine.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_redefine.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_basic.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_basic.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_basic.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_basic.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_basic_nonnested.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_complex.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_complex.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_complex.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_complex.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex_nonnested.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_func_lit_nonnested.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_init.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_init.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_init.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_init.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_init.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_init.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_init.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_init.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_return_init_nonnested.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_scope.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_scope.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_scope.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_scope.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_scope.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_scope.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_scope.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_scope.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_smart_initialization.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_smart_return.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_smart_return.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_smart_return.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_smart_return.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_smart_return.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_smart_return.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_smart_return.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_smart_return.go.golden
diff --git a/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go
diff --git a/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go.golden b/gopls/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_function/extract_unnecessary_param.go.golden
diff --git a/internal/lsp/testdata/extract/extract_method/extract_basic.go b/gopls/internal/lsp/testdata/extract/extract_method/extract_basic.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_method/extract_basic.go
rename to gopls/internal/lsp/testdata/extract/extract_method/extract_basic.go
diff --git a/internal/lsp/testdata/extract/extract_method/extract_basic.go.golden b/gopls/internal/lsp/testdata/extract/extract_method/extract_basic.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_method/extract_basic.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_method/extract_basic.go.golden
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go b/gopls/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go.golden b/gopls/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_basic_lit.go.golden
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_func_call.go b/gopls/internal/lsp/testdata/extract/extract_variable/extract_func_call.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_func_call.go
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_func_call.go
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_func_call.go.golden b/gopls/internal/lsp/testdata/extract/extract_variable/extract_func_call.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_func_call.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_func_call.go.golden
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_scope.go b/gopls/internal/lsp/testdata/extract/extract_variable/extract_scope.go
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_scope.go
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_scope.go
diff --git a/internal/lsp/testdata/extract/extract_variable/extract_scope.go.golden b/gopls/internal/lsp/testdata/extract/extract_variable/extract_scope.go.golden
similarity index 100%
rename from internal/lsp/testdata/extract/extract_variable/extract_scope.go.golden
rename to gopls/internal/lsp/testdata/extract/extract_variable/extract_scope.go.golden
diff --git a/internal/lsp/testdata/fieldlist/field_list.go b/gopls/internal/lsp/testdata/fieldlist/field_list.go
similarity index 100%
rename from internal/lsp/testdata/fieldlist/field_list.go
rename to gopls/internal/lsp/testdata/fieldlist/field_list.go
diff --git a/internal/lsp/testdata/fillstruct/a.go b/gopls/internal/lsp/testdata/fillstruct/a.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a.go
rename to gopls/internal/lsp/testdata/fillstruct/a.go
diff --git a/internal/lsp/testdata/fillstruct/a.go.golden b/gopls/internal/lsp/testdata/fillstruct/a.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/a.go.golden
diff --git a/internal/lsp/testdata/fillstruct/a2.go b/gopls/internal/lsp/testdata/fillstruct/a2.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a2.go
rename to gopls/internal/lsp/testdata/fillstruct/a2.go
diff --git a/internal/lsp/testdata/fillstruct/a2.go.golden b/gopls/internal/lsp/testdata/fillstruct/a2.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a2.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/a2.go.golden
diff --git a/internal/lsp/testdata/fillstruct/a3.go b/gopls/internal/lsp/testdata/fillstruct/a3.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a3.go
rename to gopls/internal/lsp/testdata/fillstruct/a3.go
diff --git a/internal/lsp/testdata/fillstruct/a3.go.golden b/gopls/internal/lsp/testdata/fillstruct/a3.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a3.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/a3.go.golden
diff --git a/internal/lsp/testdata/fillstruct/a4.go b/gopls/internal/lsp/testdata/fillstruct/a4.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a4.go
rename to gopls/internal/lsp/testdata/fillstruct/a4.go
diff --git a/internal/lsp/testdata/fillstruct/a4.go.golden b/gopls/internal/lsp/testdata/fillstruct/a4.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/a4.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/a4.go.golden
diff --git a/internal/lsp/testdata/fillstruct/data/a.go b/gopls/internal/lsp/testdata/fillstruct/data/a.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/data/a.go
rename to gopls/internal/lsp/testdata/fillstruct/data/a.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_anon.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_anon.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_anon.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_anon.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_anon.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_anon.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_anon.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_anon.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_nested.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_nested.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_nested.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_nested.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_nested.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_nested.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_nested.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_nested.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_package.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_package.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_package.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_package.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_package.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_package.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_package.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_package.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_partial.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_partial.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_partial.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_partial.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_spaces.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_spaces.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_spaces.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_spaces.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_spaces.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_spaces.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_spaces.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_spaces.go.golden
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_unsafe.go
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go
diff --git a/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/fill_struct_unsafe.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/fill_struct_unsafe.go.golden
diff --git a/internal/lsp/testdata/fillstruct/typeparams.go b/gopls/internal/lsp/testdata/fillstruct/typeparams.go
similarity index 100%
rename from internal/lsp/testdata/fillstruct/typeparams.go
rename to gopls/internal/lsp/testdata/fillstruct/typeparams.go
diff --git a/internal/lsp/testdata/fillstruct/typeparams.go.golden b/gopls/internal/lsp/testdata/fillstruct/typeparams.go.golden
similarity index 100%
rename from internal/lsp/testdata/fillstruct/typeparams.go.golden
rename to gopls/internal/lsp/testdata/fillstruct/typeparams.go.golden
diff --git a/internal/lsp/testdata/folding/a.go b/gopls/internal/lsp/testdata/folding/a.go
similarity index 100%
rename from internal/lsp/testdata/folding/a.go
rename to gopls/internal/lsp/testdata/folding/a.go
diff --git a/internal/lsp/testdata/folding/a.go.golden b/gopls/internal/lsp/testdata/folding/a.go.golden
similarity index 100%
rename from internal/lsp/testdata/folding/a.go.golden
rename to gopls/internal/lsp/testdata/folding/a.go.golden
diff --git a/internal/lsp/testdata/folding/bad.go.golden b/gopls/internal/lsp/testdata/folding/bad.go.golden
similarity index 100%
rename from internal/lsp/testdata/folding/bad.go.golden
rename to gopls/internal/lsp/testdata/folding/bad.go.golden
diff --git a/internal/lsp/testdata/folding/bad.go.in b/gopls/internal/lsp/testdata/folding/bad.go.in
similarity index 100%
rename from internal/lsp/testdata/folding/bad.go.in
rename to gopls/internal/lsp/testdata/folding/bad.go.in
diff --git a/internal/lsp/testdata/foo/foo.go b/gopls/internal/lsp/testdata/foo/foo.go
similarity index 100%
rename from internal/lsp/testdata/foo/foo.go
rename to gopls/internal/lsp/testdata/foo/foo.go
diff --git a/internal/lsp/testdata/format/bad_format.go.golden b/gopls/internal/lsp/testdata/format/bad_format.go.golden
similarity index 100%
rename from internal/lsp/testdata/format/bad_format.go.golden
rename to gopls/internal/lsp/testdata/format/bad_format.go.golden
diff --git a/internal/lsp/testdata/format/bad_format.go.in b/gopls/internal/lsp/testdata/format/bad_format.go.in
similarity index 100%
rename from internal/lsp/testdata/format/bad_format.go.in
rename to gopls/internal/lsp/testdata/format/bad_format.go.in
diff --git a/internal/lsp/testdata/format/good_format.go b/gopls/internal/lsp/testdata/format/good_format.go
similarity index 100%
rename from internal/lsp/testdata/format/good_format.go
rename to gopls/internal/lsp/testdata/format/good_format.go
diff --git a/internal/lsp/testdata/format/good_format.go.golden b/gopls/internal/lsp/testdata/format/good_format.go.golden
similarity index 100%
rename from internal/lsp/testdata/format/good_format.go.golden
rename to gopls/internal/lsp/testdata/format/good_format.go.golden
diff --git a/internal/lsp/testdata/format/newline_format.go.golden b/gopls/internal/lsp/testdata/format/newline_format.go.golden
similarity index 100%
rename from internal/lsp/testdata/format/newline_format.go.golden
rename to gopls/internal/lsp/testdata/format/newline_format.go.golden
diff --git a/internal/lsp/testdata/format/newline_format.go.in b/gopls/internal/lsp/testdata/format/newline_format.go.in
similarity index 100%
rename from internal/lsp/testdata/format/newline_format.go.in
rename to gopls/internal/lsp/testdata/format/newline_format.go.in
diff --git a/internal/lsp/testdata/format/one_line.go.golden b/gopls/internal/lsp/testdata/format/one_line.go.golden
similarity index 100%
rename from internal/lsp/testdata/format/one_line.go.golden
rename to gopls/internal/lsp/testdata/format/one_line.go.golden
diff --git a/internal/lsp/testdata/format/one_line.go.in b/gopls/internal/lsp/testdata/format/one_line.go.in
similarity index 100%
rename from internal/lsp/testdata/format/one_line.go.in
rename to gopls/internal/lsp/testdata/format/one_line.go.in
diff --git a/internal/lsp/testdata/func_rank/func_rank.go.in b/gopls/internal/lsp/testdata/func_rank/func_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/func_rank/func_rank.go.in
rename to gopls/internal/lsp/testdata/func_rank/func_rank.go.in
diff --git a/internal/lsp/testdata/funcsig/func_sig.go b/gopls/internal/lsp/testdata/funcsig/func_sig.go
similarity index 100%
rename from internal/lsp/testdata/funcsig/func_sig.go
rename to gopls/internal/lsp/testdata/funcsig/func_sig.go
diff --git a/internal/lsp/testdata/funcvalue/func_value.go b/gopls/internal/lsp/testdata/funcvalue/func_value.go
similarity index 100%
rename from internal/lsp/testdata/funcvalue/func_value.go
rename to gopls/internal/lsp/testdata/funcvalue/func_value.go
diff --git a/internal/lsp/testdata/fuzzymatch/fuzzymatch.go b/gopls/internal/lsp/testdata/fuzzymatch/fuzzymatch.go
similarity index 100%
rename from internal/lsp/testdata/fuzzymatch/fuzzymatch.go
rename to gopls/internal/lsp/testdata/fuzzymatch/fuzzymatch.go
diff --git a/internal/lsp/testdata/generate/generate.go b/gopls/internal/lsp/testdata/generate/generate.go
similarity index 100%
rename from internal/lsp/testdata/generate/generate.go
rename to gopls/internal/lsp/testdata/generate/generate.go
diff --git a/internal/lsp/testdata/generated/generated.go b/gopls/internal/lsp/testdata/generated/generated.go
similarity index 100%
rename from internal/lsp/testdata/generated/generated.go
rename to gopls/internal/lsp/testdata/generated/generated.go
diff --git a/internal/lsp/testdata/generated/generator.go b/gopls/internal/lsp/testdata/generated/generator.go
similarity index 100%
rename from internal/lsp/testdata/generated/generator.go
rename to gopls/internal/lsp/testdata/generated/generator.go
diff --git a/internal/lsp/testdata/godef/a/a.go b/gopls/internal/lsp/testdata/godef/a/a.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/a.go
rename to gopls/internal/lsp/testdata/godef/a/a.go
diff --git a/internal/lsp/testdata/godef/a/a.go.golden b/gopls/internal/lsp/testdata/godef/a/a.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/a.go.golden
rename to gopls/internal/lsp/testdata/godef/a/a.go.golden
diff --git a/internal/lsp/testdata/godef/a/a_test.go b/gopls/internal/lsp/testdata/godef/a/a_test.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/a_test.go
rename to gopls/internal/lsp/testdata/godef/a/a_test.go
diff --git a/internal/lsp/testdata/godef/a/a_test.go.golden b/gopls/internal/lsp/testdata/godef/a/a_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/a_test.go.golden
rename to gopls/internal/lsp/testdata/godef/a/a_test.go.golden
diff --git a/internal/lsp/testdata/godef/a/a_x_test.go b/gopls/internal/lsp/testdata/godef/a/a_x_test.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/a_x_test.go
rename to gopls/internal/lsp/testdata/godef/a/a_x_test.go
diff --git a/internal/lsp/testdata/godef/a/a_x_test.go.golden b/gopls/internal/lsp/testdata/godef/a/a_x_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/a_x_test.go.golden
rename to gopls/internal/lsp/testdata/godef/a/a_x_test.go.golden
diff --git a/internal/lsp/testdata/godef/a/d.go b/gopls/internal/lsp/testdata/godef/a/d.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/d.go
rename to gopls/internal/lsp/testdata/godef/a/d.go
diff --git a/internal/lsp/testdata/godef/a/d.go.golden b/gopls/internal/lsp/testdata/godef/a/d.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/d.go.golden
rename to gopls/internal/lsp/testdata/godef/a/d.go.golden
diff --git a/internal/lsp/testdata/godef/a/f.go b/gopls/internal/lsp/testdata/godef/a/f.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/f.go
rename to gopls/internal/lsp/testdata/godef/a/f.go
diff --git a/internal/lsp/testdata/godef/a/f.go.golden b/gopls/internal/lsp/testdata/godef/a/f.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/f.go.golden
rename to gopls/internal/lsp/testdata/godef/a/f.go.golden
diff --git a/internal/lsp/testdata/godef/a/g.go b/gopls/internal/lsp/testdata/godef/a/g.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/g.go
rename to gopls/internal/lsp/testdata/godef/a/g.go
diff --git a/internal/lsp/testdata/godef/a/g.go.golden b/gopls/internal/lsp/testdata/godef/a/g.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/g.go.golden
rename to gopls/internal/lsp/testdata/godef/a/g.go.golden
diff --git a/internal/lsp/testdata/godef/a/h.go b/gopls/internal/lsp/testdata/godef/a/h.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/h.go
rename to gopls/internal/lsp/testdata/godef/a/h.go
diff --git a/internal/lsp/testdata/godef/a/h.go.golden b/gopls/internal/lsp/testdata/godef/a/h.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/h.go.golden
rename to gopls/internal/lsp/testdata/godef/a/h.go.golden
diff --git a/internal/lsp/testdata/godef/a/random.go b/gopls/internal/lsp/testdata/godef/a/random.go
similarity index 100%
rename from internal/lsp/testdata/godef/a/random.go
rename to gopls/internal/lsp/testdata/godef/a/random.go
diff --git a/internal/lsp/testdata/godef/a/random.go.golden b/gopls/internal/lsp/testdata/godef/a/random.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/a/random.go.golden
rename to gopls/internal/lsp/testdata/godef/a/random.go.golden
diff --git a/internal/lsp/testdata/godef/b/b.go b/gopls/internal/lsp/testdata/godef/b/b.go
similarity index 100%
rename from internal/lsp/testdata/godef/b/b.go
rename to gopls/internal/lsp/testdata/godef/b/b.go
diff --git a/internal/lsp/testdata/godef/b/b.go.golden b/gopls/internal/lsp/testdata/godef/b/b.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/b/b.go.golden
rename to gopls/internal/lsp/testdata/godef/b/b.go.golden
diff --git a/internal/lsp/testdata/godef/b/c.go b/gopls/internal/lsp/testdata/godef/b/c.go
similarity index 100%
rename from internal/lsp/testdata/godef/b/c.go
rename to gopls/internal/lsp/testdata/godef/b/c.go
diff --git a/internal/lsp/testdata/godef/b/c.go.golden b/gopls/internal/lsp/testdata/godef/b/c.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/b/c.go.golden
rename to gopls/internal/lsp/testdata/godef/b/c.go.golden
diff --git a/internal/lsp/testdata/godef/b/c.go.saved b/gopls/internal/lsp/testdata/godef/b/c.go.saved
similarity index 100%
rename from internal/lsp/testdata/godef/b/c.go.saved
rename to gopls/internal/lsp/testdata/godef/b/c.go.saved
diff --git a/internal/lsp/testdata/godef/b/e.go b/gopls/internal/lsp/testdata/godef/b/e.go
similarity index 100%
rename from internal/lsp/testdata/godef/b/e.go
rename to gopls/internal/lsp/testdata/godef/b/e.go
diff --git a/internal/lsp/testdata/godef/b/e.go.golden b/gopls/internal/lsp/testdata/godef/b/e.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/b/e.go.golden
rename to gopls/internal/lsp/testdata/godef/b/e.go.golden
diff --git a/internal/lsp/testdata/godef/b/h.go b/gopls/internal/lsp/testdata/godef/b/h.go
similarity index 100%
rename from internal/lsp/testdata/godef/b/h.go
rename to gopls/internal/lsp/testdata/godef/b/h.go
diff --git a/internal/lsp/testdata/godef/b/h.go.golden b/gopls/internal/lsp/testdata/godef/b/h.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/b/h.go.golden
rename to gopls/internal/lsp/testdata/godef/b/h.go.golden
diff --git a/internal/lsp/testdata/godef/broken/unclosedIf.go.golden b/gopls/internal/lsp/testdata/godef/broken/unclosedIf.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/broken/unclosedIf.go.golden
rename to gopls/internal/lsp/testdata/godef/broken/unclosedIf.go.golden
diff --git a/internal/lsp/testdata/godef/broken/unclosedIf.go.in b/gopls/internal/lsp/testdata/godef/broken/unclosedIf.go.in
similarity index 100%
rename from internal/lsp/testdata/godef/broken/unclosedIf.go.in
rename to gopls/internal/lsp/testdata/godef/broken/unclosedIf.go.in
diff --git a/internal/lsp/testdata/godef/hover_generics/hover.go b/gopls/internal/lsp/testdata/godef/hover_generics/hover.go
similarity index 100%
rename from internal/lsp/testdata/godef/hover_generics/hover.go
rename to gopls/internal/lsp/testdata/godef/hover_generics/hover.go
diff --git a/internal/lsp/testdata/godef/hover_generics/hover.go.golden b/gopls/internal/lsp/testdata/godef/hover_generics/hover.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/hover_generics/hover.go.golden
rename to gopls/internal/lsp/testdata/godef/hover_generics/hover.go.golden
diff --git a/internal/lsp/testdata/godef/infer_generics/inferred.go b/gopls/internal/lsp/testdata/godef/infer_generics/inferred.go
similarity index 100%
rename from internal/lsp/testdata/godef/infer_generics/inferred.go
rename to gopls/internal/lsp/testdata/godef/infer_generics/inferred.go
diff --git a/internal/lsp/testdata/godef/infer_generics/inferred.go.golden b/gopls/internal/lsp/testdata/godef/infer_generics/inferred.go.golden
similarity index 100%
rename from internal/lsp/testdata/godef/infer_generics/inferred.go.golden
rename to gopls/internal/lsp/testdata/godef/infer_generics/inferred.go.golden
diff --git a/internal/lsp/testdata/good/good0.go b/gopls/internal/lsp/testdata/good/good0.go
similarity index 100%
rename from internal/lsp/testdata/good/good0.go
rename to gopls/internal/lsp/testdata/good/good0.go
diff --git a/internal/lsp/testdata/good/good1.go b/gopls/internal/lsp/testdata/good/good1.go
similarity index 100%
rename from internal/lsp/testdata/good/good1.go
rename to gopls/internal/lsp/testdata/good/good1.go
diff --git a/internal/lsp/testdata/highlights/highlights.go b/gopls/internal/lsp/testdata/highlights/highlights.go
similarity index 100%
rename from internal/lsp/testdata/highlights/highlights.go
rename to gopls/internal/lsp/testdata/highlights/highlights.go
diff --git a/internal/lsp/testdata/implementation/implementation.go b/gopls/internal/lsp/testdata/implementation/implementation.go
similarity index 100%
rename from internal/lsp/testdata/implementation/implementation.go
rename to gopls/internal/lsp/testdata/implementation/implementation.go
diff --git a/internal/lsp/testdata/implementation/other/other.go b/gopls/internal/lsp/testdata/implementation/other/other.go
similarity index 100%
rename from internal/lsp/testdata/implementation/other/other.go
rename to gopls/internal/lsp/testdata/implementation/other/other.go
diff --git a/internal/lsp/testdata/implementation/other/other_test.go b/gopls/internal/lsp/testdata/implementation/other/other_test.go
similarity index 100%
rename from internal/lsp/testdata/implementation/other/other_test.go
rename to gopls/internal/lsp/testdata/implementation/other/other_test.go
diff --git a/internal/lsp/testdata/importedcomplit/imported_complit.go.in b/gopls/internal/lsp/testdata/importedcomplit/imported_complit.go.in
similarity index 100%
rename from internal/lsp/testdata/importedcomplit/imported_complit.go.in
rename to gopls/internal/lsp/testdata/importedcomplit/imported_complit.go.in
diff --git a/internal/lsp/testdata/imports/add_import.go.golden b/gopls/internal/lsp/testdata/imports/add_import.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/add_import.go.golden
rename to gopls/internal/lsp/testdata/imports/add_import.go.golden
diff --git a/internal/lsp/testdata/imports/add_import.go.in b/gopls/internal/lsp/testdata/imports/add_import.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/add_import.go.in
rename to gopls/internal/lsp/testdata/imports/add_import.go.in
diff --git a/internal/lsp/testdata/imports/good_imports.go.golden b/gopls/internal/lsp/testdata/imports/good_imports.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/good_imports.go.golden
rename to gopls/internal/lsp/testdata/imports/good_imports.go.golden
diff --git a/internal/lsp/testdata/imports/good_imports.go.in b/gopls/internal/lsp/testdata/imports/good_imports.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/good_imports.go.in
rename to gopls/internal/lsp/testdata/imports/good_imports.go.in
diff --git a/internal/lsp/testdata/imports/issue35458.go.golden b/gopls/internal/lsp/testdata/imports/issue35458.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/issue35458.go.golden
rename to gopls/internal/lsp/testdata/imports/issue35458.go.golden
diff --git a/internal/lsp/testdata/imports/issue35458.go.in b/gopls/internal/lsp/testdata/imports/issue35458.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/issue35458.go.in
rename to gopls/internal/lsp/testdata/imports/issue35458.go.in
diff --git a/internal/lsp/testdata/imports/multiple_blocks.go.golden b/gopls/internal/lsp/testdata/imports/multiple_blocks.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/multiple_blocks.go.golden
rename to gopls/internal/lsp/testdata/imports/multiple_blocks.go.golden
diff --git a/internal/lsp/testdata/imports/multiple_blocks.go.in b/gopls/internal/lsp/testdata/imports/multiple_blocks.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/multiple_blocks.go.in
rename to gopls/internal/lsp/testdata/imports/multiple_blocks.go.in
diff --git a/internal/lsp/testdata/imports/needs_imports.go.golden b/gopls/internal/lsp/testdata/imports/needs_imports.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/needs_imports.go.golden
rename to gopls/internal/lsp/testdata/imports/needs_imports.go.golden
diff --git a/internal/lsp/testdata/imports/needs_imports.go.in b/gopls/internal/lsp/testdata/imports/needs_imports.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/needs_imports.go.in
rename to gopls/internal/lsp/testdata/imports/needs_imports.go.in
diff --git a/internal/lsp/testdata/imports/remove_import.go.golden b/gopls/internal/lsp/testdata/imports/remove_import.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/remove_import.go.golden
rename to gopls/internal/lsp/testdata/imports/remove_import.go.golden
diff --git a/internal/lsp/testdata/imports/remove_import.go.in b/gopls/internal/lsp/testdata/imports/remove_import.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/remove_import.go.in
rename to gopls/internal/lsp/testdata/imports/remove_import.go.in
diff --git a/internal/lsp/testdata/imports/remove_imports.go.golden b/gopls/internal/lsp/testdata/imports/remove_imports.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/remove_imports.go.golden
rename to gopls/internal/lsp/testdata/imports/remove_imports.go.golden
diff --git a/internal/lsp/testdata/imports/remove_imports.go.in b/gopls/internal/lsp/testdata/imports/remove_imports.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/remove_imports.go.in
rename to gopls/internal/lsp/testdata/imports/remove_imports.go.in
diff --git a/internal/lsp/testdata/imports/two_lines.go.golden b/gopls/internal/lsp/testdata/imports/two_lines.go.golden
similarity index 100%
rename from internal/lsp/testdata/imports/two_lines.go.golden
rename to gopls/internal/lsp/testdata/imports/two_lines.go.golden
diff --git a/internal/lsp/testdata/imports/two_lines.go.in b/gopls/internal/lsp/testdata/imports/two_lines.go.in
similarity index 100%
rename from internal/lsp/testdata/imports/two_lines.go.in
rename to gopls/internal/lsp/testdata/imports/two_lines.go.in
diff --git a/internal/lsp/testdata/index/index.go b/gopls/internal/lsp/testdata/index/index.go
similarity index 100%
rename from internal/lsp/testdata/index/index.go
rename to gopls/internal/lsp/testdata/index/index.go
diff --git a/internal/lsp/testdata/inlay_hint/composite_literals.go b/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/composite_literals.go
rename to gopls/internal/lsp/testdata/inlay_hint/composite_literals.go
diff --git a/internal/lsp/testdata/inlay_hint/composite_literals.go.golden b/gopls/internal/lsp/testdata/inlay_hint/composite_literals.go.golden
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/composite_literals.go.golden
rename to gopls/internal/lsp/testdata/inlay_hint/composite_literals.go.golden
diff --git a/internal/lsp/testdata/inlay_hint/constant_values.go b/gopls/internal/lsp/testdata/inlay_hint/constant_values.go
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/constant_values.go
rename to gopls/internal/lsp/testdata/inlay_hint/constant_values.go
diff --git a/internal/lsp/testdata/inlay_hint/constant_values.go.golden b/gopls/internal/lsp/testdata/inlay_hint/constant_values.go.golden
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/constant_values.go.golden
rename to gopls/internal/lsp/testdata/inlay_hint/constant_values.go.golden
diff --git a/internal/lsp/testdata/inlay_hint/parameter_names.go b/gopls/internal/lsp/testdata/inlay_hint/parameter_names.go
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/parameter_names.go
rename to gopls/internal/lsp/testdata/inlay_hint/parameter_names.go
diff --git a/internal/lsp/testdata/inlay_hint/parameter_names.go.golden b/gopls/internal/lsp/testdata/inlay_hint/parameter_names.go.golden
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/parameter_names.go.golden
rename to gopls/internal/lsp/testdata/inlay_hint/parameter_names.go.golden
diff --git a/internal/lsp/testdata/inlay_hint/type_params.go b/gopls/internal/lsp/testdata/inlay_hint/type_params.go
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/type_params.go
rename to gopls/internal/lsp/testdata/inlay_hint/type_params.go
diff --git a/internal/lsp/testdata/inlay_hint/type_params.go.golden b/gopls/internal/lsp/testdata/inlay_hint/type_params.go.golden
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/type_params.go.golden
rename to gopls/internal/lsp/testdata/inlay_hint/type_params.go.golden
diff --git a/internal/lsp/testdata/inlay_hint/variable_types.go b/gopls/internal/lsp/testdata/inlay_hint/variable_types.go
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/variable_types.go
rename to gopls/internal/lsp/testdata/inlay_hint/variable_types.go
diff --git a/internal/lsp/testdata/inlay_hint/variable_types.go.golden b/gopls/internal/lsp/testdata/inlay_hint/variable_types.go.golden
similarity index 100%
rename from internal/lsp/testdata/inlay_hint/variable_types.go.golden
rename to gopls/internal/lsp/testdata/inlay_hint/variable_types.go.golden
diff --git a/internal/lsp/testdata/interfacerank/interface_rank.go b/gopls/internal/lsp/testdata/interfacerank/interface_rank.go
similarity index 100%
rename from internal/lsp/testdata/interfacerank/interface_rank.go
rename to gopls/internal/lsp/testdata/interfacerank/interface_rank.go
diff --git a/internal/lsp/testdata/keywords/accidental_keywords.go.in b/gopls/internal/lsp/testdata/keywords/accidental_keywords.go.in
similarity index 100%
rename from internal/lsp/testdata/keywords/accidental_keywords.go.in
rename to gopls/internal/lsp/testdata/keywords/accidental_keywords.go.in
diff --git a/internal/lsp/testdata/keywords/empty_select.go b/gopls/internal/lsp/testdata/keywords/empty_select.go
similarity index 100%
rename from internal/lsp/testdata/keywords/empty_select.go
rename to gopls/internal/lsp/testdata/keywords/empty_select.go
diff --git a/internal/lsp/testdata/keywords/empty_switch.go b/gopls/internal/lsp/testdata/keywords/empty_switch.go
similarity index 100%
rename from internal/lsp/testdata/keywords/empty_switch.go
rename to gopls/internal/lsp/testdata/keywords/empty_switch.go
diff --git a/internal/lsp/testdata/keywords/keywords.go b/gopls/internal/lsp/testdata/keywords/keywords.go
similarity index 100%
rename from internal/lsp/testdata/keywords/keywords.go
rename to gopls/internal/lsp/testdata/keywords/keywords.go
diff --git a/internal/lsp/testdata/labels/labels.go b/gopls/internal/lsp/testdata/labels/labels.go
similarity index 100%
rename from internal/lsp/testdata/labels/labels.go
rename to gopls/internal/lsp/testdata/labels/labels.go
diff --git a/internal/lsp/testdata/links/links.go b/gopls/internal/lsp/testdata/links/links.go
similarity index 100%
rename from internal/lsp/testdata/links/links.go
rename to gopls/internal/lsp/testdata/links/links.go
diff --git a/internal/lsp/testdata/maps/maps.go.in b/gopls/internal/lsp/testdata/maps/maps.go.in
similarity index 100%
rename from internal/lsp/testdata/maps/maps.go.in
rename to gopls/internal/lsp/testdata/maps/maps.go.in
diff --git a/internal/lsp/testdata/missingfunction/channels.go b/gopls/internal/lsp/testdata/missingfunction/channels.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/channels.go
rename to gopls/internal/lsp/testdata/missingfunction/channels.go
diff --git a/internal/lsp/testdata/missingfunction/channels.go.golden b/gopls/internal/lsp/testdata/missingfunction/channels.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/channels.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/channels.go.golden
diff --git a/internal/lsp/testdata/missingfunction/consecutive_params.go b/gopls/internal/lsp/testdata/missingfunction/consecutive_params.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/consecutive_params.go
rename to gopls/internal/lsp/testdata/missingfunction/consecutive_params.go
diff --git a/internal/lsp/testdata/missingfunction/consecutive_params.go.golden b/gopls/internal/lsp/testdata/missingfunction/consecutive_params.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/consecutive_params.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/consecutive_params.go.golden
diff --git a/internal/lsp/testdata/missingfunction/error_param.go b/gopls/internal/lsp/testdata/missingfunction/error_param.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/error_param.go
rename to gopls/internal/lsp/testdata/missingfunction/error_param.go
diff --git a/internal/lsp/testdata/missingfunction/error_param.go.golden b/gopls/internal/lsp/testdata/missingfunction/error_param.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/error_param.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/error_param.go.golden
diff --git a/internal/lsp/testdata/missingfunction/literals.go b/gopls/internal/lsp/testdata/missingfunction/literals.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/literals.go
rename to gopls/internal/lsp/testdata/missingfunction/literals.go
diff --git a/internal/lsp/testdata/missingfunction/literals.go.golden b/gopls/internal/lsp/testdata/missingfunction/literals.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/literals.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/literals.go.golden
diff --git a/internal/lsp/testdata/missingfunction/operation.go b/gopls/internal/lsp/testdata/missingfunction/operation.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/operation.go
rename to gopls/internal/lsp/testdata/missingfunction/operation.go
diff --git a/internal/lsp/testdata/missingfunction/operation.go.golden b/gopls/internal/lsp/testdata/missingfunction/operation.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/operation.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/operation.go.golden
diff --git a/internal/lsp/testdata/missingfunction/selector.go b/gopls/internal/lsp/testdata/missingfunction/selector.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/selector.go
rename to gopls/internal/lsp/testdata/missingfunction/selector.go
diff --git a/internal/lsp/testdata/missingfunction/selector.go.golden b/gopls/internal/lsp/testdata/missingfunction/selector.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/selector.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/selector.go.golden
diff --git a/internal/lsp/testdata/missingfunction/slice.go b/gopls/internal/lsp/testdata/missingfunction/slice.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/slice.go
rename to gopls/internal/lsp/testdata/missingfunction/slice.go
diff --git a/internal/lsp/testdata/missingfunction/slice.go.golden b/gopls/internal/lsp/testdata/missingfunction/slice.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/slice.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/slice.go.golden
diff --git a/internal/lsp/testdata/missingfunction/tuple.go b/gopls/internal/lsp/testdata/missingfunction/tuple.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/tuple.go
rename to gopls/internal/lsp/testdata/missingfunction/tuple.go
diff --git a/internal/lsp/testdata/missingfunction/tuple.go.golden b/gopls/internal/lsp/testdata/missingfunction/tuple.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/tuple.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/tuple.go.golden
diff --git a/internal/lsp/testdata/missingfunction/unique_params.go b/gopls/internal/lsp/testdata/missingfunction/unique_params.go
similarity index 100%
rename from internal/lsp/testdata/missingfunction/unique_params.go
rename to gopls/internal/lsp/testdata/missingfunction/unique_params.go
diff --git a/internal/lsp/testdata/missingfunction/unique_params.go.golden b/gopls/internal/lsp/testdata/missingfunction/unique_params.go.golden
similarity index 100%
rename from internal/lsp/testdata/missingfunction/unique_params.go.golden
rename to gopls/internal/lsp/testdata/missingfunction/unique_params.go.golden
diff --git a/internal/lsp/testdata/multireturn/multi_return.go.in b/gopls/internal/lsp/testdata/multireturn/multi_return.go.in
similarity index 100%
rename from internal/lsp/testdata/multireturn/multi_return.go.in
rename to gopls/internal/lsp/testdata/multireturn/multi_return.go.in
diff --git a/internal/lsp/testdata/nested_complit/nested_complit.go.in b/gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in
similarity index 100%
rename from internal/lsp/testdata/nested_complit/nested_complit.go.in
rename to gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in
diff --git a/internal/lsp/testdata/nodisk/empty b/gopls/internal/lsp/testdata/nodisk/empty
similarity index 100%
rename from internal/lsp/testdata/nodisk/empty
rename to gopls/internal/lsp/testdata/nodisk/empty
diff --git a/internal/lsp/testdata/nodisk/nodisk.overlay.go b/gopls/internal/lsp/testdata/nodisk/nodisk.overlay.go
similarity index 100%
rename from internal/lsp/testdata/nodisk/nodisk.overlay.go
rename to gopls/internal/lsp/testdata/nodisk/nodisk.overlay.go
diff --git a/internal/lsp/testdata/noparse/noparse.go.in b/gopls/internal/lsp/testdata/noparse/noparse.go.in
similarity index 100%
rename from internal/lsp/testdata/noparse/noparse.go.in
rename to gopls/internal/lsp/testdata/noparse/noparse.go.in
diff --git a/internal/lsp/testdata/noparse_format/noparse_format.go.golden b/gopls/internal/lsp/testdata/noparse_format/noparse_format.go.golden
similarity index 100%
rename from internal/lsp/testdata/noparse_format/noparse_format.go.golden
rename to gopls/internal/lsp/testdata/noparse_format/noparse_format.go.golden
diff --git a/internal/lsp/testdata/noparse_format/noparse_format.go.in b/gopls/internal/lsp/testdata/noparse_format/noparse_format.go.in
similarity index 100%
rename from internal/lsp/testdata/noparse_format/noparse_format.go.in
rename to gopls/internal/lsp/testdata/noparse_format/noparse_format.go.in
diff --git a/internal/lsp/testdata/noparse_format/parse_format.go.golden b/gopls/internal/lsp/testdata/noparse_format/parse_format.go.golden
similarity index 100%
rename from internal/lsp/testdata/noparse_format/parse_format.go.golden
rename to gopls/internal/lsp/testdata/noparse_format/parse_format.go.golden
diff --git a/internal/lsp/testdata/noparse_format/parse_format.go.in b/gopls/internal/lsp/testdata/noparse_format/parse_format.go.in
similarity index 100%
rename from internal/lsp/testdata/noparse_format/parse_format.go.in
rename to gopls/internal/lsp/testdata/noparse_format/parse_format.go.in
diff --git a/internal/lsp/testdata/printf/printf.go b/gopls/internal/lsp/testdata/printf/printf.go
similarity index 100%
rename from internal/lsp/testdata/printf/printf.go
rename to gopls/internal/lsp/testdata/printf/printf.go
diff --git a/internal/lsp/testdata/rank/assign_rank.go.in b/gopls/internal/lsp/testdata/rank/assign_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/assign_rank.go.in
rename to gopls/internal/lsp/testdata/rank/assign_rank.go.in
diff --git a/internal/lsp/testdata/rank/binexpr_rank.go.in b/gopls/internal/lsp/testdata/rank/binexpr_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/binexpr_rank.go.in
rename to gopls/internal/lsp/testdata/rank/binexpr_rank.go.in
diff --git a/internal/lsp/testdata/rank/boolexpr_rank.go b/gopls/internal/lsp/testdata/rank/boolexpr_rank.go
similarity index 100%
rename from internal/lsp/testdata/rank/boolexpr_rank.go
rename to gopls/internal/lsp/testdata/rank/boolexpr_rank.go
diff --git a/internal/lsp/testdata/rank/convert_rank.go.in b/gopls/internal/lsp/testdata/rank/convert_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/convert_rank.go.in
rename to gopls/internal/lsp/testdata/rank/convert_rank.go.in
diff --git a/internal/lsp/testdata/rank/struct/struct_rank.go b/gopls/internal/lsp/testdata/rank/struct/struct_rank.go
similarity index 100%
rename from internal/lsp/testdata/rank/struct/struct_rank.go
rename to gopls/internal/lsp/testdata/rank/struct/struct_rank.go
diff --git a/internal/lsp/testdata/rank/switch_rank.go.in b/gopls/internal/lsp/testdata/rank/switch_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/switch_rank.go.in
rename to gopls/internal/lsp/testdata/rank/switch_rank.go.in
diff --git a/internal/lsp/testdata/rank/type_assert_rank.go.in b/gopls/internal/lsp/testdata/rank/type_assert_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/type_assert_rank.go.in
rename to gopls/internal/lsp/testdata/rank/type_assert_rank.go.in
diff --git a/internal/lsp/testdata/rank/type_switch_rank.go.in b/gopls/internal/lsp/testdata/rank/type_switch_rank.go.in
similarity index 100%
rename from internal/lsp/testdata/rank/type_switch_rank.go.in
rename to gopls/internal/lsp/testdata/rank/type_switch_rank.go.in
diff --git a/internal/lsp/testdata/references/another/another.go b/gopls/internal/lsp/testdata/references/another/another.go
similarity index 100%
rename from internal/lsp/testdata/references/another/another.go
rename to gopls/internal/lsp/testdata/references/another/another.go
diff --git a/internal/lsp/testdata/references/interfaces/interfaces.go b/gopls/internal/lsp/testdata/references/interfaces/interfaces.go
similarity index 100%
rename from internal/lsp/testdata/references/interfaces/interfaces.go
rename to gopls/internal/lsp/testdata/references/interfaces/interfaces.go
diff --git a/internal/lsp/testdata/references/other/other.go b/gopls/internal/lsp/testdata/references/other/other.go
similarity index 100%
rename from internal/lsp/testdata/references/other/other.go
rename to gopls/internal/lsp/testdata/references/other/other.go
diff --git a/internal/lsp/testdata/references/refs.go b/gopls/internal/lsp/testdata/references/refs.go
similarity index 100%
rename from internal/lsp/testdata/references/refs.go
rename to gopls/internal/lsp/testdata/references/refs.go
diff --git a/internal/lsp/testdata/references/refs_test.go b/gopls/internal/lsp/testdata/references/refs_test.go
similarity index 100%
rename from internal/lsp/testdata/references/refs_test.go
rename to gopls/internal/lsp/testdata/references/refs_test.go
diff --git a/internal/lsp/testdata/rename/a/random.go.golden b/gopls/internal/lsp/testdata/rename/a/random.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/a/random.go.golden
rename to gopls/internal/lsp/testdata/rename/a/random.go.golden
diff --git a/internal/lsp/testdata/rename/a/random.go.in b/gopls/internal/lsp/testdata/rename/a/random.go.in
similarity index 100%
rename from internal/lsp/testdata/rename/a/random.go.in
rename to gopls/internal/lsp/testdata/rename/a/random.go.in
diff --git a/internal/lsp/testdata/rename/b/b.go b/gopls/internal/lsp/testdata/rename/b/b.go
similarity index 100%
rename from internal/lsp/testdata/rename/b/b.go
rename to gopls/internal/lsp/testdata/rename/b/b.go
diff --git a/internal/lsp/testdata/rename/b/b.go.golden b/gopls/internal/lsp/testdata/rename/b/b.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/b/b.go.golden
rename to gopls/internal/lsp/testdata/rename/b/b.go.golden
diff --git a/internal/lsp/testdata/rename/bad/bad.go.golden b/gopls/internal/lsp/testdata/rename/bad/bad.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/bad/bad.go.golden
rename to gopls/internal/lsp/testdata/rename/bad/bad.go.golden
diff --git a/internal/lsp/testdata/rename/bad/bad.go.in b/gopls/internal/lsp/testdata/rename/bad/bad.go.in
similarity index 100%
rename from internal/lsp/testdata/rename/bad/bad.go.in
rename to gopls/internal/lsp/testdata/rename/bad/bad.go.in
diff --git a/internal/lsp/testdata/rename/bad/bad_test.go.in b/gopls/internal/lsp/testdata/rename/bad/bad_test.go.in
similarity index 100%
rename from internal/lsp/testdata/rename/bad/bad_test.go.in
rename to gopls/internal/lsp/testdata/rename/bad/bad_test.go.in
diff --git a/internal/lsp/testdata/rename/c/c.go b/gopls/internal/lsp/testdata/rename/c/c.go
similarity index 100%
rename from internal/lsp/testdata/rename/c/c.go
rename to gopls/internal/lsp/testdata/rename/c/c.go
diff --git a/internal/lsp/testdata/rename/c/c.go.golden b/gopls/internal/lsp/testdata/rename/c/c.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/c/c.go.golden
rename to gopls/internal/lsp/testdata/rename/c/c.go.golden
diff --git a/internal/lsp/testdata/rename/c/c2.go b/gopls/internal/lsp/testdata/rename/c/c2.go
similarity index 100%
rename from internal/lsp/testdata/rename/c/c2.go
rename to gopls/internal/lsp/testdata/rename/c/c2.go
diff --git a/internal/lsp/testdata/rename/c/c2.go.golden b/gopls/internal/lsp/testdata/rename/c/c2.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/c/c2.go.golden
rename to gopls/internal/lsp/testdata/rename/c/c2.go.golden
diff --git a/internal/lsp/testdata/rename/crosspkg/another/another.go b/gopls/internal/lsp/testdata/rename/crosspkg/another/another.go
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/another/another.go
rename to gopls/internal/lsp/testdata/rename/crosspkg/another/another.go
diff --git a/internal/lsp/testdata/rename/crosspkg/another/another.go.golden b/gopls/internal/lsp/testdata/rename/crosspkg/another/another.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/another/another.go.golden
rename to gopls/internal/lsp/testdata/rename/crosspkg/another/another.go.golden
diff --git a/internal/lsp/testdata/rename/crosspkg/crosspkg.go b/gopls/internal/lsp/testdata/rename/crosspkg/crosspkg.go
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/crosspkg.go
rename to gopls/internal/lsp/testdata/rename/crosspkg/crosspkg.go
diff --git a/internal/lsp/testdata/rename/crosspkg/crosspkg.go.golden b/gopls/internal/lsp/testdata/rename/crosspkg/crosspkg.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/crosspkg.go.golden
rename to gopls/internal/lsp/testdata/rename/crosspkg/crosspkg.go.golden
diff --git a/internal/lsp/testdata/rename/crosspkg/other/other.go b/gopls/internal/lsp/testdata/rename/crosspkg/other/other.go
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/other/other.go
rename to gopls/internal/lsp/testdata/rename/crosspkg/other/other.go
diff --git a/internal/lsp/testdata/rename/crosspkg/other/other.go.golden b/gopls/internal/lsp/testdata/rename/crosspkg/other/other.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/crosspkg/other/other.go.golden
rename to gopls/internal/lsp/testdata/rename/crosspkg/other/other.go.golden
diff --git a/internal/lsp/testdata/rename/generics/embedded.go b/gopls/internal/lsp/testdata/rename/generics/embedded.go
similarity index 100%
rename from internal/lsp/testdata/rename/generics/embedded.go
rename to gopls/internal/lsp/testdata/rename/generics/embedded.go
diff --git a/internal/lsp/testdata/rename/generics/embedded.go.golden b/gopls/internal/lsp/testdata/rename/generics/embedded.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/generics/embedded.go.golden
rename to gopls/internal/lsp/testdata/rename/generics/embedded.go.golden
diff --git a/internal/lsp/testdata/rename/generics/generics.go b/gopls/internal/lsp/testdata/rename/generics/generics.go
similarity index 100%
rename from internal/lsp/testdata/rename/generics/generics.go
rename to gopls/internal/lsp/testdata/rename/generics/generics.go
diff --git a/internal/lsp/testdata/rename/generics/generics.go.golden b/gopls/internal/lsp/testdata/rename/generics/generics.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/generics/generics.go.golden
rename to gopls/internal/lsp/testdata/rename/generics/generics.go.golden
diff --git a/internal/lsp/testdata/rename/generics/unions.go b/gopls/internal/lsp/testdata/rename/generics/unions.go
similarity index 100%
rename from internal/lsp/testdata/rename/generics/unions.go
rename to gopls/internal/lsp/testdata/rename/generics/unions.go
diff --git a/internal/lsp/testdata/rename/generics/unions.go.golden b/gopls/internal/lsp/testdata/rename/generics/unions.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/generics/unions.go.golden
rename to gopls/internal/lsp/testdata/rename/generics/unions.go.golden
diff --git a/internal/lsp/testdata/rename/issue39614/issue39614.go.golden b/gopls/internal/lsp/testdata/rename/issue39614/issue39614.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue39614/issue39614.go.golden
rename to gopls/internal/lsp/testdata/rename/issue39614/issue39614.go.golden
diff --git a/internal/lsp/testdata/rename/issue39614/issue39614.go.in b/gopls/internal/lsp/testdata/rename/issue39614/issue39614.go.in
similarity index 100%
rename from internal/lsp/testdata/rename/issue39614/issue39614.go.in
rename to gopls/internal/lsp/testdata/rename/issue39614/issue39614.go.in
diff --git a/internal/lsp/testdata/rename/issue42134/1.go b/gopls/internal/lsp/testdata/rename/issue42134/1.go
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/1.go
rename to gopls/internal/lsp/testdata/rename/issue42134/1.go
diff --git a/internal/lsp/testdata/rename/issue42134/1.go.golden b/gopls/internal/lsp/testdata/rename/issue42134/1.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/1.go.golden
rename to gopls/internal/lsp/testdata/rename/issue42134/1.go.golden
diff --git a/internal/lsp/testdata/rename/issue42134/2.go b/gopls/internal/lsp/testdata/rename/issue42134/2.go
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/2.go
rename to gopls/internal/lsp/testdata/rename/issue42134/2.go
diff --git a/internal/lsp/testdata/rename/issue42134/2.go.golden b/gopls/internal/lsp/testdata/rename/issue42134/2.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/2.go.golden
rename to gopls/internal/lsp/testdata/rename/issue42134/2.go.golden
diff --git a/internal/lsp/testdata/rename/issue42134/3.go b/gopls/internal/lsp/testdata/rename/issue42134/3.go
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/3.go
rename to gopls/internal/lsp/testdata/rename/issue42134/3.go
diff --git a/internal/lsp/testdata/rename/issue42134/3.go.golden b/gopls/internal/lsp/testdata/rename/issue42134/3.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/3.go.golden
rename to gopls/internal/lsp/testdata/rename/issue42134/3.go.golden
diff --git a/internal/lsp/testdata/rename/issue42134/4.go b/gopls/internal/lsp/testdata/rename/issue42134/4.go
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/4.go
rename to gopls/internal/lsp/testdata/rename/issue42134/4.go
diff --git a/internal/lsp/testdata/rename/issue42134/4.go.golden b/gopls/internal/lsp/testdata/rename/issue42134/4.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue42134/4.go.golden
rename to gopls/internal/lsp/testdata/rename/issue42134/4.go.golden
diff --git a/internal/lsp/testdata/rename/issue43616/issue43616.go.golden b/gopls/internal/lsp/testdata/rename/issue43616/issue43616.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/issue43616/issue43616.go.golden
rename to gopls/internal/lsp/testdata/rename/issue43616/issue43616.go.golden
diff --git a/internal/lsp/testdata/rename/issue43616/issue43616.go.in b/gopls/internal/lsp/testdata/rename/issue43616/issue43616.go.in
similarity index 100%
rename from internal/lsp/testdata/rename/issue43616/issue43616.go.in
rename to gopls/internal/lsp/testdata/rename/issue43616/issue43616.go.in
diff --git a/internal/lsp/testdata/rename/shadow/shadow.go b/gopls/internal/lsp/testdata/rename/shadow/shadow.go
similarity index 100%
rename from internal/lsp/testdata/rename/shadow/shadow.go
rename to gopls/internal/lsp/testdata/rename/shadow/shadow.go
diff --git a/internal/lsp/testdata/rename/shadow/shadow.go.golden b/gopls/internal/lsp/testdata/rename/shadow/shadow.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/shadow/shadow.go.golden
rename to gopls/internal/lsp/testdata/rename/shadow/shadow.go.golden
diff --git a/internal/lsp/testdata/rename/testy/testy.go b/gopls/internal/lsp/testdata/rename/testy/testy.go
similarity index 100%
rename from internal/lsp/testdata/rename/testy/testy.go
rename to gopls/internal/lsp/testdata/rename/testy/testy.go
diff --git a/internal/lsp/testdata/rename/testy/testy.go.golden b/gopls/internal/lsp/testdata/rename/testy/testy.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/testy/testy.go.golden
rename to gopls/internal/lsp/testdata/rename/testy/testy.go.golden
diff --git a/internal/lsp/testdata/rename/testy/testy_test.go b/gopls/internal/lsp/testdata/rename/testy/testy_test.go
similarity index 100%
rename from internal/lsp/testdata/rename/testy/testy_test.go
rename to gopls/internal/lsp/testdata/rename/testy/testy_test.go
diff --git a/internal/lsp/testdata/rename/testy/testy_test.go.golden b/gopls/internal/lsp/testdata/rename/testy/testy_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/rename/testy/testy_test.go.golden
rename to gopls/internal/lsp/testdata/rename/testy/testy_test.go.golden
diff --git a/internal/lsp/testdata/rundespiteerrors/rundespiteerrors.go b/gopls/internal/lsp/testdata/rundespiteerrors/rundespiteerrors.go
similarity index 100%
rename from internal/lsp/testdata/rundespiteerrors/rundespiteerrors.go
rename to gopls/internal/lsp/testdata/rundespiteerrors/rundespiteerrors.go
diff --git a/internal/lsp/testdata/selector/selector.go.in b/gopls/internal/lsp/testdata/selector/selector.go.in
similarity index 100%
rename from internal/lsp/testdata/selector/selector.go.in
rename to gopls/internal/lsp/testdata/selector/selector.go.in
diff --git a/internal/lsp/testdata/semantic/README.md b/gopls/internal/lsp/testdata/semantic/README.md
similarity index 100%
rename from internal/lsp/testdata/semantic/README.md
rename to gopls/internal/lsp/testdata/semantic/README.md
diff --git a/internal/lsp/testdata/semantic/a.go b/gopls/internal/lsp/testdata/semantic/a.go
similarity index 100%
rename from internal/lsp/testdata/semantic/a.go
rename to gopls/internal/lsp/testdata/semantic/a.go
diff --git a/internal/lsp/testdata/semantic/a.go.golden b/gopls/internal/lsp/testdata/semantic/a.go.golden
similarity index 100%
rename from internal/lsp/testdata/semantic/a.go.golden
rename to gopls/internal/lsp/testdata/semantic/a.go.golden
diff --git a/internal/lsp/testdata/semantic/b.go b/gopls/internal/lsp/testdata/semantic/b.go
similarity index 100%
rename from internal/lsp/testdata/semantic/b.go
rename to gopls/internal/lsp/testdata/semantic/b.go
diff --git a/internal/lsp/testdata/semantic/b.go.golden b/gopls/internal/lsp/testdata/semantic/b.go.golden
similarity index 100%
rename from internal/lsp/testdata/semantic/b.go.golden
rename to gopls/internal/lsp/testdata/semantic/b.go.golden
diff --git a/internal/lsp/testdata/semantic/semantic_test.go b/gopls/internal/lsp/testdata/semantic/semantic_test.go
similarity index 100%
rename from internal/lsp/testdata/semantic/semantic_test.go
rename to gopls/internal/lsp/testdata/semantic/semantic_test.go
diff --git a/internal/lsp/testdata/signature/signature.go b/gopls/internal/lsp/testdata/signature/signature.go
similarity index 100%
rename from internal/lsp/testdata/signature/signature.go
rename to gopls/internal/lsp/testdata/signature/signature.go
diff --git a/internal/lsp/testdata/signature/signature.go.golden b/gopls/internal/lsp/testdata/signature/signature.go.golden
similarity index 100%
rename from internal/lsp/testdata/signature/signature.go.golden
rename to gopls/internal/lsp/testdata/signature/signature.go.golden
diff --git a/internal/lsp/testdata/signature/signature2.go.golden b/gopls/internal/lsp/testdata/signature/signature2.go.golden
similarity index 100%
rename from internal/lsp/testdata/signature/signature2.go.golden
rename to gopls/internal/lsp/testdata/signature/signature2.go.golden
diff --git a/internal/lsp/testdata/signature/signature2.go.in b/gopls/internal/lsp/testdata/signature/signature2.go.in
similarity index 100%
rename from internal/lsp/testdata/signature/signature2.go.in
rename to gopls/internal/lsp/testdata/signature/signature2.go.in
diff --git a/internal/lsp/testdata/signature/signature3.go.golden b/gopls/internal/lsp/testdata/signature/signature3.go.golden
similarity index 100%
rename from internal/lsp/testdata/signature/signature3.go.golden
rename to gopls/internal/lsp/testdata/signature/signature3.go.golden
diff --git a/internal/lsp/testdata/signature/signature3.go.in b/gopls/internal/lsp/testdata/signature/signature3.go.in
similarity index 100%
rename from internal/lsp/testdata/signature/signature3.go.in
rename to gopls/internal/lsp/testdata/signature/signature3.go.in
diff --git a/internal/lsp/testdata/signature/signature_test.go b/gopls/internal/lsp/testdata/signature/signature_test.go
similarity index 100%
rename from internal/lsp/testdata/signature/signature_test.go
rename to gopls/internal/lsp/testdata/signature/signature_test.go
diff --git a/internal/lsp/testdata/signature/signature_test.go.golden b/gopls/internal/lsp/testdata/signature/signature_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/signature/signature_test.go.golden
rename to gopls/internal/lsp/testdata/signature/signature_test.go.golden
diff --git a/internal/lsp/testdata/snippets/func_snippets118.go.in b/gopls/internal/lsp/testdata/snippets/func_snippets118.go.in
similarity index 100%
rename from internal/lsp/testdata/snippets/func_snippets118.go.in
rename to gopls/internal/lsp/testdata/snippets/func_snippets118.go.in
diff --git a/internal/lsp/testdata/snippets/literal.go b/gopls/internal/lsp/testdata/snippets/literal.go
similarity index 100%
rename from internal/lsp/testdata/snippets/literal.go
rename to gopls/internal/lsp/testdata/snippets/literal.go
diff --git a/internal/lsp/testdata/snippets/literal.go.golden b/gopls/internal/lsp/testdata/snippets/literal.go.golden
similarity index 100%
rename from internal/lsp/testdata/snippets/literal.go.golden
rename to gopls/internal/lsp/testdata/snippets/literal.go.golden
diff --git a/internal/lsp/testdata/snippets/literal_snippets.go.in b/gopls/internal/lsp/testdata/snippets/literal_snippets.go.in
similarity index 100%
rename from internal/lsp/testdata/snippets/literal_snippets.go.in
rename to gopls/internal/lsp/testdata/snippets/literal_snippets.go.in
diff --git a/internal/lsp/testdata/snippets/literal_snippets118.go.in b/gopls/internal/lsp/testdata/snippets/literal_snippets118.go.in
similarity index 100%
rename from internal/lsp/testdata/snippets/literal_snippets118.go.in
rename to gopls/internal/lsp/testdata/snippets/literal_snippets118.go.in
diff --git a/internal/lsp/testdata/snippets/postfix.go b/gopls/internal/lsp/testdata/snippets/postfix.go
similarity index 100%
rename from internal/lsp/testdata/snippets/postfix.go
rename to gopls/internal/lsp/testdata/snippets/postfix.go
diff --git a/internal/lsp/testdata/snippets/snippets.go.golden b/gopls/internal/lsp/testdata/snippets/snippets.go.golden
similarity index 100%
rename from internal/lsp/testdata/snippets/snippets.go.golden
rename to gopls/internal/lsp/testdata/snippets/snippets.go.golden
diff --git a/internal/lsp/testdata/snippets/snippets.go.in b/gopls/internal/lsp/testdata/snippets/snippets.go.in
similarity index 100%
rename from internal/lsp/testdata/snippets/snippets.go.in
rename to gopls/internal/lsp/testdata/snippets/snippets.go.in
diff --git a/internal/lsp/testdata/statements/append.go b/gopls/internal/lsp/testdata/statements/append.go
similarity index 100%
rename from internal/lsp/testdata/statements/append.go
rename to gopls/internal/lsp/testdata/statements/append.go
diff --git a/internal/lsp/testdata/statements/if_err_check_return.go b/gopls/internal/lsp/testdata/statements/if_err_check_return.go
similarity index 100%
rename from internal/lsp/testdata/statements/if_err_check_return.go
rename to gopls/internal/lsp/testdata/statements/if_err_check_return.go
diff --git a/internal/lsp/testdata/statements/if_err_check_return_2.go b/gopls/internal/lsp/testdata/statements/if_err_check_return_2.go
similarity index 100%
rename from internal/lsp/testdata/statements/if_err_check_return_2.go
rename to gopls/internal/lsp/testdata/statements/if_err_check_return_2.go
diff --git a/internal/lsp/testdata/statements/if_err_check_test.go b/gopls/internal/lsp/testdata/statements/if_err_check_test.go
similarity index 100%
rename from internal/lsp/testdata/statements/if_err_check_test.go
rename to gopls/internal/lsp/testdata/statements/if_err_check_test.go
diff --git a/internal/lsp/testdata/stub/other/other.go b/gopls/internal/lsp/testdata/stub/other/other.go
similarity index 100%
rename from internal/lsp/testdata/stub/other/other.go
rename to gopls/internal/lsp/testdata/stub/other/other.go
diff --git a/internal/lsp/testdata/stub/stub_add_selector.go b/gopls/internal/lsp/testdata/stub/stub_add_selector.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_add_selector.go
rename to gopls/internal/lsp/testdata/stub/stub_add_selector.go
diff --git a/internal/lsp/testdata/stub/stub_add_selector.go.golden b/gopls/internal/lsp/testdata/stub/stub_add_selector.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_add_selector.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_add_selector.go.golden
diff --git a/internal/lsp/testdata/stub/stub_assign.go b/gopls/internal/lsp/testdata/stub/stub_assign.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_assign.go
rename to gopls/internal/lsp/testdata/stub/stub_assign.go
diff --git a/internal/lsp/testdata/stub/stub_assign.go.golden b/gopls/internal/lsp/testdata/stub/stub_assign.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_assign.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_assign.go.golden
diff --git a/internal/lsp/testdata/stub/stub_assign_multivars.go b/gopls/internal/lsp/testdata/stub/stub_assign_multivars.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_assign_multivars.go
rename to gopls/internal/lsp/testdata/stub/stub_assign_multivars.go
diff --git a/internal/lsp/testdata/stub/stub_assign_multivars.go.golden b/gopls/internal/lsp/testdata/stub/stub_assign_multivars.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_assign_multivars.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_assign_multivars.go.golden
diff --git a/internal/lsp/testdata/stub/stub_call_expr.go b/gopls/internal/lsp/testdata/stub/stub_call_expr.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_call_expr.go
rename to gopls/internal/lsp/testdata/stub/stub_call_expr.go
diff --git a/internal/lsp/testdata/stub/stub_call_expr.go.golden b/gopls/internal/lsp/testdata/stub/stub_call_expr.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_call_expr.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_call_expr.go.golden
diff --git a/internal/lsp/testdata/stub/stub_embedded.go b/gopls/internal/lsp/testdata/stub/stub_embedded.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_embedded.go
rename to gopls/internal/lsp/testdata/stub/stub_embedded.go
diff --git a/internal/lsp/testdata/stub/stub_embedded.go.golden b/gopls/internal/lsp/testdata/stub/stub_embedded.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_embedded.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_embedded.go.golden
diff --git a/internal/lsp/testdata/stub/stub_err.go b/gopls/internal/lsp/testdata/stub/stub_err.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_err.go
rename to gopls/internal/lsp/testdata/stub/stub_err.go
diff --git a/internal/lsp/testdata/stub/stub_err.go.golden b/gopls/internal/lsp/testdata/stub/stub_err.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_err.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_err.go.golden
diff --git a/internal/lsp/testdata/stub/stub_function_return.go b/gopls/internal/lsp/testdata/stub/stub_function_return.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_function_return.go
rename to gopls/internal/lsp/testdata/stub/stub_function_return.go
diff --git a/internal/lsp/testdata/stub/stub_function_return.go.golden b/gopls/internal/lsp/testdata/stub/stub_function_return.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_function_return.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_function_return.go.golden
diff --git a/internal/lsp/testdata/stub/stub_generic_receiver.go b/gopls/internal/lsp/testdata/stub/stub_generic_receiver.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_generic_receiver.go
rename to gopls/internal/lsp/testdata/stub/stub_generic_receiver.go
diff --git a/internal/lsp/testdata/stub/stub_generic_receiver.go.golden b/gopls/internal/lsp/testdata/stub/stub_generic_receiver.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_generic_receiver.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_generic_receiver.go.golden
diff --git a/internal/lsp/testdata/stub/stub_ignored_imports.go b/gopls/internal/lsp/testdata/stub/stub_ignored_imports.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_ignored_imports.go
rename to gopls/internal/lsp/testdata/stub/stub_ignored_imports.go
diff --git a/internal/lsp/testdata/stub/stub_ignored_imports.go.golden b/gopls/internal/lsp/testdata/stub/stub_ignored_imports.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_ignored_imports.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_ignored_imports.go.golden
diff --git a/internal/lsp/testdata/stub/stub_multi_var.go b/gopls/internal/lsp/testdata/stub/stub_multi_var.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_multi_var.go
rename to gopls/internal/lsp/testdata/stub/stub_multi_var.go
diff --git a/internal/lsp/testdata/stub/stub_multi_var.go.golden b/gopls/internal/lsp/testdata/stub/stub_multi_var.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_multi_var.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_multi_var.go.golden
diff --git a/internal/lsp/testdata/stub/stub_pointer.go b/gopls/internal/lsp/testdata/stub/stub_pointer.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_pointer.go
rename to gopls/internal/lsp/testdata/stub/stub_pointer.go
diff --git a/internal/lsp/testdata/stub/stub_pointer.go.golden b/gopls/internal/lsp/testdata/stub/stub_pointer.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_pointer.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_pointer.go.golden
diff --git a/internal/lsp/testdata/stub/stub_renamed_import.go b/gopls/internal/lsp/testdata/stub/stub_renamed_import.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_renamed_import.go
rename to gopls/internal/lsp/testdata/stub/stub_renamed_import.go
diff --git a/internal/lsp/testdata/stub/stub_renamed_import.go.golden b/gopls/internal/lsp/testdata/stub/stub_renamed_import.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_renamed_import.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_renamed_import.go.golden
diff --git a/internal/lsp/testdata/stub/stub_renamed_import_iface.go b/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_renamed_import_iface.go
rename to gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go
diff --git a/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden b/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
diff --git a/internal/lsp/testdata/stub/stub_stdlib.go b/gopls/internal/lsp/testdata/stub/stub_stdlib.go
similarity index 100%
rename from internal/lsp/testdata/stub/stub_stdlib.go
rename to gopls/internal/lsp/testdata/stub/stub_stdlib.go
diff --git a/internal/lsp/testdata/stub/stub_stdlib.go.golden b/gopls/internal/lsp/testdata/stub/stub_stdlib.go.golden
similarity index 100%
rename from internal/lsp/testdata/stub/stub_stdlib.go.golden
rename to gopls/internal/lsp/testdata/stub/stub_stdlib.go.golden
diff --git a/internal/lsp/testdata/suggestedfix/has_suggested_fix.go b/gopls/internal/lsp/testdata/suggestedfix/has_suggested_fix.go
similarity index 100%
rename from internal/lsp/testdata/suggestedfix/has_suggested_fix.go
rename to gopls/internal/lsp/testdata/suggestedfix/has_suggested_fix.go
diff --git a/internal/lsp/testdata/suggestedfix/has_suggested_fix.go.golden b/gopls/internal/lsp/testdata/suggestedfix/has_suggested_fix.go.golden
similarity index 100%
rename from internal/lsp/testdata/suggestedfix/has_suggested_fix.go.golden
rename to gopls/internal/lsp/testdata/suggestedfix/has_suggested_fix.go.golden
diff --git a/internal/lsp/testdata/summary.txt.golden b/gopls/internal/lsp/testdata/summary.txt.golden
similarity index 100%
rename from internal/lsp/testdata/summary.txt.golden
rename to gopls/internal/lsp/testdata/summary.txt.golden
diff --git a/internal/lsp/testdata/summary_go1.18.txt.golden b/gopls/internal/lsp/testdata/summary_go1.18.txt.golden
similarity index 100%
rename from internal/lsp/testdata/summary_go1.18.txt.golden
rename to gopls/internal/lsp/testdata/summary_go1.18.txt.golden
diff --git a/internal/lsp/testdata/symbols/main.go b/gopls/internal/lsp/testdata/symbols/main.go
similarity index 100%
rename from internal/lsp/testdata/symbols/main.go
rename to gopls/internal/lsp/testdata/symbols/main.go
diff --git a/internal/lsp/testdata/symbols/main.go.golden b/gopls/internal/lsp/testdata/symbols/main.go.golden
similarity index 100%
rename from internal/lsp/testdata/symbols/main.go.golden
rename to gopls/internal/lsp/testdata/symbols/main.go.golden
diff --git a/internal/lsp/testdata/testy/testy.go b/gopls/internal/lsp/testdata/testy/testy.go
similarity index 100%
rename from internal/lsp/testdata/testy/testy.go
rename to gopls/internal/lsp/testdata/testy/testy.go
diff --git a/internal/lsp/testdata/testy/testy_test.go b/gopls/internal/lsp/testdata/testy/testy_test.go
similarity index 100%
rename from internal/lsp/testdata/testy/testy_test.go
rename to gopls/internal/lsp/testdata/testy/testy_test.go
diff --git a/internal/lsp/testdata/testy/testy_test.go.golden b/gopls/internal/lsp/testdata/testy/testy_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/testy/testy_test.go.golden
rename to gopls/internal/lsp/testdata/testy/testy_test.go.golden
diff --git a/internal/lsp/testdata/typdef/typdef.go b/gopls/internal/lsp/testdata/typdef/typdef.go
similarity index 100%
rename from internal/lsp/testdata/typdef/typdef.go
rename to gopls/internal/lsp/testdata/typdef/typdef.go
diff --git a/internal/lsp/testdata/typeassert/type_assert.go b/gopls/internal/lsp/testdata/typeassert/type_assert.go
similarity index 100%
rename from internal/lsp/testdata/typeassert/type_assert.go
rename to gopls/internal/lsp/testdata/typeassert/type_assert.go
diff --git a/internal/lsp/testdata/typeerrors/noresultvalues.go b/gopls/internal/lsp/testdata/typeerrors/noresultvalues.go
similarity index 100%
rename from internal/lsp/testdata/typeerrors/noresultvalues.go
rename to gopls/internal/lsp/testdata/typeerrors/noresultvalues.go
diff --git a/internal/lsp/testdata/typeerrors/noresultvalues.go.golden b/gopls/internal/lsp/testdata/typeerrors/noresultvalues.go.golden
similarity index 100%
rename from internal/lsp/testdata/typeerrors/noresultvalues.go.golden
rename to gopls/internal/lsp/testdata/typeerrors/noresultvalues.go.golden
diff --git a/internal/lsp/testdata/typemods/type_mods.go b/gopls/internal/lsp/testdata/typemods/type_mods.go
similarity index 100%
rename from internal/lsp/testdata/typemods/type_mods.go
rename to gopls/internal/lsp/testdata/typemods/type_mods.go
diff --git a/internal/lsp/testdata/typeparams/type_params.go b/gopls/internal/lsp/testdata/typeparams/type_params.go
similarity index 100%
rename from internal/lsp/testdata/typeparams/type_params.go
rename to gopls/internal/lsp/testdata/typeparams/type_params.go
diff --git a/internal/lsp/testdata/types/types.go b/gopls/internal/lsp/testdata/types/types.go
similarity index 100%
rename from internal/lsp/testdata/types/types.go
rename to gopls/internal/lsp/testdata/types/types.go
diff --git a/internal/lsp/testdata/undeclared/var.go b/gopls/internal/lsp/testdata/undeclared/var.go
similarity index 100%
rename from internal/lsp/testdata/undeclared/var.go
rename to gopls/internal/lsp/testdata/undeclared/var.go
diff --git a/internal/lsp/testdata/undeclared/var.go.golden b/gopls/internal/lsp/testdata/undeclared/var.go.golden
similarity index 100%
rename from internal/lsp/testdata/undeclared/var.go.golden
rename to gopls/internal/lsp/testdata/undeclared/var.go.golden
diff --git a/internal/lsp/testdata/unimported/export_test.go b/gopls/internal/lsp/testdata/unimported/export_test.go
similarity index 100%
rename from internal/lsp/testdata/unimported/export_test.go
rename to gopls/internal/lsp/testdata/unimported/export_test.go
diff --git a/internal/lsp/testdata/unimported/unimported.go.in b/gopls/internal/lsp/testdata/unimported/unimported.go.in
similarity index 100%
rename from internal/lsp/testdata/unimported/unimported.go.in
rename to gopls/internal/lsp/testdata/unimported/unimported.go.in
diff --git a/internal/lsp/testdata/unimported/unimported_cand_type.go b/gopls/internal/lsp/testdata/unimported/unimported_cand_type.go
similarity index 100%
rename from internal/lsp/testdata/unimported/unimported_cand_type.go
rename to gopls/internal/lsp/testdata/unimported/unimported_cand_type.go
diff --git a/internal/lsp/testdata/unimported/x_test.go b/gopls/internal/lsp/testdata/unimported/x_test.go
similarity index 100%
rename from internal/lsp/testdata/unimported/x_test.go
rename to gopls/internal/lsp/testdata/unimported/x_test.go
diff --git a/internal/lsp/testdata/unresolved/unresolved.go.in b/gopls/internal/lsp/testdata/unresolved/unresolved.go.in
similarity index 100%
rename from internal/lsp/testdata/unresolved/unresolved.go.in
rename to gopls/internal/lsp/testdata/unresolved/unresolved.go.in
diff --git a/internal/lsp/testdata/unsafe/unsafe.go b/gopls/internal/lsp/testdata/unsafe/unsafe.go
similarity index 100%
rename from internal/lsp/testdata/unsafe/unsafe.go
rename to gopls/internal/lsp/testdata/unsafe/unsafe.go
diff --git a/internal/lsp/testdata/variadic/variadic.go.in b/gopls/internal/lsp/testdata/variadic/variadic.go.in
similarity index 100%
rename from internal/lsp/testdata/variadic/variadic.go.in
rename to gopls/internal/lsp/testdata/variadic/variadic.go.in
diff --git a/internal/lsp/testdata/variadic/variadic_intf.go b/gopls/internal/lsp/testdata/variadic/variadic_intf.go
similarity index 100%
rename from internal/lsp/testdata/variadic/variadic_intf.go
rename to gopls/internal/lsp/testdata/variadic/variadic_intf.go
diff --git a/internal/lsp/testdata/workspacesymbol/a/a.go b/gopls/internal/lsp/testdata/workspacesymbol/a/a.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a.go
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a.go
diff --git a/internal/lsp/testdata/workspacesymbol/a/a.go.golden b/gopls/internal/lsp/testdata/workspacesymbol/a/a.go.golden
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a.go.golden
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a.go.golden
diff --git a/internal/lsp/testdata/workspacesymbol/a/a_test.go b/gopls/internal/lsp/testdata/workspacesymbol/a/a_test.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a_test.go
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a_test.go
diff --git a/internal/lsp/testdata/workspacesymbol/a/a_test.go.golden b/gopls/internal/lsp/testdata/workspacesymbol/a/a_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a_test.go.golden
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a_test.go.golden
diff --git a/internal/lsp/testdata/workspacesymbol/a/a_x_test.go b/gopls/internal/lsp/testdata/workspacesymbol/a/a_x_test.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a_x_test.go
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a_x_test.go
diff --git a/internal/lsp/testdata/workspacesymbol/a/a_x_test.go.golden b/gopls/internal/lsp/testdata/workspacesymbol/a/a_x_test.go.golden
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/a/a_x_test.go.golden
rename to gopls/internal/lsp/testdata/workspacesymbol/a/a_x_test.go.golden
diff --git a/internal/lsp/testdata/workspacesymbol/b/b.go b/gopls/internal/lsp/testdata/workspacesymbol/b/b.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/b/b.go
rename to gopls/internal/lsp/testdata/workspacesymbol/b/b.go
diff --git a/internal/lsp/testdata/workspacesymbol/b/b.go.golden b/gopls/internal/lsp/testdata/workspacesymbol/b/b.go.golden
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/b/b.go.golden
rename to gopls/internal/lsp/testdata/workspacesymbol/b/b.go.golden
diff --git a/internal/lsp/testdata/workspacesymbol/issue44806.go b/gopls/internal/lsp/testdata/workspacesymbol/issue44806.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/issue44806.go
rename to gopls/internal/lsp/testdata/workspacesymbol/issue44806.go
diff --git a/internal/lsp/testdata/workspacesymbol/main.go b/gopls/internal/lsp/testdata/workspacesymbol/main.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/main.go
rename to gopls/internal/lsp/testdata/workspacesymbol/main.go
diff --git a/internal/lsp/testdata/workspacesymbol/p/p.go b/gopls/internal/lsp/testdata/workspacesymbol/p/p.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/p/p.go
rename to gopls/internal/lsp/testdata/workspacesymbol/p/p.go
diff --git a/internal/lsp/testdata/workspacesymbol/query.go b/gopls/internal/lsp/testdata/workspacesymbol/query.go
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/query.go
rename to gopls/internal/lsp/testdata/workspacesymbol/query.go
diff --git a/internal/lsp/testdata/workspacesymbol/query.go.golden b/gopls/internal/lsp/testdata/workspacesymbol/query.go.golden
similarity index 100%
rename from internal/lsp/testdata/workspacesymbol/query.go.golden
rename to gopls/internal/lsp/testdata/workspacesymbol/query.go.golden
diff --git a/internal/lsp/tests/README.md b/gopls/internal/lsp/tests/README.md
similarity index 95%
rename from internal/lsp/tests/README.md
rename to gopls/internal/lsp/tests/README.md
index 64ced79..07df288 100644
--- a/internal/lsp/tests/README.md
+++ b/gopls/internal/lsp/tests/README.md
@@ -26,7 +26,7 @@
```
The format of these headings vary: they are defined by the
-[`Golden`](https://pkg.go.dev/golang.org/x/tools/internal/lsp/tests#Data.Golden)
+[`Golden`](https://pkg.go.dev/golang.org/x/tools/gopls/internal/lsp/tests#Data.Golden)
function for each annotation. In the case above, the format is: annotation
name, file name, annotation line location, annotation character location.
diff --git a/internal/lsp/tests/compare/text.go b/gopls/internal/lsp/tests/compare/text.go
similarity index 96%
rename from internal/lsp/tests/compare/text.go
rename to gopls/internal/lsp/tests/compare/text.go
index efc2e8c..a302396 100644
--- a/internal/lsp/tests/compare/text.go
+++ b/gopls/internal/lsp/tests/compare/text.go
@@ -7,7 +7,7 @@
import (
"fmt"
- "golang.org/x/tools/internal/lsp/diff"
+ "golang.org/x/tools/internal/diff"
)
// Text returns a formatted unified diff of the edits to go from want to
diff --git a/internal/lsp/tests/compare/text_test.go b/gopls/internal/lsp/tests/compare/text_test.go
similarity index 92%
rename from internal/lsp/tests/compare/text_test.go
rename to gopls/internal/lsp/tests/compare/text_test.go
index 6b3aaea..8f5af48 100644
--- a/internal/lsp/tests/compare/text_test.go
+++ b/gopls/internal/lsp/tests/compare/text_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
func TestText(t *testing.T) {
diff --git a/internal/lsp/tests/markdown_go118.go b/gopls/internal/lsp/tests/markdown_go118.go
similarity index 96%
rename from internal/lsp/tests/markdown_go118.go
rename to gopls/internal/lsp/tests/markdown_go118.go
index 37ad62d..c8c5eef 100644
--- a/internal/lsp/tests/markdown_go118.go
+++ b/gopls/internal/lsp/tests/markdown_go118.go
@@ -12,7 +12,7 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
// The markdown in the golden files matches the converter in comment.go,
diff --git a/internal/lsp/tests/markdown_go119.go b/gopls/internal/lsp/tests/markdown_go119.go
similarity index 92%
rename from internal/lsp/tests/markdown_go119.go
rename to gopls/internal/lsp/tests/markdown_go119.go
index 51aea4d..e09ed62 100644
--- a/internal/lsp/tests/markdown_go119.go
+++ b/gopls/internal/lsp/tests/markdown_go119.go
@@ -10,7 +10,7 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
// The markdown in the golden files matches the converter in comment.go,
diff --git a/internal/lsp/tests/normalizer.go b/gopls/internal/lsp/tests/normalizer.go
similarity index 100%
rename from internal/lsp/tests/normalizer.go
rename to gopls/internal/lsp/tests/normalizer.go
diff --git a/internal/lsp/tests/tests.go b/gopls/internal/lsp/tests/tests.go
similarity index 99%
rename from internal/lsp/tests/tests.go
rename to gopls/internal/lsp/tests/tests.go
index 53c04f1..cad0e9a 100644
--- a/internal/lsp/tests/tests.go
+++ b/gopls/internal/lsp/tests/tests.go
@@ -27,11 +27,11 @@
"golang.org/x/tools/go/expect"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/go/packages/packagestest"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/source/completion"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source/completion"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/testenv"
"golang.org/x/tools/internal/typeparams"
diff --git a/internal/lsp/tests/util.go b/gopls/internal/lsp/tests/util.go
similarity index 98%
rename from internal/lsp/tests/util.go
rename to gopls/internal/lsp/tests/util.go
index 66ff217..d697f18 100644
--- a/internal/lsp/tests/util.go
+++ b/gopls/internal/lsp/tests/util.go
@@ -16,11 +16,11 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/myers"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/source/completion"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/myers"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/source/completion"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/text_synchronization.go b/gopls/internal/lsp/text_synchronization.go
similarity index 98%
rename from internal/lsp/text_synchronization.go
rename to gopls/internal/lsp/text_synchronization.go
index dd67145..c360e1e 100644
--- a/internal/lsp/text_synchronization.go
+++ b/gopls/internal/lsp/text_synchronization.go
@@ -14,8 +14,8 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/jsonrpc2"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
"golang.org/x/tools/internal/xcontext"
)
diff --git a/internal/lsp/work/completion.go b/gopls/internal/lsp/work/completion.go
similarity index 97%
rename from internal/lsp/work/completion.go
rename to gopls/internal/lsp/work/completion.go
index c7227bc..623d2ce 100644
--- a/internal/lsp/work/completion.go
+++ b/gopls/internal/lsp/work/completion.go
@@ -15,8 +15,8 @@
"strings"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Completion(ctx context.Context, snapshot source.Snapshot, fh source.VersionedFileHandle, position protocol.Position) (*protocol.CompletionList, error) {
diff --git a/internal/lsp/work/diagnostics.go b/gopls/internal/lsp/work/diagnostics.go
similarity index 94%
rename from internal/lsp/work/diagnostics.go
rename to gopls/internal/lsp/work/diagnostics.go
index e583e60..0a38219 100644
--- a/internal/lsp/work/diagnostics.go
+++ b/gopls/internal/lsp/work/diagnostics.go
@@ -12,9 +12,9 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/debug/tag"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/internal/event/tag"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/work/format.go b/gopls/internal/lsp/work/format.go
similarity index 88%
rename from internal/lsp/work/format.go
rename to gopls/internal/lsp/work/format.go
index 35b804a..ef5ac46 100644
--- a/internal/lsp/work/format.go
+++ b/gopls/internal/lsp/work/format.go
@@ -9,8 +9,8 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Format(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle) ([]protocol.TextEdit, error) {
diff --git a/internal/lsp/work/hover.go b/gopls/internal/lsp/work/hover.go
similarity index 95%
rename from internal/lsp/work/hover.go
rename to gopls/internal/lsp/work/hover.go
index 8f7822d..ea4c1e5 100644
--- a/internal/lsp/work/hover.go
+++ b/gopls/internal/lsp/work/hover.go
@@ -12,8 +12,8 @@
"golang.org/x/mod/modfile"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func Hover(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle, position protocol.Position) (*protocol.Hover, error) {
diff --git a/internal/lsp/workspace.go b/gopls/internal/lsp/workspace.go
similarity index 96%
rename from internal/lsp/workspace.go
rename to gopls/internal/lsp/workspace.go
index b41406d..79f144b 100644
--- a/internal/lsp/workspace.go
+++ b/gopls/internal/lsp/workspace.go
@@ -8,8 +8,8 @@
"context"
"fmt"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/workspace_symbol.go b/gopls/internal/lsp/workspace_symbol.go
similarity index 86%
rename from internal/lsp/workspace_symbol.go
rename to gopls/internal/lsp/workspace_symbol.go
index 20c5763..9101a3e 100644
--- a/internal/lsp/workspace_symbol.go
+++ b/gopls/internal/lsp/workspace_symbol.go
@@ -8,8 +8,8 @@
"context"
"golang.org/x/tools/internal/event"
- "golang.org/x/tools/internal/lsp/protocol"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/source"
)
func (s *Server) symbol(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error) {
diff --git a/gopls/internal/regtest/bench/bench_test.go b/gopls/internal/regtest/bench/bench_test.go
index c790180..98d783c 100644
--- a/gopls/internal/regtest/bench/bench_test.go
+++ b/gopls/internal/regtest/bench/bench_test.go
@@ -18,16 +18,16 @@
"time"
"golang.org/x/tools/gopls/internal/hooks"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
+ "golang.org/x/tools/internal/bug"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/fakenet"
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/lsprpc"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// This package implements benchmarks that share a common editor session.
diff --git a/gopls/internal/regtest/bench/completion_test.go b/gopls/internal/regtest/bench/completion_test.go
index a8725ce..7b833b6 100644
--- a/gopls/internal/regtest/bench/completion_test.go
+++ b/gopls/internal/regtest/bench/completion_test.go
@@ -10,9 +10,9 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
)
type completionBenchOptions struct {
diff --git a/gopls/internal/regtest/bench/didchange_test.go b/gopls/internal/regtest/bench/didchange_test.go
index 00048f8..5fd5e9c 100644
--- a/gopls/internal/regtest/bench/didchange_test.go
+++ b/gopls/internal/regtest/bench/didchange_test.go
@@ -8,7 +8,7 @@
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
)
// BenchmarkDidChange benchmarks modifications of a single file by making
diff --git a/gopls/internal/regtest/bench/iwl_test.go b/gopls/internal/regtest/bench/iwl_test.go
index b11173a..baa92fc 100644
--- a/gopls/internal/regtest/bench/iwl_test.go
+++ b/gopls/internal/regtest/bench/iwl_test.go
@@ -8,8 +8,8 @@
"context"
"testing"
- "golang.org/x/tools/internal/lsp/fake"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// BenchmarkInitialWorkspaceLoad benchmarks the initial workspace load time for
diff --git a/gopls/internal/regtest/bench/stress_test.go b/gopls/internal/regtest/bench/stress_test.go
index a410c30..b1198b4 100644
--- a/gopls/internal/regtest/bench/stress_test.go
+++ b/gopls/internal/regtest/bench/stress_test.go
@@ -12,11 +12,11 @@
"time"
"golang.org/x/tools/gopls/internal/hooks"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/lsprpc"
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/jsonrpc2/servertest"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/lsprpc"
)
// github.com/pilosa/pilosa is a repository that has historically caused
diff --git a/gopls/internal/regtest/codelens/codelens_test.go b/gopls/internal/regtest/codelens/codelens_test.go
index f67e2da..a0ddfe6 100644
--- a/gopls/internal/regtest/codelens/codelens_test.go
+++ b/gopls/internal/regtest/codelens/codelens_test.go
@@ -9,12 +9,12 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
+ "golang.org/x/tools/internal/bug"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/codelens/gcdetails_test.go b/gopls/internal/regtest/codelens/gcdetails_test.go
index 3764888..762694a 100644
--- a/gopls/internal/regtest/codelens/gcdetails_test.go
+++ b/gopls/internal/regtest/codelens/gcdetails_test.go
@@ -11,11 +11,11 @@
"golang.org/x/tools/internal/testenv"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
)
func TestGCDetails_Toggle(t *testing.T) {
diff --git a/gopls/internal/regtest/completion/completion18_test.go b/gopls/internal/regtest/completion/completion18_test.go
index 9683e30..7c53252 100644
--- a/gopls/internal/regtest/completion/completion18_test.go
+++ b/gopls/internal/regtest/completion/completion18_test.go
@@ -10,7 +10,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// test generic receivers
diff --git a/gopls/internal/regtest/completion/completion_test.go b/gopls/internal/regtest/completion/completion_test.go
index 51a54c4..eaf4327 100644
--- a/gopls/internal/regtest/completion/completion_test.go
+++ b/gopls/internal/regtest/completion/completion_test.go
@@ -10,11 +10,11 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/completion/postfix_snippet_test.go b/gopls/internal/regtest/completion/postfix_snippet_test.go
index 5486047..e02f4c8 100644
--- a/gopls/internal/regtest/completion/postfix_snippet_test.go
+++ b/gopls/internal/regtest/completion/postfix_snippet_test.go
@@ -8,7 +8,7 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestPostfixSnippetCompletion(t *testing.T) {
diff --git a/gopls/internal/regtest/debug/debug_test.go b/gopls/internal/regtest/debug/debug_test.go
index bae1480..f8efb8f 100644
--- a/gopls/internal/regtest/debug/debug_test.go
+++ b/gopls/internal/regtest/debug/debug_test.go
@@ -8,8 +8,8 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
)
func TestMain(m *testing.M) {
diff --git a/gopls/internal/regtest/diagnostics/analysis_test.go b/gopls/internal/regtest/diagnostics/analysis_test.go
index fbebf60..56ee23f 100644
--- a/gopls/internal/regtest/diagnostics/analysis_test.go
+++ b/gopls/internal/regtest/diagnostics/analysis_test.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// Test for the timeformat analyzer, following golang/vscode-go#2406.
diff --git a/gopls/internal/regtest/diagnostics/builtin_test.go b/gopls/internal/regtest/diagnostics/builtin_test.go
index 775e7ec..8de47bc 100644
--- a/gopls/internal/regtest/diagnostics/builtin_test.go
+++ b/gopls/internal/regtest/diagnostics/builtin_test.go
@@ -8,7 +8,7 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestIssue44866(t *testing.T) {
diff --git a/gopls/internal/regtest/diagnostics/diagnostics_test.go b/gopls/internal/regtest/diagnostics/diagnostics_test.go
index 432b9b1..473d9b7 100644
--- a/gopls/internal/regtest/diagnostics/diagnostics_test.go
+++ b/gopls/internal/regtest/diagnostics/diagnostics_test.go
@@ -11,12 +11,12 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
- "golang.org/x/tools/internal/lsp"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/diagnostics/invalidation_test.go b/gopls/internal/regtest/diagnostics/invalidation_test.go
index ea65037..2f0b173 100644
--- a/gopls/internal/regtest/diagnostics/invalidation_test.go
+++ b/gopls/internal/regtest/diagnostics/invalidation_test.go
@@ -8,8 +8,8 @@
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// Test for golang/go#50267: diagnostics should be re-sent after a file is
diff --git a/gopls/internal/regtest/diagnostics/undeclared_test.go b/gopls/internal/regtest/diagnostics/undeclared_test.go
index ed2b1d0..c3456fa 100644
--- a/gopls/internal/regtest/diagnostics/undeclared_test.go
+++ b/gopls/internal/regtest/diagnostics/undeclared_test.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestUndeclaredDiagnostics(t *testing.T) {
diff --git a/gopls/internal/regtest/inlayhints/inlayhints_test.go b/gopls/internal/regtest/inlayhints/inlayhints_test.go
index 1ca1dfb..4c8e757 100644
--- a/gopls/internal/regtest/inlayhints/inlayhints_test.go
+++ b/gopls/internal/regtest/inlayhints/inlayhints_test.go
@@ -7,9 +7,9 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/source"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/internal/bug"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/call_hierarchy_test.go b/gopls/internal/regtest/misc/call_hierarchy_test.go
index 9d98896..ece05b0 100644
--- a/gopls/internal/regtest/misc/call_hierarchy_test.go
+++ b/gopls/internal/regtest/misc/call_hierarchy_test.go
@@ -6,8 +6,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// Test for golang/go#49125
diff --git a/gopls/internal/regtest/misc/configuration_test.go b/gopls/internal/regtest/misc/configuration_test.go
index 433f96e..9cd0f0f 100644
--- a/gopls/internal/regtest/misc/configuration_test.go
+++ b/gopls/internal/regtest/misc/configuration_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/debugserver_test.go b/gopls/internal/regtest/misc/debugserver_test.go
index c0df870..519f794 100644
--- a/gopls/internal/regtest/misc/debugserver_test.go
+++ b/gopls/internal/regtest/misc/debugserver_test.go
@@ -8,10 +8,10 @@
"net/http"
"testing"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestStartDebugging(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/definition_test.go b/gopls/internal/regtest/misc/definition_test.go
index 1842cb5..f2b7b1a 100644
--- a/gopls/internal/regtest/misc/definition_test.go
+++ b/gopls/internal/regtest/misc/definition_test.go
@@ -9,12 +9,12 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
"golang.org/x/tools/internal/testenv"
- "golang.org/x/tools/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
)
const internalDefinition = `
diff --git a/gopls/internal/regtest/misc/embed_test.go b/gopls/internal/regtest/misc/embed_test.go
index 2e66d78..3730e5a 100644
--- a/gopls/internal/regtest/misc/embed_test.go
+++ b/gopls/internal/regtest/misc/embed_test.go
@@ -6,7 +6,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/failures_test.go b/gopls/internal/regtest/misc/failures_test.go
index 185a68c..9ec5fb5 100644
--- a/gopls/internal/regtest/misc/failures_test.go
+++ b/gopls/internal/regtest/misc/failures_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// This test passes (TestHoverOnError in definition_test.go) without
diff --git a/gopls/internal/regtest/misc/fix_test.go b/gopls/internal/regtest/misc/fix_test.go
index 6c3ea7c..f9283d7 100644
--- a/gopls/internal/regtest/misc/fix_test.go
+++ b/gopls/internal/regtest/misc/fix_test.go
@@ -7,10 +7,10 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// A basic test for fillstruct, now that it uses a command.
diff --git a/gopls/internal/regtest/misc/formatting_test.go b/gopls/internal/regtest/misc/formatting_test.go
index a697b7a..6b20afa 100644
--- a/gopls/internal/regtest/misc/formatting_test.go
+++ b/gopls/internal/regtest/misc/formatting_test.go
@@ -8,8 +8,8 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
const unformattedProgram = `
diff --git a/gopls/internal/regtest/misc/generate_test.go b/gopls/internal/regtest/misc/generate_test.go
index 4478951..ca3461d 100644
--- a/gopls/internal/regtest/misc/generate_test.go
+++ b/gopls/internal/regtest/misc/generate_test.go
@@ -12,7 +12,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestGenerateProgress(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/highlight_test.go b/gopls/internal/regtest/misc/highlight_test.go
index affbffd..8e7ce52 100644
--- a/gopls/internal/regtest/misc/highlight_test.go
+++ b/gopls/internal/regtest/misc/highlight_test.go
@@ -8,9 +8,9 @@
"sort"
"testing"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestWorkspacePackageHighlight(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/hover_test.go b/gopls/internal/regtest/misc/hover_test.go
index 4701b07..bea370a 100644
--- a/gopls/internal/regtest/misc/hover_test.go
+++ b/gopls/internal/regtest/misc/hover_test.go
@@ -9,8 +9,8 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/fake"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/import_test.go b/gopls/internal/regtest/misc/import_test.go
index ef4fbde..2e95e83 100644
--- a/gopls/internal/regtest/misc/import_test.go
+++ b/gopls/internal/regtest/misc/import_test.go
@@ -8,10 +8,10 @@
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
)
func TestAddImport(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/imports_test.go b/gopls/internal/regtest/misc/imports_test.go
index c0e213e..8a781bd 100644
--- a/gopls/internal/regtest/misc/imports_test.go
+++ b/gopls/internal/regtest/misc/imports_test.go
@@ -11,9 +11,9 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/link_test.go b/gopls/internal/regtest/misc/link_test.go
index 3dc195a..5e937f7 100644
--- a/gopls/internal/regtest/misc/link_test.go
+++ b/gopls/internal/regtest/misc/link_test.go
@@ -8,7 +8,7 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/misc_test.go b/gopls/internal/regtest/misc/misc_test.go
index c553bdb..12aea69 100644
--- a/gopls/internal/regtest/misc/misc_test.go
+++ b/gopls/internal/regtest/misc/misc_test.go
@@ -8,8 +8,8 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
)
func TestMain(m *testing.M) {
diff --git a/gopls/internal/regtest/misc/multiple_adhoc_test.go b/gopls/internal/regtest/misc/multiple_adhoc_test.go
index 5f803e4..400e784 100644
--- a/gopls/internal/regtest/misc/multiple_adhoc_test.go
+++ b/gopls/internal/regtest/misc/multiple_adhoc_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestMultipleAdHocPackages(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/references_test.go b/gopls/internal/regtest/misc/references_test.go
index de2e9b9..058aad3 100644
--- a/gopls/internal/regtest/misc/references_test.go
+++ b/gopls/internal/regtest/misc/references_test.go
@@ -9,7 +9,7 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestStdlibReferences(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/rename_test.go b/gopls/internal/regtest/misc/rename_test.go
index 1d980d9..70fc9c9 100644
--- a/gopls/internal/regtest/misc/rename_test.go
+++ b/gopls/internal/regtest/misc/rename_test.go
@@ -8,8 +8,8 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/semantictokens_test.go b/gopls/internal/regtest/misc/semantictokens_test.go
index 4437d40..b0296ee 100644
--- a/gopls/internal/regtest/misc/semantictokens_test.go
+++ b/gopls/internal/regtest/misc/semantictokens_test.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestBadURICrash_VSCodeIssue1498(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/settings_test.go b/gopls/internal/regtest/misc/settings_test.go
index 62d3d90..dd40429 100644
--- a/gopls/internal/regtest/misc/settings_test.go
+++ b/gopls/internal/regtest/misc/settings_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestEmptyDirectoryFilters_Issue51843(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/shared_test.go b/gopls/internal/regtest/misc/shared_test.go
index 64e0720..e47ca29 100644
--- a/gopls/internal/regtest/misc/shared_test.go
+++ b/gopls/internal/regtest/misc/shared_test.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/fake"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// Smoke test that simultaneous editing sessions in the same workspace works.
diff --git a/gopls/internal/regtest/misc/staticcheck_test.go b/gopls/internal/regtest/misc/staticcheck_test.go
index 6f1bda3..8676690 100644
--- a/gopls/internal/regtest/misc/staticcheck_test.go
+++ b/gopls/internal/regtest/misc/staticcheck_test.go
@@ -9,7 +9,7 @@
"golang.org/x/tools/internal/testenv"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestStaticcheckGenerics(t *testing.T) {
diff --git a/gopls/internal/regtest/misc/vendor_test.go b/gopls/internal/regtest/misc/vendor_test.go
index b0f507a..cec33ca 100644
--- a/gopls/internal/regtest/misc/vendor_test.go
+++ b/gopls/internal/regtest/misc/vendor_test.go
@@ -7,9 +7,9 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/vuln_test.go b/gopls/internal/regtest/misc/vuln_test.go
index 41d0375..b17a279 100644
--- a/gopls/internal/regtest/misc/vuln_test.go
+++ b/gopls/internal/regtest/misc/vuln_test.go
@@ -9,9 +9,9 @@
"path/filepath"
"testing"
- "golang.org/x/tools/internal/lsp/command"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/misc/workspace_symbol_test.go b/gopls/internal/regtest/misc/workspace_symbol_test.go
index 2dc3a1b..4ba3135 100644
--- a/gopls/internal/regtest/misc/workspace_symbol_test.go
+++ b/gopls/internal/regtest/misc/workspace_symbol_test.go
@@ -7,9 +7,9 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/modfile/modfile_test.go b/gopls/internal/regtest/modfile/modfile_test.go
index dee7cb3..7da8830 100644
--- a/gopls/internal/regtest/modfile/modfile_test.go
+++ b/gopls/internal/regtest/modfile/modfile_test.go
@@ -11,11 +11,11 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
- "golang.org/x/tools/internal/lsp/tests/compare"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/tests/compare"
+ "golang.org/x/tools/internal/bug"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/template/template_test.go b/gopls/internal/regtest/template/template_test.go
index ade9ac9..91c704d 100644
--- a/gopls/internal/regtest/template/template_test.go
+++ b/gopls/internal/regtest/template/template_test.go
@@ -9,9 +9,9 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/protocol"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
)
func TestMain(m *testing.M) {
diff --git a/gopls/internal/regtest/watch/watch_test.go b/gopls/internal/regtest/watch/watch_test.go
index 3165595..1be766b 100644
--- a/gopls/internal/regtest/watch/watch_test.go
+++ b/gopls/internal/regtest/watch/watch_test.go
@@ -8,11 +8,11 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
+ "golang.org/x/tools/internal/bug"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/workspace/broken_test.go b/gopls/internal/regtest/workspace/broken_test.go
index b06c155..f839b0a 100644
--- a/gopls/internal/regtest/workspace/broken_test.go
+++ b/gopls/internal/regtest/workspace/broken_test.go
@@ -8,8 +8,8 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp"
- . "golang.org/x/tools/internal/lsp/regtest"
+ "golang.org/x/tools/gopls/internal/lsp"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/workspace/directoryfilters_test.go b/gopls/internal/regtest/workspace/directoryfilters_test.go
index bdc60a0..3efa9f3 100644
--- a/gopls/internal/regtest/workspace/directoryfilters_test.go
+++ b/gopls/internal/regtest/workspace/directoryfilters_test.go
@@ -9,7 +9,7 @@
"strings"
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// This file contains regression tests for the directoryFilters setting.
diff --git a/gopls/internal/regtest/workspace/fromenv_test.go b/gopls/internal/regtest/workspace/fromenv_test.go
index 8a77867..83059bc 100644
--- a/gopls/internal/regtest/workspace/fromenv_test.go
+++ b/gopls/internal/regtest/workspace/fromenv_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
// Test that setting go.work via environment variables or settings works.
diff --git a/gopls/internal/regtest/workspace/metadata_test.go b/gopls/internal/regtest/workspace/metadata_test.go
index 4c3f46b..0356ebc 100644
--- a/gopls/internal/regtest/workspace/metadata_test.go
+++ b/gopls/internal/regtest/workspace/metadata_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/internal/regtest/workspace/workspace_test.go b/gopls/internal/regtest/workspace/workspace_test.go
index 5196aa9..cf24886 100644
--- a/gopls/internal/regtest/workspace/workspace_test.go
+++ b/gopls/internal/regtest/workspace/workspace_test.go
@@ -11,12 +11,12 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
+ "golang.org/x/tools/internal/bug"
"golang.org/x/tools/internal/testenv"
- . "golang.org/x/tools/internal/lsp/regtest"
+ . "golang.org/x/tools/gopls/internal/lsp/regtest"
)
func TestMain(m *testing.M) {
diff --git a/gopls/internal/vulncheck/command.go b/gopls/internal/vulncheck/command.go
index b9aba15..9ed1e0b 100644
--- a/gopls/internal/vulncheck/command.go
+++ b/gopls/internal/vulncheck/command.go
@@ -16,7 +16,7 @@
"golang.org/x/tools/go/packages"
gvc "golang.org/x/tools/gopls/internal/govulncheck"
- "golang.org/x/tools/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/vuln/client"
"golang.org/x/vuln/osv"
"golang.org/x/vuln/vulncheck"
diff --git a/gopls/internal/vulncheck/command_test.go b/gopls/internal/vulncheck/command_test.go
index 1ce1fae..9b8678d 100644
--- a/gopls/internal/vulncheck/command_test.go
+++ b/gopls/internal/vulncheck/command_test.go
@@ -20,10 +20,10 @@
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/fake"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/fake"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
"golang.org/x/vuln/client"
"golang.org/x/vuln/osv"
)
diff --git a/gopls/internal/vulncheck/util.go b/gopls/internal/vulncheck/util.go
index 05332d3..d21d305 100644
--- a/gopls/internal/vulncheck/util.go
+++ b/gopls/internal/vulncheck/util.go
@@ -15,7 +15,7 @@
"os/exec"
gvc "golang.org/x/tools/gopls/internal/govulncheck"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/vuln/osv"
"golang.org/x/vuln/vulncheck"
)
diff --git a/gopls/internal/vulncheck/vulncheck.go b/gopls/internal/vulncheck/vulncheck.go
index 7fc05ae..227b57d 100644
--- a/gopls/internal/vulncheck/vulncheck.go
+++ b/gopls/internal/vulncheck/vulncheck.go
@@ -13,7 +13,7 @@
"errors"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/command"
+ "golang.org/x/tools/gopls/internal/lsp/command"
)
// Govulncheck runs the in-process govulncheck implementation.
diff --git a/gopls/main.go b/gopls/main.go
index f73eabf..837a01d 100644
--- a/gopls/main.go
+++ b/gopls/main.go
@@ -17,7 +17,7 @@
"os"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/cmd"
+ "golang.org/x/tools/gopls/internal/lsp/cmd"
"golang.org/x/tools/internal/tool"
)
diff --git a/gopls/release/release.go b/gopls/release/release.go
index 1739091..fb456b6 100644
--- a/gopls/release/release.go
+++ b/gopls/release/release.go
@@ -135,7 +135,7 @@
Mode: packages.NeedName | packages.NeedFiles |
packages.NeedCompiledGoFiles | packages.NeedImports |
packages.NeedTypes | packages.NeedTypesSizes,
- }, "golang.org/x/tools/internal/lsp/debug")
+ }, "golang.org/x/tools/gopls/internal/lsp/debug")
if err != nil {
return err
}
diff --git a/gopls/test/debug/debug_test.go b/gopls/test/debug/debug_test.go
index 4d680ee..9c6c0d6 100644
--- a/gopls/test/debug/debug_test.go
+++ b/gopls/test/debug/debug_test.go
@@ -21,9 +21,9 @@
"github.com/jba/templatecheck"
"golang.org/x/tools/go/packages"
- "golang.org/x/tools/internal/lsp/cache"
- "golang.org/x/tools/internal/lsp/debug"
- "golang.org/x/tools/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/cache"
+ "golang.org/x/tools/gopls/internal/lsp/debug"
+ "golang.org/x/tools/gopls/internal/lsp/source"
"golang.org/x/tools/internal/span"
)
@@ -90,7 +90,7 @@
cfg := &packages.Config{
Mode: packages.NeedTypesInfo | packages.LoadAllSyntax, // figure out what's necessary PJW
}
- pkgs, err := packages.Load(cfg, "golang.org/x/tools/internal/lsp/debug")
+ pkgs, err := packages.Load(cfg, "golang.org/x/tools/gopls/internal/lsp/debug")
if err != nil {
t.Fatal(err)
}
diff --git a/gopls/test/gopls_test.go b/gopls/test/gopls_test.go
index 6282224..4f266ba 100644
--- a/gopls/test/gopls_test.go
+++ b/gopls/test/gopls_test.go
@@ -9,10 +9,10 @@
"testing"
"golang.org/x/tools/gopls/internal/hooks"
- "golang.org/x/tools/internal/lsp/bug"
- cmdtest "golang.org/x/tools/internal/lsp/cmd/test"
- "golang.org/x/tools/internal/lsp/source"
- "golang.org/x/tools/internal/lsp/tests"
+ cmdtest "golang.org/x/tools/gopls/internal/lsp/cmd/test"
+ "golang.org/x/tools/gopls/internal/lsp/source"
+ "golang.org/x/tools/gopls/internal/lsp/tests"
+ "golang.org/x/tools/internal/bug"
"golang.org/x/tools/internal/testenv"
)
diff --git a/gopls/test/json_test.go b/gopls/test/json_test.go
index 5ea5b34..69b7e48 100644
--- a/gopls/test/json_test.go
+++ b/gopls/test/json_test.go
@@ -12,7 +12,7 @@
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/tools/internal/lsp/protocol"
+ "golang.org/x/tools/gopls/internal/lsp/protocol"
)
// verify that type errors in Initialize lsp messages don't cause
diff --git a/internal/lsp/bug/bug.go b/internal/bug/bug.go
similarity index 100%
rename from internal/lsp/bug/bug.go
rename to internal/bug/bug.go
diff --git a/internal/lsp/bug/bug_test.go b/internal/bug/bug_test.go
similarity index 100%
rename from internal/lsp/bug/bug_test.go
rename to internal/bug/bug_test.go
diff --git a/internal/lsp/diff/diff.go b/internal/diff/diff.go
similarity index 100%
rename from internal/lsp/diff/diff.go
rename to internal/diff/diff.go
diff --git a/internal/lsp/diff/diff_test.go b/internal/diff/diff_test.go
similarity index 93%
rename from internal/lsp/diff/diff_test.go
rename to internal/diff/diff_test.go
index a369949..1bf03ea 100644
--- a/internal/lsp/diff/diff_test.go
+++ b/internal/diff/diff_test.go
@@ -10,8 +10,8 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/diff"
- "golang.org/x/tools/internal/lsp/diff/difftest"
+ "golang.org/x/tools/internal/diff"
+ "golang.org/x/tools/internal/diff/difftest"
"golang.org/x/tools/internal/span"
)
@@ -131,9 +131,9 @@
}
func TestRegressionOld001(t *testing.T) {
- a := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/tools/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/lsp/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
+ a := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/tools/gopls/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
- b := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/safehtml/template\"\n\t\"golang.org/x/tools/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/lsp/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
+ b := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/safehtml/template\"\n\t\"golang.org/x/tools/gopls/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
diffs, err := diff.NComputeEdits(span.URI("file://one"), a, b)
if err != nil {
t.Error(err)
diff --git a/internal/lsp/diff/difftest/difftest.go b/internal/diff/difftest/difftest.go
similarity index 98%
rename from internal/lsp/diff/difftest/difftest.go
rename to internal/diff/difftest/difftest.go
index a78e267..6161256 100644
--- a/internal/lsp/diff/difftest/difftest.go
+++ b/internal/diff/difftest/difftest.go
@@ -4,14 +4,14 @@
// Package difftest supplies a set of tests that will operate on any
// implementation of a diff algorithm as exposed by
-// "golang.org/x/tools/internal/lsp/diff"
+// "golang.org/x/tools/internal/diff"
package difftest
import (
"fmt"
"testing"
- "golang.org/x/tools/internal/lsp/diff"
+ "golang.org/x/tools/internal/diff"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/diff/difftest/difftest_test.go b/internal/diff/difftest/difftest_test.go
similarity index 95%
rename from internal/lsp/diff/difftest/difftest_test.go
rename to internal/diff/difftest/difftest_test.go
index fd7ecf9..d070d32 100644
--- a/internal/lsp/diff/difftest/difftest_test.go
+++ b/internal/diff/difftest/difftest_test.go
@@ -4,7 +4,7 @@
// Package difftest supplies a set of tests that will operate on any
// implementation of a diff algorithm as exposed by
-// "golang.org/x/tools/internal/lsp/diff"
+// "golang.org/x/tools/internal/diff"
package difftest_test
import (
@@ -15,7 +15,7 @@
"strings"
"testing"
- "golang.org/x/tools/internal/lsp/diff/difftest"
+ "golang.org/x/tools/internal/diff/difftest"
"golang.org/x/tools/internal/testenv"
)
diff --git a/internal/lsp/diff/lcs/common.go b/internal/diff/lcs/common.go
similarity index 100%
rename from internal/lsp/diff/lcs/common.go
rename to internal/diff/lcs/common.go
diff --git a/internal/lsp/diff/lcs/common_test.go b/internal/diff/lcs/common_test.go
similarity index 100%
rename from internal/lsp/diff/lcs/common_test.go
rename to internal/diff/lcs/common_test.go
diff --git a/internal/lsp/diff/lcs/doc.go b/internal/diff/lcs/doc.go
similarity index 100%
rename from internal/lsp/diff/lcs/doc.go
rename to internal/diff/lcs/doc.go
diff --git a/internal/lsp/diff/lcs/git.sh b/internal/diff/lcs/git.sh
similarity index 100%
rename from internal/lsp/diff/lcs/git.sh
rename to internal/diff/lcs/git.sh
diff --git a/internal/lsp/diff/lcs/labels.go b/internal/diff/lcs/labels.go
similarity index 100%
rename from internal/lsp/diff/lcs/labels.go
rename to internal/diff/lcs/labels.go
diff --git a/internal/lsp/diff/lcs/old.go b/internal/diff/lcs/old.go
similarity index 100%
rename from internal/lsp/diff/lcs/old.go
rename to internal/diff/lcs/old.go
diff --git a/internal/lsp/diff/lcs/old_test.go b/internal/diff/lcs/old_test.go
similarity index 95%
rename from internal/lsp/diff/lcs/old_test.go
rename to internal/diff/lcs/old_test.go
index ba22fe6..828a9d9 100644
--- a/internal/lsp/diff/lcs/old_test.go
+++ b/internal/diff/lcs/old_test.go
@@ -97,9 +97,9 @@
}
func TestRegressionOld001(t *testing.T) {
- a := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/tools/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/lsp/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
+ a := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/tools/gopls/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
- b := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/safehtml/template\"\n\t\"golang.org/x/tools/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/lsp/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
+ b := "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage diff_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/google/safehtml/template\"\n\t\"golang.org/x/tools/gopls/internal/lsp/diff\"\n\t\"golang.org/x/tools/internal/diff/difftest\"\n\t\"golang.org/x/tools/internal/span\"\n)\n"
for i := 1; i < len(b); i++ {
diffs, lcs := Compute([]byte(a), []byte(b), int(i)) // 14 from gopls
if !lcs.valid() {
diff --git a/internal/lsp/diff/myers/diff.go b/internal/diff/myers/diff.go
similarity index 98%
rename from internal/lsp/diff/myers/diff.go
rename to internal/diff/myers/diff.go
index a594750..07e4028 100644
--- a/internal/lsp/diff/myers/diff.go
+++ b/internal/diff/myers/diff.go
@@ -8,7 +8,7 @@
import (
"strings"
- "golang.org/x/tools/internal/lsp/diff"
+ "golang.org/x/tools/internal/diff"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/diff/myers/diff_test.go b/internal/diff/myers/diff_test.go
similarity index 74%
rename from internal/lsp/diff/myers/diff_test.go
rename to internal/diff/myers/diff_test.go
index bce0399..f244455 100644
--- a/internal/lsp/diff/myers/diff_test.go
+++ b/internal/diff/myers/diff_test.go
@@ -7,8 +7,8 @@
import (
"testing"
- "golang.org/x/tools/internal/lsp/diff/difftest"
- "golang.org/x/tools/internal/lsp/diff/myers"
+ "golang.org/x/tools/internal/diff/difftest"
+ "golang.org/x/tools/internal/diff/myers"
)
func TestDiff(t *testing.T) {
diff --git a/internal/lsp/diff/ndiff.go b/internal/diff/ndiff.go
similarity index 98%
rename from internal/lsp/diff/ndiff.go
rename to internal/diff/ndiff.go
index 8f7732d..e537b72 100644
--- a/internal/lsp/diff/ndiff.go
+++ b/internal/diff/ndiff.go
@@ -8,7 +8,7 @@
"strings"
"unicode/utf8"
- "golang.org/x/tools/internal/lsp/diff/lcs"
+ "golang.org/x/tools/internal/diff/lcs"
"golang.org/x/tools/internal/span"
)
diff --git a/internal/lsp/diff/unified.go b/internal/diff/unified.go
similarity index 100%
rename from internal/lsp/diff/unified.go
rename to internal/diff/unified.go
diff --git a/internal/lsp/debug/tag/tag.go b/internal/event/tag/tag.go
similarity index 100%
rename from internal/lsp/debug/tag/tag.go
rename to internal/event/tag/tag.go
diff --git a/internal/lsp/fuzzy/input.go b/internal/fuzzy/input.go
similarity index 100%
rename from internal/lsp/fuzzy/input.go
rename to internal/fuzzy/input.go
diff --git a/internal/lsp/fuzzy/input_test.go b/internal/fuzzy/input_test.go
similarity index 98%
rename from internal/lsp/fuzzy/input_test.go
rename to internal/fuzzy/input_test.go
index 0228347..64f66e3 100644
--- a/internal/lsp/fuzzy/input_test.go
+++ b/internal/fuzzy/input_test.go
@@ -9,7 +9,7 @@
"sort"
"testing"
- "golang.org/x/tools/internal/lsp/fuzzy"
+ "golang.org/x/tools/internal/fuzzy"
)
var rolesTests = []struct {
diff --git a/internal/lsp/fuzzy/matcher.go b/internal/fuzzy/matcher.go
similarity index 100%
rename from internal/lsp/fuzzy/matcher.go
rename to internal/fuzzy/matcher.go
diff --git a/internal/lsp/fuzzy/matcher_test.go b/internal/fuzzy/matcher_test.go
similarity index 99%
rename from internal/lsp/fuzzy/matcher_test.go
rename to internal/fuzzy/matcher_test.go
index 132ab5c..528224b 100644
--- a/internal/lsp/fuzzy/matcher_test.go
+++ b/internal/fuzzy/matcher_test.go
@@ -13,7 +13,7 @@
"math"
"testing"
- "golang.org/x/tools/internal/lsp/fuzzy"
+ "golang.org/x/tools/internal/fuzzy"
)
type comparator struct {
diff --git a/internal/lsp/fuzzy/symbol.go b/internal/fuzzy/symbol.go
similarity index 100%
rename from internal/lsp/fuzzy/symbol.go
rename to internal/fuzzy/symbol.go
diff --git a/internal/lsp/fuzzy/symbol_test.go b/internal/fuzzy/symbol_test.go
similarity index 97%
rename from internal/lsp/fuzzy/symbol_test.go
rename to internal/fuzzy/symbol_test.go
index cb28160..df74bbe 100644
--- a/internal/lsp/fuzzy/symbol_test.go
+++ b/internal/fuzzy/symbol_test.go
@@ -7,7 +7,7 @@
import (
"testing"
- . "golang.org/x/tools/internal/lsp/fuzzy"
+ . "golang.org/x/tools/internal/fuzzy"
)
func TestSymbolMatchIndex(t *testing.T) {
diff --git a/internal/jsonrpc2/conn.go b/internal/jsonrpc2/conn.go
index ca7752d..529cfa5 100644
--- a/internal/jsonrpc2/conn.go
+++ b/internal/jsonrpc2/conn.go
@@ -13,7 +13,7 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/debug/tag"
+ "golang.org/x/tools/internal/event/tag"
)
// Conn is the common interface to jsonrpc clients and servers.
diff --git a/internal/jsonrpc2_v2/conn.go b/internal/jsonrpc2_v2/conn.go
index edcf093..47668e2 100644
--- a/internal/jsonrpc2_v2/conn.go
+++ b/internal/jsonrpc2_v2/conn.go
@@ -13,7 +13,7 @@
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/label"
- "golang.org/x/tools/internal/lsp/debug/tag"
+ "golang.org/x/tools/internal/event/tag"
)
// Binder builds a connection configuration.
diff --git a/internal/span/token.go b/internal/span/token.go
index 61b5995..d3827eb 100644
--- a/internal/span/token.go
+++ b/internal/span/token.go
@@ -8,7 +8,7 @@
"fmt"
"go/token"
- "golang.org/x/tools/internal/lsp/bug"
+ "golang.org/x/tools/internal/bug"
)
// Range represents a source code range in token.Pos form.