---
title: "VS Code developer plugin"

doc_type: static
doc_category: static
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/docs/online-store-3-0-themes/development-tools/vs-code-developer-plugin'
  md: 'https://developer.shopline.com/docs/online-store-3-0-themes/development-tools/vs-code-developer-plugin.md'
---
# VS Code developer plugin{#WoOh4}

The `Shopline Developer Plugin` is a Visual Studio Code (VS Code) extension specifically designed for developers by SHOPLINE. It offers features such as theme syntax checking, code highlighting, code folding, code suggestions, code snippet completion, local preview, and more, aiming to provide a more efficient and convenient development experience for developers.

## Installation{#Hdkfa}

Search for `Shopline Developer Plugin` in the VS Code extension Marketplace to install the plugin.

## Uninstallation{#Tut3v}

Search for `Shopline Developer Plugin` in the VS Code extension Marketplace to uninstall the plugin.

## Features of the VS Code developer plugin{#iJBW5}

### Code highlighting{#sKskK}

#### Sline syntax highlighting{#HmeNX}

Files with the suffix `.html` are automatically recognized as Sline syntax and are highlighted, with the syntax highlighting colors being related to the theme configured in VS Code.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276219014401/image.png" alt="" />

#### Schema syntax highlighting{#qEcjk}

The following shows an example of schema syntax highlighting:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276224093628/image.png" alt="" />

### Code suggestions{#MfFW6}

#### Objet suggestions{#IXFE8}

When developing any `.html` file, if you input any [object](https://developer.shopline.com/docs/sline/sline-overview.md#slineObjects), its properties will be suggested and displayed for selection. For example, the properties of a `product` object are shown as follows:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276229011290/image.png" alt="" />

#### Filter suggestions{#deG28}

When developing any `.html` file, if the current line of code contains `{{ |`, then the characters entered afterwards will match the relevant [filters](https://developer.shopline.com/docs/sline/sline-overview.md#eTjen) for selection.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276232934351/image.png" alt="" />

#### Tag suggestions{#CQvvy}

When developing any `.html` file, if the current line of code contains `{{#`, then the characters entered afterwards will match the relevant [tags](https://developer.shopline.com/docs/sline/sline-overview.md#KuTqc) for selection.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276236583095/image.png" alt="" />

#### Schema code suggestions{#SFR54}

When writing schema configurations, entering `type` will trigger preset code suggestions for all [control](https://developer.shopline.com/docs/online-store-3-0-themes/theme-and-editor-interaction/editor-controls.md) types.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276240227153/image.png" alt="" />

When writing configurations, dynamic suggestions for supported values appear based on the property names you enter.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276243331860/image.png" alt="" />

Based on the schema configuration inference, property suggestions are provided for `settings`.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276249636554/image.png" alt="" />

#### Variable declaration navigation{#IbnnW}

When you hover the cursor over a variable in use, its definition location is displayed based on context. You can jump directly to the variable's definition code with a single click.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276252743900/image.png" alt="" />

#### Path suggestions{#q6c1f}

For the following scenarios requiring the file path input, path completion suggestions are provided, reducing manual entry.

-   The [component](https://developer.shopline.com/docs/sline/tag/component.md) tag
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276258163749/image.png" alt="" />
-   The [asset\_url](https://developer.shopline.com/docs/sline/filter/asset-url.md) filter
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276261329383/image.png" alt="" />
-   Schema `blocks` [type](https://developer.shopline.com/docs/online-store-3-0-themes/theme-structure/sections.md?lang=en#OuEiB)
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276265638175/image.png" alt="" />

### Documentation tooltips{#hrOV3}

In any `.html` file, when the mouse hovers over keywords such as an [object](https://developer.shopline.com/docs/sline/sline-overview.md#slineObjects), a [filter](https://developer.shopline.com/docs/sline/sline-overview.md#eTjen), a [tag](https://developer.shopline.com/docs/sline/sline-overview.md#KuTqc), or a [scheme property](https://developer.shopline.com/docs/online-store-3-0-themes/theme-and-editor-interaction/overview.md), a corresponding documentation tooltip will appear.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276270797620/111.gif" alt="111.gif" /><img src="https://s2cdn.myshopline.com/slfs/op-new/176276272888471/image.png" alt="" />

### Code snippet completion{#GpfRA}

#### Tag code snippet completion{#FIq74}

When developing any `.html` file, typing `{{#` followed by some characters triggers a list of tag suggestions. Press **Enter**, and the code snippet for the selected tag is automatically inserted.

For example, when you type `{{#if` and press **Enter**, the code completes as follows:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276278252777/22 (2).gif" alt="22 (2).gif" />

#### Completion for the end symbol `'/'`{#CBJt2}

In an `.html` file, if you use a tag without including the ending `'/'`, saving the file will automatically append `'/'` to the end of the tag.

For example, if you type `{{#else}}` and save the `.html` file, it will automatically be updated to `{{#else/}}`.

### Syntax checking{#k3eZR}

#### Basic syntax checking{#ER1iq}

When you use template variables, automatic checks for basic syntax errors are performed. For example, a missing closing `}}` in a tag will trigger error diagnostics, as shown in the following:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276283556810/image.png" alt="" />

Declaring a variable more than once within the same scope triggers error diagnostics, as shown in the following:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276291088695/image.png" alt="" />

An unused variable triggers error diagnostics, as shown in the following:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276293780146/image.png" alt="" />

Offer one-click quick-fix suggestions for detected issues, as shown in the following:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276297553313/33 (1).gif" alt="33 (1).gif" />

#### Tag or filter syntax checking{#aLF6j}

If you use a tag or filter that does not exist or specify incorrect parameters, error diagnostics will appear, as shown in the following figure:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276302411694/image.png" alt="" />

#### Schema syntax checking{#JaSix}

If there is an issue with the schema configuration, error diagnostics will appear, as shown in the following figure:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276306374257/image.png" alt="" />

#### File path checking

If you use a file that does not exist, error diagnostics will appear, as shown in the following figure:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276313256010/image.png" alt="" /><img src="https://s2cdn.myshopline.com/slfs/op-new/176276314696169/image.png" alt="" />

#### Workspace scan for anomalous files{#xIlYF}

You can view all anomalous files in the workspace from the **PROBLEMS** tab in VS Code.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276317962104/image.png" alt="" />

### Path navigation{#XAgQN}

Hover over the file path, hold the `Option` or `Alt` key, and click to open the file in the current window.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276322357269/44 (1).gif" alt="44 (1).gif" width="1080" height="207" />

### Code formatting

When using Sline syntax, you can format a document in one of the following ways:

-   Right-click and select **Format Document**.
    
-   Use the shortcut keys `Shift + Option + F` or `Shift + Alt + F`.
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276331252790/55 (1).gif" alt="55 (1).gif" />

### Code folding{#gGZQd}

The following figure shows how the Sline code block folds:

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276340222590/image.png" alt="" />

### Local development{#local-development}

#### Local rendering{#c2rIv}

In theme development projects, local HTML files can be rendered as browser pages, allowing you to quickly preview static page effects by initiating a local service on localhost. This is suitable for scenarios such as static page development, section testing, and template previews.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276344265927/66 (1).gif" alt="66 (1).gif" />

#### Data source{#B5SlF}

A set of demo data sources is built in. If customization is desired, you can modify the data source address following these steps:

1.  Go to **Preferences** > **Settings**.
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276347850270/image.png" alt="" />
2.  Enter `renderer` in the search settings.
    
    <img src="https://s2cdn.myshopline.com/slfs/op-new/176276350512722/image.png" alt="" />
3.  Modify **Renderer: Object Path**, which supports two methods: a local absolute address directory and an HTTP remote interface. Changes take effect after restarting VS Code.
    
    -   Local absolute address directory
        
        <img src="https://s2cdn.myshopline.com/slfs/op-new/176276354194807/image.png" alt="" />
    -   HTTP remote interface
        
        <img src="https://s2cdn.myshopline.com/slfs/op-new/176276356879491/image.png" alt="" />

### Element-to-source navigation{#dOIq2}

When using the locally rendered code in your browser, you can hold the `Option` or `Alt` key while clicking on a specific page element. This action will help you jump to and locate the corresponding `.html` file, making it easier to find and modify the code.

<img src="https://s2cdn.myshopline.com/slfs/op-new/176276360716320/77 (2).gif" alt="77 (2).gif" />