Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

fragcolor-xyz/vscode-shards-syntax

Repository files navigation

vscode-shards-syntax License: BSD 3-Clause

Syntax highlighting for Shards in VS Code.

Install

Grab it from the VS Code Marketplace, or issue the command:

code --install-extension fragcolor.shards-syntax

You could also copy this repo to <user home>/.vscode/extensions folder and restart VS Code.

What’s in the folder

This folder contains all of the files necessary for your extension:

  • package.json - this is the manifest file declaring language support and locating the grammar file.

  • shards.tmLanguage.json - this is the Text mate grammar file that is used for tokenization, generated from shards.tmLanguage.edn.

  • language-configuration.json - this is the language configuration, defining the tokens that are used for comments and brackets.

Get up and running straight away

  1. Go to Run Start Debugging to open a new window with your extension loaded.

  2. Open shards1.shs or shards2.shs file in this repo.

  3. Verify that syntax highlighting works and that the language configuration settings are working.

Making changes

When making changes to shards.tmLanguage.edn, generate shards.tmLanguage.json using a tool like jet, here as:

cat shards.tmLanguage.edn |jet --to=json > shards.tmLanguage.json

Reload (Ctrl+R or Cmd+R on Mac) the VS Code window with your extension to load your changes. Otherwise, relaunch the extension from the debug toolbar.

Inspecting tokens and scopes

In VS Code command palette, run Developer: Inspect Editor Tokens and Scopes to inspect the tokens and scopes of the current cursor position.

Publish this extension

Bump the version number in package.json before publishing this extension.

To share this extension with the world, read on about publishing an extension.

vscode-shards-syntax source code is licensed under the BSD 3-Clause license.