Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add clarity to FindFiles2 #205407

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/vscode-dts/vscode.proposed.findFiles2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ declare module 'vscode' {

/**
* A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
* apply.
* will be matched against the file paths of resulting matches relative to their workspace.
*/
exclude?: GlobPattern;

Expand All @@ -32,21 +31,24 @@ declare module 'vscode' {

/**
* Whether external files that exclude files, like .gitignore, should be respected.
* See the vscode setting `"search.useIgnoreFiles"`.
* Defaults to the value for `search.useIgnoreFiles` in settings.
* For more info, see the setting listed above.
*/
useIgnoreFiles?: boolean;

/**
* Whether global files that exclude files, like .gitignore, should be respected.
* Must set `useIgnoreFiles` to `true` to use this.
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
* Defaults to the value for `search.useGlobalIgnoreFiles` in settings.
* For more info, see the setting listed above.
*/
useGlobalIgnoreFiles?: boolean;

/**
* Whether files in parent directories that exclude files, like .gitignore, should be respected.
* Must set `useIgnoreFiles` to `true` to use this.
* See the vscode setting `"search.useParentIgnoreFiles"`.
* Defaults to the value for `search.useParentIgnoreFiles` in settings.
* For more info, see the setting listed above.
*/
useParentIgnoreFiles?: boolean;

Expand Down Expand Up @@ -77,7 +79,6 @@ declare module 'vscode' {
* will be matched against the file paths of resulting matches relative to their workspace. Use a {@link RelativePattern relative pattern}
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
* @param options A set of {@link FindFiles2Options FindFiles2Options} that defines where and how to search (e.g. exclude settings).
* If enabled, any ignore files will take prescendence over any files found in the `filePattern` parameter.
* @param token A token that can be used to signal cancellation to the underlying search engine.
* @returns A thenable that resolves to an array of resource identifiers. Will return no results if no
* {@link workspace.workspaceFolders workspace folders} are opened.
Expand Down