github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/internal/lsp/cmd/usage/usage.hlp (about) 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 Usage: 9 gopls help [<subject>] 10 11 Command: 12 13 Main 14 serve run a server for Go code using the Language Server Protocol 15 version print the gopls version information 16 bug report a bug in gopls 17 api-json print json describing gopls API 18 licenses print licenses of included software 19 20 Features 21 call_hierarchy display selected identifier's call hierarchy 22 check show diagnostic results for the specified file 23 definition show declaration of selected identifier 24 folding_ranges display selected file's folding ranges 25 format format the code according to the go standard 26 highlight display selected identifier's highlights 27 implementation display selected identifier's implementation 28 imports updates import statements 29 remote interact with the gopls daemon 30 inspect interact with the gopls daemon (deprecated: use 'remote') 31 links list links in a file 32 prepare_rename test validity of a rename operation at location 33 references display selected identifier's references 34 rename rename selected identifier 35 semtok show semantic tokens for the specified file 36 signature display selected identifier's signature 37 fix apply suggested fixes 38 symbols display selected file's symbols 39 workspace manage the gopls workspace (experimental: under development) 40 workspace_symbol search symbols in workspace 41 42 flags: 43 -debug=string 44 serve debug information on the supplied address 45 -listen=string 46 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. 47 -listen.timeout=duration 48 when used with -listen, shut down the server when there are no connected clients for this duration 49 -logfile=string 50 filename to log to. if value is "auto", then logging to a default output file is enabled 51 -mode=string 52 no effect 53 -ocagent=string 54 the address of the ocagent (e.g. http://localhost:55678), or off (default "off") 55 -port=int 56 port on which to run gopls for debugging purposes 57 -profile.cpu=string 58 write CPU profile to this file 59 -profile.mem=string 60 write memory profile to this file 61 -profile.trace=string 62 write trace log to this file 63 -remote=string 64 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. 65 -remote.debug=string 66 when used with -remote=auto, the -debug value used to start the daemon 67 -remote.listen.timeout=duration 68 when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) 69 -remote.logfile=string 70 when used with -remote=auto, the -logfile value used to start the daemon 71 -rpc.trace 72 print the full rpc trace in lsp inspector format 73 -v,-verbose 74 verbose output 75 -vv,-veryverbose 76 very verbose output