Extension for Visual Studio Code that makes developing applications for Sanity.io that much more awesome.
Syntax highlighting for the GROQ query language is available in the following situations:
.groq
extensiongroq
taggroq
tagdefineQuery
method/* groq */
comment// groq
commentWhen GROQ-queries are detected, the extension will allow you to run the query and displays the result as JSON in a separate tab.
The project ID and dataset used is determined by finding sanity.cli.ts
in the workspace. If multiple files are found, the extension will prompt you to select one.
If the GROQ file/query has any variables, then extension asks for a relative filename of a JSON-file containing an object of key-value mappings. It autofills the param filename based on the current file with a .json
extension, if it exists.
Install the VSCode Sanity.io Extension. This extension adds syntax highlighting for GROQ-files and groq
tags.
npm install
Ctrl+R
or Cmd+R
on Mac) in the syntax highlighted file to test the changesMIT