Adding a new textmate grammar to visual studio 2015 update 1

The updated studio studio 2015 version 1 publication ( https://blogs.msdn.microsoft.com/visualstudio/2015/11/30/visual-studio-update-1-rtm/ ) indicates the possibility of adding textmate packages (or grammars ):

Editor support for new languages. Visual Studio Editor now provides built-in syntax highlighting and basic IntelliSense support for languages ​​including Go, Java, Perl, R, Ruby, and Swift. We support the TextMate model for language grammars and fragments, which allows us to extend it with support for other languages.

I want to create a new textmate grammar for my own language, but I cannot find any documentation on how to do this in the vs2015 update.

The best source I found is this reddit talk: https://www.reddit.com/r/programming/comments/3uvwn3/visual_studio_2015_update_1/

It looks like it is implemented as an extension, "Visual Studio Extension for Textmate Grammar". If you are looking for * .tmbundle in the visual studio \ Common7 \ IDE \ Extensions directory, you will find the location of the tundoons. I just created a new folder for Julia and copied Julia's trick to her. Seems to work.

Is this a supported way to do this? Why there is no documentation for this, the menu of the visual studio, etc.

+7
visual-studio textmatebundles
source share
2 answers

You can do it the way you did it above, or if you prefer it to be in your user profile directory rather than through the entire installation of the operating system, you can add this package here:

%USERPROFILE%\.vs\Extensions\ 

On most machines, this path extends to:

 C:\User\<yourusername>\.vs\Extensions\ 
+4
source share

Looks like an extension from Mads Kristensen that provides a large number of TextMate syntaxes in Visual Studio. It seems that it's easy to add additional languages ​​... Perhaps you can check out the repo and see what exactly is required to add additional syntax.

http://vsixgallery.com/extension/4773ce75-6f30-4269-9557-1f7c30a47be2/

+2
source share

All Articles