-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: client Configuration made with identical items? #33347
Comments
Can you share what the RPC trace looks like for this in your |
Actually the issue appears to be that the
Is there a difference between these two? |
I believe that this was to allow users to set per-folder configurations in their settings, but @ianthehat can probably clarify this further. |
It will ask for the global "gopls" configuration as well as one per workspace folder (in this case "playground") using the name the workspace folder was given. |
Thanks. A few follow up questions (which we can move elsewhere if you'd prefer):
|
The "gopls" configuration is global, and applied first, the "playground" configuration is workspace folder specific and applied after, it can thus override things from the global configuration if needed. Workspace folders always have a name (https://microsoft.github.io/language-server-protocol/specification#workspace_workspaceFolders). If you are not using workspace folders and just specifying a root uri, then we make a workspace folder for you which has a name set from the basename of the root uri. The path is not unique, only the name is. For instance, you could open {uri:"file:///home/myitcv/gostuff/src/github.com/myitcv/playground",name:"playground_windows"} and {uri:"file:///home/myitcv/gostuff/src/github.com/myitcv/playground",name:"playground_osx"} at the same time, and respond with appropriate configurations such that they have the right GOOS and represent that folder for the two OSs. |
Thanks very much for the detailed explanation. There's clearly no issue here on the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Following CL 187819,
gopls
appears to be ignoring the value returned by the client's implementation ofConfiguration
. That said, this could, once again, be an issue ingovim
's implementation 😄Raising here for discussion.
In the test case in question,
govim
returns:However, a call to
textDocument/hover
still returns the synopsis documentation.What did you expect to see?
The client-returned
Configuration
value to be observed.What did you see instead?
As above.
cc @stamblerre @ianthehat
The text was updated successfully, but these errors were encountered: