A document filter denotes a document by different properties like the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.

@example A language filter that applies to typescript files on disk { language: 'typescript', scheme: 'file' }

@example A language filter that applies to all package.json paths { language: 'json', pattern: '**​/package.json' }

Fields

@:optionaloptionalfinalread onlyscheme:Null<String>

A Uri {@link Uri.scheme scheme}, like file or untitled.

@:optionaloptionalfinalread onlypattern:Null<GlobPattern>

A {@link GlobPattern glob pattern} that is matched on the absolute path of the document. Use a {@link RelativePattern relative pattern} to filter documents to a {@link WorkspaceFolder workspace folder}.

@:optionaloptionalfinalread onlylanguage:Null<String>

A language id, like typescript.