Visual Studio 2019: Add Snippet for New/Unknown Language (NOT VS Code)

Viewed 368

I've added syntax highlighting to my new language by adding my *.tmLanguage file here:

C:\Users\<user>\.vs\Extensions\<new lang>\Syntaxes

and now I'm trying to add my own snippets, but nothing seems to work. I'd like to use a *.json file but if I need to make individual *.tmSnippet files that's fine too I'll take anything at this point if it works.

I know it's possible because I've found the Extension Syntax Highlighting Pack by Mads Kristensen and although his repo is open source I still can't figure out how he makes it work.

Things I've tried:

  1. Cloning the Syntax Highlighting Pack repo and adding my language and snippets.

.......Result: VS errors when I try to load and I don't know how to troubleshoot.

  1. Microsoft Documentation

.......Result: according to the documentation I need to know the Language attribute but it's not one of the 9 languages listed so I don't know how to make that work.

  1. Installing the Syntax Highlighting Pack and then using the snippets it adds as a template. Note: There are several formats for snippets and I've tried them all. (*.tmSnippet, *.plist, and *.json)

.......Result: Adding the *.tmLanguage this way works but Snippets file no matter the format seems to be ignored.

1 Answers
Related