You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/lsp/lsprpc: expose configuration for auto-started daemon
Three new flags are added to the serve command, and threaded through to
the LSP forwarder:
-remote.listen.timeout: -listen.timeout for the auto-started daemon
-remote.debug: -debug for the auto-started daemon
-remote.logfile: -logfile for the auto-started daemon
As part of this change, no longer enable debugging the daemon by
default.
Notably none of this configuration affects serving, so modifying this
configuration has been chosen not to change the path to the automatic
daemon. In other words, this configuration has effect only for the
forwarder process that starts the daemon: all others will connect to the
daemon and inherit whatever configuration it had at startup. This should
be OK, because in the common case this configuration should be static
across all clients (e.g., many Vim sessions all sharing the same
.vimrc).
Exposing this configuration made the signature of lsprpc.NewForwarder
a bit hard to understand, so I decided to go ahead and switch to a
variadic options pattern for initializing both the Forwarder and
StreamServer, the latter just for consistency with the Forwarder.
Updates golang/go#34111
Change-Id: Iefb71e337befe08b23e451477d19fd57e69f36c6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/222670
Run-TryBot: Robert Findley <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
Reviewed-by: Heschi Kreinick <[email protected]>
Copy file name to clipboardExpand all lines: internal/lsp/cmd/serve.go
+11-2
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,10 @@ type Serve struct {
31
31
Tracebool`flag:"rpc.trace" help:"print the full rpc trace in lsp inspector format"`
32
32
Debugstring`flag:"debug" help:"serve debug information on the supplied address"`
33
33
34
+
RemoteListenTimeout time.Duration`flag:"remote.listen.timeout" help:"when used with -remote=auto, the listen.timeout used when auto-starting the remote"`
35
+
RemoteDebugstring`flag:"remote.debug" help:"when used with -remote=auto, the debug address used when auto-starting the remote"`
36
+
RemoteLogfilestring`flag:"remote.logfile" help:"when used with -remote=auto, the filename for the remote daemon to log to"`
0 commit comments