github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/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    vulncheck         run experimental vulncheck analysis (experimental: under development)
    42  
    43  flags:
    44    -debug=string
    45      	serve debug information on the supplied address
    46    -listen=string
    47      	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.
    48    -listen.timeout=duration
    49      	when used with -listen, shut down the server when there are no connected clients for this duration
    50    -logfile=string
    51      	filename to log to. if value is "auto", then logging to a default output file is enabled
    52    -mode=string
    53      	no effect
    54    -ocagent=string
    55      	the address of the ocagent (e.g. http://localhost:55678), or off (default "off")
    56    -port=int
    57      	port on which to run gopls for debugging purposes
    58    -profile.cpu=string
    59      	write CPU profile to this file
    60    -profile.mem=string
    61      	write memory profile to this file
    62    -profile.trace=string
    63      	write trace log to this file
    64    -remote=string
    65      	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.
    66    -remote.debug=string
    67      	when used with -remote=auto, the -debug value used to start the daemon
    68    -remote.listen.timeout=duration
    69      	when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s)
    70    -remote.logfile=string
    71      	when used with -remote=auto, the -logfile value used to start the daemon
    72    -rpc.trace
    73      	print the full rpc trace in lsp inspector format
    74    -v,-verbose
    75      	verbose output
    76    -vv,-veryverbose
    77      	very verbose output