-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/tools/gopls: implement didChangeConfiguration #32258
Comments
/cc @stamblerre |
Thanks for catching this! This means that the |
protocol.RegistrationParams
@stamblerre {
"method": "client/registerCapability",
"params": {
"registrations": [
{
"id": "79eee87c-c409-4664-8102-e03263673f6f",
"method": "textDocument/willSaveWaitUntil",
"registerOptions": {
"documentSelector": [
{ "language": "javascript" }
]
}
}
]
}
} |
The id only has to be unique within the server (not the client) and is only used if you make an unregister call. |
I think I do not understand.
1. In the LSP Typescript specification, RegisterOptions is an optional
field with type any. The Go code (tsprotocol.go:177) has interface{} for
the corresponding type, and "omitempty" for json. What should be a pointer?
2. Gopls is using the name of the method as the id in registering a
capability. That seems like a good thing to use if it wants to unregister
the capability later. (Using the method name means that it doesn't need to
remember a separate ID.)
…On Thu, May 30, 2019 at 3:48 AM Koichi Shiraishi ***@***.***> wrote:
@stamblerre <https://github.com/stamblerre>
Also, the Registration.ID will use to client/unregisterCapability call.
It would be better to use unique ID such as UUID like LSP spec.
{
"method": "client/registerCapability",
"params": {
"registrations": [
{
"id": "79eee87c-c409-4664-8102-e03263673f6f",
"method": "textDocument/willSaveWaitUntil",
"registerOptions": {
"documentSelector": [
{ "language": "javascript" }
]
}
}
]
}
}
-
https://github.com/golang/tools/blob/7be61e1b0e514e106d83fc439d56a79143738603/internal/lsp/general.go#L119
-
https://microsoft.github.io/language-server-protocol/specification#client_registerCapability
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32258?email_source=notifications&email_token=ABJIAI5P6AIFMRKSVCQKLILPX6BFVA5CNFSM4HPW2PJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWRUFXA#issuecomment-497238748>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJIAI7MATL43EY6CE3S76LPX6BFVANCNFSM4HPW2PJA>
.
|
@stamblerre @ianthehat @pjweinb Anyway, I posted issue first means not "should be a pointer", "misuse |
I'm sorry, I misunderstood - I now see that we don't correctly implement didChangeConfiguration. |
At first, Sorry for not reply to details comment. But yeah, Thanks for reading my comment! |
Provide options to disable the now-default fuzzy and/or deep completion modes. Whilst we await golang/go#32258, users will need to set these config options in their .vimrc and then restart Vim. Even then there is a race condition for Vim8 package users that might mean even this doesn't work.
Provide options to disable the now-default fuzzy and/or deep completion modes. Whilst we await golang/go#32258, users will need to set these config options in their .vimrc and then restart Vim. Even then there is a race condition for Vim8 package users that might mean even this doesn't work. Fixes #321
Provide options to disable the now-default fuzzy and/or deep completion modes. Also provide a test to ensure that deep fuzzy is the default. Whilst we await golang/go#32258, users will need to set these config options in their .vimrc and then restart Vim. Even then there is a race condition for Vim8 package users that might mean even this doesn't work. Fixes #321
Provide options to disable the now-default fuzzy and/or deep completion modes. Also provide a test to ensure that deep fuzzy is the default. Whilst we await golang/go#32258, users will need to set these config options in their .vimrc and then restart Vim. Even then there is a race condition for Vim8 package users that might mean even this doesn't work. Fixes #321
Provide options to disable the now-default fuzzy and/or deep completion modes. Also provide a test to ensure that deep fuzzy is the default. Whilst we await golang/go#32258, users will need to set these config options in their .vimrc and then restart Vim. Even then there is a race condition for Vim8 package users that might mean even this doesn't work. Fixes #321
Change https://golang.org/cl/206148 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Might be Yes. It's related LSP protocol spec.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
gopls
sendprotocol.RegistrationParams
wheninitialized
, the ref is here:https://github.com/golang/tools/blob/7be61e1b0e514e106d83fc439d56a79143738603/internal/lsp/general.go#L117-L125
But AFAIK, the
vscode-languageserver-node/client
just ignore if[]Registration. RegisterOptions
is empty.vscode-languageserver-node/client.register
internal/lsp/protocol/Registration.RegisterOptions
I also now develop Language Server Protocol
client
side for IDE written in Go, but I can't handle thatgopls
sendRegisterCapability
call.What did you expect to see?
empty
Registration.RegisterOptions
fieldsRegisterCapability
call.What did you see instead?
non-nil
Registration.RegisterOptions
.The text was updated successfully, but these errors were encountered: