
hope ↓

The snippet suggestion you see can be disabled by adding the following setting:
"[go]": {
"editor.snippetSuggestions": "none",
}
I can't reproduce the lack of a func(...) {} suggestion though - can you please provide a complete repro case? What does the rest of the file look like?
I was able to reproduce the missing completion with:
package main
func haha(fn func(value int)) {
}
func _() {
haha(func<>)
if true {
}
}
We think "<>" is within a function literal, so we don't continue up to infer an expected type of func(int). The easiest fix would probably be to not count us as "in" the *ast.FuncLit in breaksExpectedTypeInference.
The snippet suggestion you see can be disabled by adding the following setting:
"[go]": { "editor.snippetSuggestions": "none", }I can't reproduce the lack of a
func(...) {}suggestion though - can you please provide a complete repro case? What does the rest of the file look like?

I used "editor.snippetSuggestions": "none" but don't work.....
here is my setting is has wrong?
{
"debug.console.fontFamily": "Menlo",
"workbench.iconTheme": "vs-nomo-dark",
"workbench.colorCustomizations": {
"editor.background": "#2b2b2b",
"debugConsole.infoForeground": "#bdb1b1",
"statusBar.background": "#2b2b2b",
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "support.function",
"settings": {
"foreground": "#d2d2d2"
}
}
],
},
"editor.lineHeight": 22,
"debug.console.fontSize": 13,
"extensions.ignoreRecommendations": true,
"markdown.preview.linkify": false,
"markdown.preview.doubleClickToSwitchToEditor": false,
"explorer.confirmDelete": false,
"workbench.settings.openDefaultSettings": true,
"rest-client.disableAddingHrefLinkForLargeResponse": false,
"rest-client.disableHighlightResonseBodyForLargeResponse": false,
"rest-client.previewResponsePanelTakeFocus": false,
"rest-client.previewResponseInUntitledDocument": true,
"rest-client.decodeEscapedUnicodeCharacters": true,
"rest-client.environmentVariables": {
"shared": {
"local": "localhost",
"localj": "localhost:8460",
"test": "10.142.117.99",
"testj": "10.142.117.99/j",
"testp": "passport.test.huajiao.com",
"onlinep": "10.143.166.108",
"yufabuip": "10.142.116.104",
"platform": "ios",
"version": "7.1.1",
}
},
"explorer.confirmDragAndDrop": false,
"files.autoSave": "afterDelay",
"yaml.validate": false,
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"workbench.editor.enablePreview": false,
"window.zoomLevel": 0,
"workbench.sideBar.location": "left",
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace",
},
"vim.insertModeKeyBindings": [],
"vim.leader": "
"vim.easymotion": true,
"vim.easymotionMarkerWidthPerChar": 10,
"vim.easymotionKeys": "hklyuiopnmqwetzxcvbasdgjf",
"vim.easymotionMarkerForegroundColorTwoChar": "#f6f9a5",
"vim.easymotionDimBackground": false,
"vim.useCtrlKeys": true,
"vim.surround": true,
"vim.searchHighlightColor": "#32593d",
"go.autocompleteUnimportedPackages": false,
"[go]": {
"editor.insertSpaces": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.organizeImports": true
},
"editor.snippetSuggestions": "none",
},
"gopls": {
"usePlaceholders": true,
"completeUnimported": true,
},
"go.lintTool": "golangci-lint",
"go.lintOnSave": "off",
"go.useLanguageServer": true,
"go.languageServerExperimentalFeatures": {
"diagnostics": false,
"documentLink": false
},
"go.formatTool": "goimports",
"go.addTags": {
"tags": "json,form",
"options": "json=omitempty",
"promptForTags": false,
"transform": "snakecase"
},
"editor.dragAndDrop": false,
"explorer.autoReveal": false,
"editor.quickSuggestions": true,
"editor.suggest.insertMode": "replace",
"editor.wordBasedSuggestions": false,
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.snippetSuggestions": "inline",
"editor.parameterHints.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"timeline.excludeSources": [],
"editor.matchBrackets": "near",
"editor.autoClosingBrackets": "beforeWhitespace",
"editor.autoClosingQuotes": "never",
"editor.autoSurround": "never",
"search.searchOnType": true,
"replacerules.rules": {
"url format": {
"find": "&",
"replace": "\n&"
},
},
"explorer.compactFolders": false,
"workbench.editor.showTabs": false,
"hediet.vscode-drawio.local-storage": "eyIuZHJhd2lvLWNvbmZpZyI6IntcImxhbmd1YWdlXCI6XCJcIixcImN1c3RvbUZvbnRzXCI6W10sXCJsaWJyYXJpZXNcIjpcImdlbmVyYWw7dW1sO2VyO2JwbW47Zmxvd2NoYXJ0O2Jhc2ljO2Fycm93czJcIixcImN1c3RvbUxpYnJhcmllc1wiOltcIkwuc2NyYXRjaHBhZFwiXSxcInBsdWdpbnNcIjpbXSxcInJlY2VudENvbG9yc1wiOltdLFwiZm9ybWF0V2lkdGhcIjpcIjI0MFwiLFwiY3JlYXRlVGFyZ2V0XCI6ZmFsc2UsXCJwYWdlRm9ybWF0XCI6e1wieFwiOjAsXCJ5XCI6MCxcIndpZHRoXCI6MjMzOSxcImhlaWdodFwiOjMzMDB9LFwic2VhcmNoXCI6dHJ1ZSxcInNob3dTdGFydFNjcmVlblwiOnRydWUsXCJncmlkQ29sb3JcIjpcIiNkMGQwZDBcIixcImRhcmtHcmlkQ29sb3JcIjpcIiM2ZTZlNmVcIixcImF1dG9zYXZlXCI6dHJ1ZSxcInJlc2l6ZUltYWdlc1wiOm51bGwsXCJvcGVuQ291bnRlclwiOjAsXCJ2ZXJzaW9uXCI6MTgsXCJ1bml0XCI6MSxcImlzUnVsZXJPblwiOmZhbHNlLFwidWlcIjpcIlwifSJ9",
"rest-client.fontFamily": "",
"editor.fontSize": 13.2,
"git-graph.graphColours": [
"#ff6d67",
"#59f68d",
"#f3f89d",
"#c9a8fa",
"#ff92d0",
"#99ecfd",
"#00d9cc",
"#e138e8",
"#85d900",
"#dc5b23",
"#6f24d6",
"#ffcc00"
],
"editor.suggest.showColors": false,
"editor.suggestOnTriggerCharacters": true,
"editor.quickSuggestionsDelay": 0,
"editor.suggest.statusBar.visible": false,
"open-in-browser.default": "chrome",
"code-runner.clearPreviousOutput": true,
"code-runner.ignoreSelection": true
}
Most helpful comment
I used "editor.snippetSuggestions": "none" but don't work.....
here is my setting is has wrong?
{",
"debug.console.fontFamily": "Menlo",
"workbench.iconTheme": "vs-nomo-dark",
"workbench.colorCustomizations": {
"editor.background": "#2b2b2b",
"debugConsole.infoForeground": "#bdb1b1",
"statusBar.background": "#2b2b2b",
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "support.function",
"settings": {
"foreground": "#d2d2d2"
}
}
],
},
"editor.lineHeight": 22,
"debug.console.fontSize": 13,
"extensions.ignoreRecommendations": true,
"markdown.preview.linkify": false,
"markdown.preview.doubleClickToSwitchToEditor": false,
"explorer.confirmDelete": false,
"workbench.settings.openDefaultSettings": true,
"rest-client.disableAddingHrefLinkForLargeResponse": false,
"rest-client.disableHighlightResonseBodyForLargeResponse": false,
"rest-client.previewResponsePanelTakeFocus": false,
"rest-client.previewResponseInUntitledDocument": true,
"rest-client.decodeEscapedUnicodeCharacters": true,
"rest-client.environmentVariables": {
"shared": {
"local": "localhost",
"localj": "localhost:8460",
"test": "10.142.117.99",
"testj": "10.142.117.99/j",
"testp": "passport.test.huajiao.com",
"onlinep": "10.143.166.108",
"yufabuip": "10.142.116.104",
"platform": "ios",
"version": "7.1.1",
}
},
"explorer.confirmDragAndDrop": false,
"files.autoSave": "afterDelay",
"yaml.validate": false,
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"workbench.editor.enablePreview": false,
"window.zoomLevel": 0,
"workbench.sideBar.location": "left",
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace",
},
"vim.insertModeKeyBindings": [],
"vim.leader": "
"vim.easymotion": true,
"vim.easymotionMarkerWidthPerChar": 10,
"vim.easymotionKeys": "hklyuiopnmqwetzxcvbasdgjf",
"vim.easymotionMarkerForegroundColorTwoChar": "#f6f9a5",
"vim.easymotionDimBackground": false,
"vim.useCtrlKeys": true,
"vim.surround": true,
"vim.searchHighlightColor": "#32593d",
"go.autocompleteUnimportedPackages": false,
"[go]": {
"editor.insertSpaces": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.organizeImports": true
},
"editor.snippetSuggestions": "none",
},
"gopls": {
"usePlaceholders": true,
"completeUnimported": true,
},
"go.lintTool": "golangci-lint",
"go.lintOnSave": "off",
"go.useLanguageServer": true,
"go.languageServerExperimentalFeatures": {
"diagnostics": false,
"documentLink": false
},
"go.formatTool": "goimports",
"go.addTags": {
"tags": "json,form",
"options": "json=omitempty",
"promptForTags": false,
"transform": "snakecase"
},
"editor.dragAndDrop": false,
"explorer.autoReveal": false,
"editor.quickSuggestions": true,
"editor.suggest.insertMode": "replace",
"editor.wordBasedSuggestions": false,
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.snippetSuggestions": "inline",
"editor.parameterHints.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"timeline.excludeSources": [],
"editor.matchBrackets": "near",
"editor.autoClosingBrackets": "beforeWhitespace",
"editor.autoClosingQuotes": "never",
"editor.autoSurround": "never",
"search.searchOnType": true,
"replacerules.rules": {
"url format": {
"find": "&",
"replace": "\n&"
},
},
"explorer.compactFolders": false,
"workbench.editor.showTabs": false,
"hediet.vscode-drawio.local-storage": "eyIuZHJhd2lvLWNvbmZpZyI6IntcImxhbmd1YWdlXCI6XCJcIixcImN1c3RvbUZvbnRzXCI6W10sXCJsaWJyYXJpZXNcIjpcImdlbmVyYWw7dW1sO2VyO2JwbW47Zmxvd2NoYXJ0O2Jhc2ljO2Fycm93czJcIixcImN1c3RvbUxpYnJhcmllc1wiOltcIkwuc2NyYXRjaHBhZFwiXSxcInBsdWdpbnNcIjpbXSxcInJlY2VudENvbG9yc1wiOltdLFwiZm9ybWF0V2lkdGhcIjpcIjI0MFwiLFwiY3JlYXRlVGFyZ2V0XCI6ZmFsc2UsXCJwYWdlRm9ybWF0XCI6e1wieFwiOjAsXCJ5XCI6MCxcIndpZHRoXCI6MjMzOSxcImhlaWdodFwiOjMzMDB9LFwic2VhcmNoXCI6dHJ1ZSxcInNob3dTdGFydFNjcmVlblwiOnRydWUsXCJncmlkQ29sb3JcIjpcIiNkMGQwZDBcIixcImRhcmtHcmlkQ29sb3JcIjpcIiM2ZTZlNmVcIixcImF1dG9zYXZlXCI6dHJ1ZSxcInJlc2l6ZUltYWdlc1wiOm51bGwsXCJvcGVuQ291bnRlclwiOjAsXCJ2ZXJzaW9uXCI6MTgsXCJ1bml0XCI6MSxcImlzUnVsZXJPblwiOmZhbHNlLFwidWlcIjpcIlwifSJ9",
"rest-client.fontFamily": "",
"editor.fontSize": 13.2,
"git-graph.graphColours": [
"#ff6d67",
"#59f68d",
"#f3f89d",
"#c9a8fa",
"#ff92d0",
"#99ecfd",
"#00d9cc",
"#e138e8",
"#85d900",
"#dc5b23",
"#6f24d6",
"#ffcc00"
],
"editor.suggest.showColors": false,
"editor.suggestOnTriggerCharacters": true,
"editor.quickSuggestionsDelay": 0,
"editor.suggest.statusBar.visible": false,
"open-in-browser.default": "chrome",
"code-runner.clearPreviousOutput": true,
"code-runner.ignoreSelection": true
}