class LSP::DocumentFilter
- LSP::DocumentFilter
- Reference
- Object
Overview
A document filter denotes a document through properties like language, scheme or pattern.
An example is a filter that applies to TypeScript files on disk. Another example is a filter the applies to JSON files with name package.json:
{ language: 'typescript', scheme: 'file' }
{ language: 'json', pattern: '**/package.json' }
Included Modules
Defined in:
base/document_filter.crConstructors
Instance Method Summary
-
#language : String | Nil
A language id, like
typescript
. -
#language=(language : String | Nil)
A language id, like
typescript
. -
#pattern : String | Nil
A glob pattern, like
*.{ts,js}
. -
#pattern=(pattern : String | Nil)
A glob pattern, like
*.{ts,js}
. -
#scheme : String | Nil
A Uri scheme, like
file
oruntitled
. -
#scheme=(scheme : String | Nil)
A Uri scheme, like
file
oruntitled
.
Constructor Detail
Instance Method Detail
def pattern : String | Nil
#
A glob pattern, like *.{ts,js}
.
Glob patterns can have the following syntax:
*
to match one or more characters in a path segment?
to match on one character in a path segment**
to match any number of path segments, including none{}
to group conditions (e.g.**/*.{ts,js}
matches all TypeScript and JavaScript files)[]
to declare a range of characters to match in a path segment (e.g.,example.[0-9]
to match onexample.0
,example.1
, …)[!...]
to negate a range of characters to match in a path segment (e.g.,example.[!0-9]
to match onexample.a
,example.b
, but notexample.0
)
def pattern=(pattern : String | Nil)
#
A glob pattern, like *.{ts,js}
.
Glob patterns can have the following syntax:
*
to match one or more characters in a path segment?
to match on one character in a path segment**
to match any number of path segments, including none{}
to group conditions (e.g.**/*.{ts,js}
matches all TypeScript and JavaScript files)[]
to declare a range of characters to match in a path segment (e.g.,example.[0-9]
to match onexample.0
,example.1
, …)[!...]
to negate a range of characters to match in a path segment (e.g.,example.[!0-9]
to match onexample.a
,example.b
, but notexample.0
)