andrewbranch / gatsby-remark-vscode

Gatsby plugin to provide VS Code’s syntax highlighting to Markdown code fences
MIT License
296 stars 27 forks source link

How to add Language Support for extensions not on NPM? #188

Open liamfoneill opened 2 years ago

liamfoneill commented 2 years ago

I'm new to JS so please forgive me if this is a silly question 😁

I would like to add Syntax support for Hashicorp Terraform (HCL) and Azure Bicep. In VS Code adding syntax highlighting is achieved by installing the following extensions:

Bicep: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep Terraform: https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform

I can't find the equivalent of either of these on NPM so not sure how to proceed.

andrewbranch commented 2 years ago

The README covers this: https://github.com/andrewbranch/gatsby-remark-vscode#using-languages-and-themes-from-an-extension

You still use npm but it reads from GitHub. Unfortunately some GH repos don’t behave well with this (e.g. if they need a build step to generate the JSON/YAML grammar files), in which case you’d have to build it yourself and bundle the result with your project, which is also mentioned in the README.