-
-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make lsp-clients-go-server configurable #742
Conversation
Moving the discussion into the pull request.
My understanding is that the 3 servers are fork of one and the same language servers and that they have the same configuration options, functions, and so on which is not the same as js-ts/ts servers AFAIK.
I agree.
The priority is the user experience, we are not coupled to a particular design decision. One of the problems is that if you do: (setq ... "bingo")
(require 'lsp-clients)
(setq ... "gopls") The server still will be "bingo". |
They have different configurations actually. To me they are same as js-ts/ts servers. For example: $ gopls --help
The Go Language source tools.
Usage: gopls [flags] <command> [command-flags] [command-args]
Available commands are:
serve : run a server for Go code using the Language Server Protocol
query : answer queries about go source code
gopls flags are:
-listen string
address on which to listen for remote connections
-logfile string
filename to log to. if value is "auto", then logging to a default output file is enabled
-mode string
no effect
-port int
port on which to run gopls for debugging purposes
-profile.cpu string
write CPU profile to this file
-profile.mem string
write memory profile to this file
-profile.trace string
write trace log to this file
-remote string
*EXPERIMENTAL* - forward all commands to a remote lsp $ bingo -h
Usage of bingo:
-addr string
server listen address (tcp) (default ":4389")
-build-tags string
build tags, separated by spaces.
-cache-style string
set global cache style: none, on-demand, always. Can be overridden by InitializationOptions. (default "always")
-diagnostics
enable diagnostics. no actual effect, just for compatible with ide-go
-diagnostics-style string
diagnostics style: none, instant, onsave. Can be overridden by InitializationOptions. (default "instant")
-disable-func-snippet
disable argument snippets on func completion. Can be overridden by InitializationOptions.
-enhance-signature-help
enhance signature help with return result. Can be overridden by InitializationOptions.
-format-style string
which format style is used to format documents. Supported: gofmt and goimports. Can be overridden by InitializationOptions. (default "goimports")
-format-tool string
which tool is used to format documents. no actual effect, just for compatible with ide-go (default "goimports")
-freeosmemory int
the interval time that aggressively free memory back to the OS, unit is second, default value is 0, means no free memroy back to the OS
-func-snippet-enabled
enable argument snippets on func completion. no actual effect, just for compatible with ide-go (default true)
-gocodecompletion
enable completion. no actual effect, just for compatible with ide-go
-goimports-prefix string
set '--local' flag for the goimports invocation. Can be overridden by InitializationOptions.
-logfile string
also log to this file (in addition to stderr)
-maxparallelism int
use at max N parallel goroutines to fulfill requests. Can be overridden by InitializationOptions.
-mode string
communication mode (stdio|tcp) (default "stdio")
-pprof string
start a pprof http server (https://golang.org/pkg/net/http/pprof/)
-trace
print all requests and responses
-version
print version and exit |
FYI @saibing who is the author of |
Ok, I was fooled by the fact that lsp-clients-go--make-init-options is used for the three language servers. If @nanjj concern is that gopls is not ready to be the default language server we might switch the priorities temporary. |
It's also good to allow overriding the path regardless of whether it'll always be one server or the other. |
Current logic ignored `lsp-clients-go-server` and fixed to `gopls`, while `gopls` does not work all the time.
Closing in favour of #771 . |
Current logic ignored
lsp-clients-go-server
and fixed togopls
,while
gopls
does not work all the time.