Module: languages/getTextFragmentExtractor
Type aliases
TextFragmentExtractor
Ƭ TextFragmentExtractor: (node
: SyntaxNode
, selection
: SelectionWithEditor
) => Range
| null
Type declaration
▸ (node
, selection
): Range
| null
Parameters
Name | Type |
---|---|
node | SyntaxNode |
selection | SelectionWithEditor |
Returns
Range
| null
Defined in
languages/getTextFragmentExtractor.ts:16
Functions
getTextFragmentExtractor
▸ getTextFragmentExtractor(languageId
): TextFragmentExtractor
Returns a function which can be used to extract the range of a text fragment from within a parsed language. This function should only return a nominal range for fragments within the document that should be treated like raw text, such as comments strings or error nodes. In these cases we want our surrounding pair algorithm to fall back to a pure raw text-based approach.
Parameters
Name | Type | Description |
---|---|---|
languageId | string | The language for which to get the text fragment extractor for |
Returns
The text fragment extractor for the given language
Defined in
languages/getTextFragmentExtractor.ts:106