-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/doc: document all of gopls' features
This CL enumerates and documents each LSP feature supported by gopls so that users can find out: - what the tool is capable of, - how to use it, - what settings affect the feature, and - whether their LSP client supports a given feature. We plan to provide Code Actions to open the relevant section of the manual, e.g. "Refactor > Describe refactorings..." To review the markdown, cherrypick this CL then run this command from x/tools: $ go run rsc.io/cmd/mdweb@latest -a localhost:9876 & open http://localhost:9876/gopls/doc/features/README.md The topic of completion is left for another day, as is support for go.mod files. Updates golang/go#54115 Change-Id: I8f7de7571bfe0355b3597487efbc0d7aae7a12d6 Reviewed-on: https://go-review.googlesource.com/c/tools/+/583316 Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
Showing
65 changed files
with
1,822 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
# Command line | ||
# Gopls: Command-line interface | ||
|
||
**Note: The `gopls` command-line is still experimental and subject to change at any point.** | ||
The `gopls` command provides a number of subcommands that expose much | ||
of the server's functionality. However, the interface is currently | ||
**experimental** and **subject to change at any point.** | ||
It is not efficient, complete, flexible, or officially supported. | ||
|
||
`gopls` exposes some (but not all) features on the command-line. This can be useful for debugging `gopls` itself. | ||
Its primary use is as a debugging aid. | ||
For example, this command reports the location of references to the | ||
symbol at the specified file/line/column: | ||
|
||
<!--TODO(rstambler): Generate this file.--> | ||
``` | ||
$ gopls references ./gopls/main.go:35:8 | ||
Log: Loading packages... | ||
Info: Finished loading packages. | ||
/home/gopher/xtools/go/packages/gopackages/main.go:27:7-11 | ||
/home/gopher/xtools/gopls/internal/cmd/integration_test.go:1062:7-11 | ||
/home/gopher/xtools/gopls/internal/test/integration/bench/bench_test.go:59:8-12 | ||
/home/gopher/xtools/gopls/internal/test/integration/regtest.go:140:8-12 | ||
/home/gopher/xtools/gopls/main.go:35:7-11 | ||
``` | ||
|
||
Learn about available commands and flags by running `gopls help`. | ||
|
||
Much of the functionality of `gopls` is available through a command line interface. | ||
See golang/go#63693 for a discussion of its future. | ||
|
||
There are two main reasons for this. The first is that we do not want users to rely on separate command line tools when they wish to do some task outside of an editor. The second is that the CLI assists in debugging. It is easier to reproduce behavior via single command. | ||
Learn about available commands and flags by running `gopls help`. | ||
|
||
It is not a goal of `gopls` to be a high performance command line tool. Its command line is intended for single file/package user interaction speeds, not bulk processing. | ||
Positions within files are specified as `file.go:line:column` triples, | ||
where the line and column start at 1, and columns are measured in | ||
bytes of the UTF-8 encoding. | ||
Alternatively, positions may be specified by the byte offset within | ||
the UTF-8 encoding of the file, starting from zero, for example | ||
`file.go:#1234`. | ||
(When working in non-ASCII files, beware that your editor may report a | ||
position's offset within its file using a different measure such as | ||
UTF-16 codes, Unicode code points, or graphemes). |
Oops, something went wrong.