| 1 |
run a server for Go code using the Language Server Protocol |
| 2 |
|
| 3 |
Usage: |
| 4 |
gopls [flags] serve [server-flags] |
| 5 |
gopls [flags] [server-flags] |
| 6 |
|
| 7 |
The server communicates using JSONRPC2 on stdin and stdout, and is intended to be run directly as |
| 8 |
a child of an editor process. |
| 9 |
|
| 10 |
server-flags: |
| 11 |
-debug=string |
| 12 |
serve debug information on the supplied address |
| 13 |
-listen=string |
| 14 |
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. |
| 15 |
-listen.timeout=duration |
| 16 |
when used with -listen, shut down the server when there are no connected clients for this duration |
| 17 |
-logfile=string |
| 18 |
filename to log to. if value is "auto", then logging to a default output file is enabled |
| 19 |
-mcp.listen=string |
| 20 |
experimental: address on which to listen for model context protocol connections. If port is localhost:0, pick a random port in localhost instead. |
| 21 |
-mode=string |
| 22 |
no effect |
| 23 |
-remote.debug=string |
| 24 |
when used with -remote=auto, the -debug value used to start the daemon |
| 25 |
-remote.listen.timeout=duration |
| 26 |
when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) |
| 27 |
-remote.logfile=string |
| 28 |
when used with -remote=auto, the -logfile value used to start the daemon |
| 29 |
-rpc.trace |
| 30 |
print the full rpc trace in lsp inspector format |