Skip to content

Commit

Permalink
fix: Update glob to match only files in workspace folders (#2195)
Browse files Browse the repository at this point in the history
fix #2192
  • Loading branch information
Jason3S authored Sep 4, 2022
1 parent 42901d2 commit 9c89f2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/_server/src/config/documentSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class DocumentSettings {
const globRoot = Uri.parse(globRootFolder.uri).fsPath;
if (!files.length && cSpellConfigSettings.spellCheckOnlyWorkspaceFiles !== false) {
// Add file globs that will match the entire workspace.
folders.forEach((folder) => files.push({ glob: '**', root: Uri.parse(folder.uri).fsPath }));
folders.forEach((folder) => files.push({ glob: '/**', root: Uri.parse(folder.uri).fsPath }));
fileSettings.enableGlobDot = fileSettings.enableGlobDot ?? true;
}
fileSettings.files = files;
Expand All @@ -333,9 +333,10 @@ export class DocumentSettings {
setIfDefined(includeOptions, 'dot', fileSettings.enableGlobDot);
const includeGlobMatcher = new GlobMatcher(files, includeOptions);

const cSpell = cSpellConfigSettings;
const ext: ExtSettings = {
uri: docUri,
vscodeSettings: { cSpell: cSpellConfigSettings },
vscodeSettings: { cSpell },
settings: fileSettings,
excludeGlobMatcher,
includeGlobMatcher,
Expand Down

0 comments on commit 9c89f2f

Please sign in to comment.