@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>
22 lines (21 loc) • 930 B
TypeScript
import { Connection } from 'vscode-languageserver';
import { RenameFilesParams } from 'vscode-languageserver-protocol';
import { AugmentedSourceCode } from '../../documents';
import { BaseRenameHandler } from '../BaseRenameHandler';
/**
* The SnippetRenameHandler will handle snippet renames.
*
* We'll change all the render and include tags that reference the old snippet
* to reference the new snippet.
*
* {% render 'oldName' %} -> {% render 'newName' %}
*
* We'll do this by visiting all the liquid files in the theme and looking for
* render and include tags that reference the old snippet. We'll then create a
* WorkspaceEdit that changes the references to the new snippet.
*/
export declare class SnippetRenameHandler implements BaseRenameHandler {
private connection;
constructor(connection: Connection);
onDidRenameFiles(params: RenameFilesParams, theme: AugmentedSourceCode[]): Promise<void>;
}