-
Notifications
You must be signed in to change notification settings - Fork 646
Extension causes high cpu load #2461
Comments
|
The Go portion of {
"go.formatTool": "goimports",
"go.installDependenciesWhenBuilding": false,
"go.useLanguageServer": true,
"go.vetOnSave": "off",
"go.lintTool": "staticcheck",
"go.lintOnSave": "file"
} |
The settings I had don't seem to make sense. I read through the installation instructions of "go.useLanguageServer": true,
"go.alternateTools": {
"go-langserver": "gopls"
},
"go.languageServerExperimentalFeatures": {
"format": true,
"autoComplete": true,
"diagnostics": true,
"goToDefinition": true,
"hover": true,
"signatureHelp": true,
"goToTypeDefinition": true,
"documentSymbols": true,
},
"go.buildOnSave": "off",
"go.vetOnSave": "off",
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
},
"gopls": {
"enablePlaceholders": true, // add parameter placeholders when completing a function
"enhancedHover": true, // experimental to improve quality of hover (will be on by default soon)
} The editor and plugin seem to be pretty happy now. |
Thanks for that note @tonyghita With the latest version of the extension most of the above are not needed. |
I have the same issue with |
I had the same problem. Even copying the recommended settings from https://github.com/golang/go/wiki/gopls#editors-instructions did not work. Eventually I fixed it by:
I have not installed |
Thanks for sharing what worked @lloiser @THaGKI9 Can you try the steps that @lloiser shared above and see if that helps? @lloiser and anyone else who are able to fix the situation with the above steps: |
Following @lloiser 's instructions, $ go get -u -v golang.org/x/tools/cmd/gopls After installing gopls, I restart vscode with goLanguageServer enabled and the problem is fixed |
@ramya-rao-a these are my settings that worked very well with the previous version 0.9: {
"go.autocompleteUnimportedPackages": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.toolsGopath": "/Users/lloiser/go_tools",
"go.lintFlags": [
"--config=${workspaceRoot}/scripts/revive.toml"
],
"go.lintTool": "revive",
"go.useLanguageServer": false,
"go.vetOnSave": "off"
} After updating to 0.10 I only changed
which resulted in the high cpu... I did not have gopls or any other language server installed previously. |
I removed all At this point I wonder if the issue was actually that |
Thanks for the sequence of steps @lloiser, I was able to replicate the issue I have pushed a fix and released an update (0.10.1) which will have the fix. Thanks for reporting and your patience and for helping me figure out the issue! |
@ramya-rao-a very much appreciate your leadership on this plugin, thank you! |
Performance
Go
0.10.0
Darwin x64 17.7.0
1.33.1
ms-vscode.Go-unresponsive.cpuprofile.txt
The text was updated successfully, but these errors were encountered: