Skip to content

Commit 308c6c0

Browse files
committed
src/language/goLanguageServer: fix parameter hint setting query
The language server middleware arranges to trigger the parameter hints tooltip after completion items are accepted by checking users' settings. But we should've referenced 'editor.parameterHints.enable' 'editor.parameterHints' workspace setting to check whether parameter hint is enabled. This bug was introduced in cl/382234 during cleanup. Unfortunately, it's not easy to write a useful test that could've caught this type of bugs. Manually tested. Fixes #3071 Change-Id: Ib2afbccb52dfcd17606148041794339fe4ba5355 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/546155 TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
1 parent 322014f commit 308c6c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/language/goLanguageServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,13 +650,13 @@ export async function buildLanguageClient(
650650
item.filterText = hardcodedFilterText;
651651
}
652652
}
653-
const paramHintsEnabled = vscode.workspace.getConfiguration('editor.parameterHints', {
653+
const paramHints = vscode.workspace.getConfiguration('editor.parameterHints', {
654654
languageId: 'go',
655655
uri: document.uri
656656
});
657657
// If the user has parameterHints (signature help) enabled,
658658
// trigger it for function or method completion items.
659-
if (paramHintsEnabled) {
659+
if (paramHints.get<boolean>('enabled') === true) {
660660
for (const item of items) {
661661
if (item.kind === CompletionItemKind.Method || item.kind === CompletionItemKind.Function) {
662662
item.command = {

0 commit comments

Comments
 (0)