Debian Codegraph @

gopls/internal/cmd/usage/usage.hlp

raw
1
2 gopls is a Go language server.
3
4 It is typically used with an editor to provide language features. When no
5 command is specified, gopls will default to the 'serve' command. The language
6 features can also be accessed via the gopls command-line interface.
7
8 For documentation of all its features, see:
9
10 https://github.com/golang/tools/blob/master/gopls/doc/features
11
12 Usage:
13 gopls help [<subject>]
14
15 Command:
16
17 Main
18 serve run a server for Go code using the Language Server Protocol
19 version print the gopls version information
20 help print usage information for subcommands
21 api-json print JSON describing gopls API
22 licenses print licenses of included software
23
24 Features
25 call_hierarchy display selected identifier's call hierarchy
26 check show diagnostic results for the specified file
27 codeaction list or execute code actions
28 codelens List or execute code lenses for a file
29 definition show declaration of selected identifier
30 execute Execute a gopls custom LSP command
31 fix apply suggested fixes (obsolete)
32 folding_ranges display selected file's folding ranges
33 format format the code according to the go standard
34 mcp start the gopls MCP server in headless mode
35 highlight display selected identifier's highlights
36 implementation display selected identifier's implementation
37 imports updates import statements
38 remote interact with the gopls daemon
39 inspect interact with the gopls daemon (deprecated: use 'remote')
40 links list links in a file
41 prepare_rename test validity of a rename operation at location
42 references display selected identifier's references
43 rename rename selected identifier
44 semtok show semantic tokens for the specified file
45 signature display selected identifier's signature
46 stats print workspace statistics
47 symbols display selected file's symbols
48 workspace_symbol search symbols in workspace
49
50 flags:
51 -debug=string
52 serve debug information on the supplied address
53 -listen=string
54 address on which to listen for remote connections. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. Otherwise, TCP is used.
55 -listen.timeout=duration
56 when used with -listen, shut down the server when there are no connected clients for this duration
57 -logfile=string
58 filename to log to. if value is "auto", then logging to a default output file is enabled
59 -mcp.listen=string
60 experimental: address on which to listen for model context protocol connections. If port is localhost:0, pick a random port in localhost instead.
61 -mode=string
62 no effect
63 -otel=string
64 export telemetry to specified OpenTelemetry collector address (e.g. http://localhost:4318)
65 -profile.alloc=string
66 write alloc profile to this file
67 -profile.block=string
68 write block profile to this file
69 -profile.cpu=string
70 write CPU profile to this file
71 -profile.mem=string
72 write memory profile to this file
73 -profile.trace=string
74 write trace log to this file
75 -remote=string
76 forward all commands to a remote lsp specified by this flag. With no special prefix, this is assumed to be a TCP address. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. If 'auto', or prefixed by 'auto;', the remote address is automatically resolved based on the executing environment.
77 -remote.debug=string
78 when used with -remote=auto, the -debug value used to start the daemon
79 -remote.listen.timeout=duration
80 when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s)
81 -remote.logfile=string
82 when used with -remote=auto, the -logfile value used to start the daemon
83 -rpc.trace
84 print the full rpc trace in lsp inspector format
85 -v,-verbose
86 verbose output
87 -vv,-veryverbose
88 very verbose output