Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit725828c

Browse files
authored
disable the config provider message for headers outside the workspace & while debugging (microsoft#2239)
* disable the config provider message for headers & while debugging* leave the message on for headers inside the workspace folder
1 parent8b18854 commit725828c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎Extension/src/LanguageServer/client.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,17 @@ class DefaultClient implements Client {
513513
}
514514
},
515515
()=>{
516-
vscode.window.showInformationMessage(`'${providerName}' is unable to provide IntelliSense configuration information for '${document.uri.fsPath}'. Settings from the '${configName}' configuration will be used instead.`);
516+
if(!this.isExternalHeader(document)&&!vscode.debug.activeDebugSession){
517+
vscode.window.showInformationMessage(
518+
`'${providerName}' is unable to provide IntelliSense configuration information for '${document.uri.fsPath}'. `+
519+
`Settings from the '${configName}' configuration will be used instead.`);
520+
}
517521
});
518522
}
523+
524+
privateisExternalHeader(document:vscode.TextDocument):boolean{
525+
returnutil.isHeader(document)&&!document.uri.toString().startsWith(this.RootUri.toString());
526+
}
519527

520528
publicgetCustomConfigurationProviderId():Thenable<string|undefined>{
521529
returnthis.queueTask(()=>Promise.resolve(this.configuration.CurrentConfiguration.configurationProvider));

‎Extension/src/common.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ export function getVcpkgRoot(): string {
7373
returnvcpkgRoot;
7474
}
7575

76+
/**
77+
* This is a fuzzy determination of whether a uri represents a header file.
78+
* For the purposes of this function, a header file has no extension, or an extension that begins with the letter 'h'.
79+
*@param document The document to check.
80+
*/
81+
exportfunctionisHeader(document:vscode.TextDocument):boolean{
82+
letext:string=path.extname(document.uri.fsPath);
83+
return!ext||ext.startsWith(".h")||ext.startsWith(".H");
84+
}
85+
7686
// Extension is ready if install.lock exists and debugAdapters folder exist.
7787
exportasyncfunctionisExtensionReady():Promise<boolean>{
7888
constdoesInstallLockFileExist:boolean=awaitcheckInstallLockFile();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp