How to use the @theia/editor/lib/browser/semantic-highlight/semantic-highlighting-service.Range.create function in @theia/editor

To help you get started, we’ve selected a few @theia/editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / monaco / src / browser / monaco-semantic-highlighting-service.ts View on Github external
protected toDecoration(languageId: string, range: SemanticHighlightingRange): EditorDecoration {
        const { start, end } = range;
        const scopes = range.scope !== undefined ? this.scopesFor(languageId, range.scope) : [];
        const options = this.toOptions(scopes);
        return {
            range: Range.create(start, end),
            options
        };
    }