diff --git a/client/package.json b/client/package.json index 51518f2..868173d 100644 --- a/client/package.json +++ b/client/package.json @@ -3,7 +3,7 @@ "description": "YouCompleteMe for vscode", "author": "Richard He", "license": "MIT", - "version": "1.0.20", + "version": "1.0.21", "publisher": "RichardHe", "repository": { "type": "git", @@ -55,6 +55,11 @@ "type": "boolean", "default": false, "description": "show debug messages" + }, + "ycmd.enable_hover_type": { + "type": "boolean", + "default": true, + "description": "GetType from ycmd by hover on variable" } } }, diff --git a/server/src/ycm.ts b/server/src/ycm.ts index 16dc2e1..6d1a9f6 100644 --- a/server/src/ycm.ts +++ b/server/src/ycm.ts @@ -234,6 +234,7 @@ export default class Ycm { } public async getType(documentUri: string, position: Position, documents: TextDocuments) { + if (!this.settings.ycmd.enable_hover_type) return null const type = await this.runCompleterCommand(documentUri, position, documents, 'GetType') as YcmGetTypeResponse logger('getType', JSON.stringify(type)) return mapYcmTypeToHover(type, documents.get(documentUri).languageId) @@ -316,6 +317,7 @@ export interface Settings { global_extra_config: string, python: string, confirm_extra_conf: boolean, - debug: boolean + debug: boolean, + enable_hover_type: boolean } } \ No newline at end of file