UNPKG

@shopify/theme-language-server-common

Version:

<h1 align="center" style="position: relative;" > <br> <img src="https://github.com/Shopify/theme-check-vscode/blob/main/images/shopify_glyph.png?raw=true" alt="logo" width="141" height="160"> <br> Theme Language Server </h1>

25 lines (24 loc) 1.14 kB
import { LiquidHtmlNode } from '@shopify/liquid-html-parser'; import { CompletionParams } from 'vscode-languageserver'; import { AugmentedLiquidSourceCode } from '../../documents'; interface CompletionContext { /** The AST of the Liquid template up to the cursor position */ readonly partialAst: LiquidHtmlNode; /** The node at the cursor position, undefined if cursor is not in a node */ readonly node: LiquidHtmlNode | undefined; /** The ancestry that leads to the current node */ readonly ancestors: LiquidHtmlNode[]; } export interface LiquidCompletionParams extends CompletionParams { /** * The completion context represents additional information that would * allow you to offer completions at the cursor position. * * If undefined, then the file is unparseable. */ readonly completionContext: CompletionContext | undefined; /** The document from the document manager */ readonly document: AugmentedLiquidSourceCode; } export declare function createLiquidCompletionParams(sourceCode: AugmentedLiquidSourceCode, params: CompletionParams): LiquidCompletionParams; export {};