A document filter denotes a document by different properties like the
language, the scheme of its resource, or a glob-pattern that is
applied to the path.
A document filter matches if all the provided properties (those of language, scheme and pattern that are not undefined) match.
If all properties are undefined, the document filter matches all documents.
Examples:
// A language filter that applies to typescript files on disk
{ language: 'typescript', scheme: 'file' }
// A language filter that applies to all package.json paths
{ language: 'json', pattern: '**package.json' }
A document filter denotes a document by different properties like the language, the scheme of its resource, or a glob-pattern that is applied to the path. A document filter matches if all the provided properties (those of
language
,scheme
andpattern
that are notundefined
) match. If all properties areundefined
, the document filter matches all documents.Examples:
// A language filter that applies to typescript files on disk { language: 'typescript', scheme: 'file' } // A language filter that applies to all package.json paths { language: 'json', pattern: '**package.json' }