-
Notifications
You must be signed in to change notification settings - Fork 764
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
Refactor handling for go-langserver installation #2
Conversation
This PR (HEAD: 9aa7363) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/vscode-go/+/222417 to see it. Tip: You can toggle comments from me using the |
Message from Hyang-Ah Hana Kim: Patch Set 2: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/222417. |
Remove the code that handled this in the language server installation, and be careful to only install the tool specified by the user. Also, remove some unused import lines in the goLanguageServer.ts file. Fixes microsoft/vscode-go#3028. Change-Id: I813c39f7d4997b63f7a87c1551de23df2808259c GitHub-Last-Rev: 9aa7363 GitHub-Pull-Request: #2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/222417 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This PR is being closed because golang.org/cl/222417 has been merged. |
if (goConfig['alternateTools']['go-langserver']) { | ||
vscode.window.showErrorMessage(`The "go.alternateTools" setting for "go-langserver" has been deprecated. | ||
Please set "gopls" instead, and then reload the VS Code window.`); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user had gopls
installed in this case, then shouldn't we gracefully switch to that?
And also perhaps add a button to update the settings to remove go-langserver
from the alternate tools setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if the user didn't had gopls
installed, have a button to install gopls
?
vscode.window.showErrorMessage( | ||
`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window` | ||
`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about updating this to add or use gopls
and add a button that will update the alternate tool settings and install gopls
if it doesnt exist?
The readme would need an update as well. |
Can we re-open this PR? The changes look good. I have added few suggested comments that can be handled in a separate PR |
I contributed the PR to Go Nightly (#2), but I can add those changes to that repository. |
Remove the code that handled this in the language server installation, and be careful to only install the tool specified by the user. Also, remove some unused import lines in the goLanguageServer.ts file.
Fixes microsoft/vscode-go#3028.