Skip to content

Commit 983dc88

Browse files
Add an option to disable hovers (#703)
1 parent bfc8c4b commit 983dc88

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@
175175
"type": "boolean",
176176
"default": true,
177177
"description": "Enable code completion provided by the language server"
178+
},
179+
"clangd.enableHover": {
180+
"type": "boolean",
181+
"default": true,
182+
"description": "Enable hovers provided by the language server"
178183
}
179184
}
180185
},

src/clangd-context.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ export class ClangdContext implements vscode.Disposable {
141141
})
142142
return new vscode.CompletionList(items, /*isIncomplete=*/ true);
143143
},
144+
provideHover: async (document, position, token, next) => {
145+
if (!config.get<boolean>('enableHover'))
146+
return null;
147+
return next(document, position, token);
148+
},
144149
// VSCode applies fuzzy match only on the symbol name, thus it throws
145150
// away all results if query token is a prefix qualified name.
146151
// By adding the containerName to the symbol name, it prevents VSCode

0 commit comments

Comments
 (0)