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>

20 lines 806 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCompletionList = exports.getRequestParams = void 0; function getRequestParams(documentManager, relativePath, source) { const uri = `file:///root/${relativePath}`; const sourceWithoutCursor = source.replace('█', ''); documentManager.open(uri, sourceWithoutCursor, 1); const doc = documentManager.get(uri).textDocument; const position = doc.positionAt(source.indexOf('█')); return { textDocument: { uri: uri }, position: position, }; } exports.getRequestParams = getRequestParams; function isCompletionList(completions) { return completions !== null && !Array.isArray(completions); } exports.isCompletionList = isCompletionList; //# sourceMappingURL=test-helpers.js.map