struct LSP::Data::DocumentFilter

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:

lsp/data/document_filter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(language : Nil | String = nil, scheme : Nil | String = nil, pattern : Nil | String = nil) #

[View source]

Instance Method Detail

def language : String | Nil #

A language id, like typescript.


[View source]
def language=(language : String | Nil) #

A language id, like typescript.


[View source]
def pattern : String | Nil #

A glob pattern, like *.{ts,js}.


[View source]
def pattern=(pattern : String | Nil) #

A glob pattern, like *.{ts,js}.


[View source]
def scheme : String | Nil #

A Uri scheme, like file or untitled.


[View source]
def scheme=(scheme : String | Nil) #

A Uri scheme, like file or untitled.


[View source]