In the visual studio 2015 update 1 release blog post (https://blogs.msdn.microsoft.com/visualstudio/2015/11/30/visual-studio-update-1-rtm/) the ability to add textmate bundles (or grammars) is explicitly mentioned:
Editor support for new languages. The 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 bundle
model for language grammars and snippets, allowing you to extend this with support for other languages.
I want to create a new textmate grammar for my own language, but I cannot find any documentation, how to do this in vs2015 update 1.
The best source I found is this reddit conversation: https://www.reddit.com/r/programming/comments/3uvwn3/visual_studio_2015_update_1/
It looks like it's implemented as an extension, "Visual Studio Extension for Textmate Grammars." If you search for *.tmbundle in your visual studio\Common7\IDE\Extensions directory you will find the location of the tmbundles. I just made a new folder for Julia and copied the Julia tmbundle to it. Seems to work.
Is this the supported way of doing this? Why isn't there any documentation, visual studio menu etc. for this?
You can do this the way you've done it above, or if you prefer it to be in your user profile directory rather than across the whole operating system installation, you can add the bundle here:
%USERPROFILE%\.vs\Extensions\
On most machines, that path expands to:
C:\User\<yourusername>\.vs\Extensions\
Looks like there's an extension from Mads Kristensen now that provides a large number of TextMate syntaxes into Visual Studio. Looks like it's easy to add additional languages as well... You can probably check out the repo and see exactly what's required to add additional syntax.
http://vsixgallery.com/extension/4773ce75-6f30-4269-9557-1f7c30a47be2/
Related
When writing non english comments in Visual Studio 2022, "Quick actions and refactorings" it offers spelling corrections in the english dictionary (EN-US). There is any way to have multiple dictionaries, on different idioms?
I cannot find the options for it, or any documentation on how to setup the dictionary, or if is possible to have multiple idioms.
I didn't noticed that I had a spell checker extension installed.
I thought that it was a native feature of VS.
Specifically, I had EWSoftware Visual Studio Spell Checker extensión, whose documentation is here.
His settings can be found at VS menu Tools>Spell Checker>Edit Global Configuration>Dictionary Settings
There, is possible to select more dictionaries, and add them, as documented here. It does not works until VS is restarted.
I use rake scripts for running builds and would like to be able to get syntax highlighting within visual studio.
Is it possible to get ruby syntax highlighting in Visual Studio 2012?
I've been searching for a while but not come up with a solution yet. I'm only looking for free solutions so Ruby In Steel is out.
Vote here for IronRuby support for visual studio 2012
Unfortunately the IronRuby tools for Visual Studio don't yet support VS2012.
I might be wrong about that though, it seems that the development has been moved to Github.
My preferred external editor is Sublime Text so I've opted use that for Ruby files. You just right click on your rakefile.rb is the VS solution explorer and choose "Open With". In the dialog you can add an editor of your choice and set it to be the default.
There was, at one point in 2008 anyway, a free edition of Ruby in Steel and it seems like the download link on that page does still work. It has a slightly limited feature set compared to pay versions of the software, but does include syntax Highlighting. So have a go and see if that will do what you need for free.
And for the rest of you, Neil specifically asked for VS internal syntax highlighting, not for you to plug your favorite text editor.
I am trying to add support for a different language in Visual Studio 2010. I was hoping to add custom syntax highlighting, and have some sort of basic intellisense work with it. The language I am trying to add is 4Js Genero (a newer version of Informix-4GL). I basically just need support for the .4gl and .per file extensions that are used in Genero/4GL. Does anyone know how to do this, or can point me in the right direction?
It's not really for the faint of heart. Don't underestimate how much work you'll have to put in.
You'll need the Visual Studio 2010 SDK, and then to read (and re-read, and re-read(*)) all about Language Services
The purpose of a language service in Visual Studio is to provide language-specific support for editing source code in the integrated development environment (IDE). You implement a language service as part of a VSPackage.
(*) - unless it all immediately makes sense to you.
This isn't an answer on how to create custom syntax highlighting.
There is an open-source extension for visual studio 2010+ for Genero 4gl language support out of github:
https://github.com/gregfullman/VSGenero/wiki
It should do most of what you're looking for already, and it would certainly make a great starting point for you if you want to do more.
i'm searching for a way to change the language of the "Spell Checker"-Extension for Visual Studio 2010.
The problem is following:
I'm using the german language version of Visual Studio 2010. If I use the "Spell Checker"-Extension it checks the correctness in german language, while I'm coding in english.
So nearly every single word is underlinded as incorrect.
How can I change the checking language to english or how can I change the libary it used to check language?
Any Ideas?
I found a solution for the problem by myself.
If anybody like to know it:
First download the extension inside the Visual Studio extension-manager.
Second download the source of the extension and open it in Visual Studio (Visual Studio SDK has to be installed to open the project)
Third navigate to Spellchecker/Spelling/SpellingTaggers.cs and add the following line inside the CheckSpellings method of SpellingTaggers class under the textBox initialization:
textBox.Language = XmlLanguage.GetLanguage("en-US");
Next build the dll-Files with Visual Studio
And finally replace the dll-files with those in the directory of the Spell Checker Extension (it can be found under %HOME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Roman Golovin, Michael Lehenbauer, Noah Richards\Spell Checker\2.23 or something similar)
That's it!
If you want to use a language different from "en-US", change the Language Code.
There is a fork of spellchecker, that maybe will eventually be integrated into the main branch, that supports spellchecking in multiple languages here:
https://github.com/simonegli8/Spellchecker
Simon Egli
Remark:
Step 5 will not work in all cases. I think dlls are cached or something like this, so it would be better to uninstall spell checker from Visual Studio and reinstall the new compiled version of SpellChecker.vsix (could be found in SpellChecker.Implementation\bin...).
This worked for me.
A program we work with in my office can be automated through VBScript Files, yet the files are saved with an extension *.RVB other then *.VBS. I'd like to use Visual Studio as my editor/debugger, which is working. Yet it is not coloring the code like it does if I have a *.VBS file open.
Under Tools->Options->File Extension I added "RVB" and set it's editor to Microsoft Visual Basic, yet it is still not applying any syntax highlighting to my file. What am I missing?
I realize this might be beyond what you had in mind. However, I see no acknowledgement to your solution so I am going out on a limb here. You could create a language extension and totally control all aspects of the coloring. This is easily transfered to 2010 (the example is in 2008) but remains relevant.
http://msdn.microsoft.com/en-us/vstudio/bb851701
In this video, Hilton Giesenow illustrates a simple working Language Service. He begins by building a simple scanner colorizingsing based on regular expressions, then expands on this to implement the Managed Babel framework, integrating MPLex and MPPG directly into the Visual Studio build as well.