Open buddha314 opened 5 years ago
[Displaying an ignorance of Visual Studio that is not uncommon in the HPC world:] What is involved in creating highlighting or build support in Visual Studio? Is it sufficiently open in these respects that groups external to Microsoft can do this? Does it use a common highlighting format, or a custom one?
I'm tagging @marcinz on this because last month he was advocating that I try Visual Studio Code and I wanted to confirm that I did so to get credit, but wasn't won over quickly enough by its emacs-like mode to move away from emacs. More seriously, though, it seems as though he may know something about what's involved here.
I think this might not be that hard.
https://code.visualstudio.com/docs/extensionAPI/language-support#_syntax-highlighting
I don't have a working version of Visual Studio installed but that document says that it uses TextMate grammars. We already have one of those here: https://github.com/chapel-lang/chapel-tmbundle
It looks like the Visual Studio community even have an extension generator wizardy-thing. https://code.visualstudio.com/docs/extensions/yocode - you'd apparently run it and pick New Language support and give it the Chapel .tmLanguage file.
Maybe somebody with Visual Studio installed could try this?
I'd also be interested in a CLion plugin, is that worth another ticket or should I leave this here?
Brian: Which version of Visual Studio are you looking for support in? (e.g., Visual Studio IDE, Visual Studio Code, something else, ...).
I'd also be interested in a CLion plugin, is that worth another ticket or should I leave this here?
Seems likely to require a completely distinct effort, so I'd open a new issue.
the Visual Studio 2017 IDE. You are almost certainly right!
I think the instructions that Michael pointed to are for Visual Studio Code. I've spent some time looking for how to do this with Visual Studio 2017 IDE (for Mac) and have been thwarted. This is the closest reference I've found, but it doesn't seem to work for me (or at least, having installed the textmate bundle in the right place—if it's the right place—I can't figure out how to utilize it). Maybe it would work better on Windows: https://docs.microsoft.com/en-us/visualstudio/ide/adding-visual-studio-editor-support-for-other-languages?view=vs-2017
They do appear to be for Visual Studio Code (which is Electron based like Atom).
Note the Visual Studio for Mac is not Visual Studio either (bad naming on Microsoft's part). Visual Studio for Mac is an improved version of Xamarin Studio (Xamarin being the company behind the Mono clone of .Net).
@ghenriks: Thanks for the clarification. I'm afraid I don't have access to a Windows system these days on which to experiment with this. The documents I linked to above did seem to suggest that it would not be hard to take the textmate bundles Michael pointed to above and put them in the location referenced in the online documentation I referred to in my prior comment. If someone did have access to Windows and could try it out, that'd be great. I also opened a GitHub issue (https://github.com/MicrosoftDocs/visualstudio-docs/issues/2077) indicating that it wasn't clear what should happen after the files were installed. But now I'm wondering whether that was a Visual Studio for Mac vs. Windows specific issue. (Yes, the names are very confusing).
So I tried it out with both Visual Studio 2017 and 2019 Preview and it works.
I also, with the goal of making it easier for a user, put in a request to add Chapel support in the "Syntax Highlighting Pack" Visual Studio extension so users can simply add an extension, it can be found at https://github.com/madskristensen/TextmateBundleInstaller/issues/472
Great! Would you be interested in putting together a short description for how others can reproduce this that we could add to the highlight/ directory?
will try to get something done in the next week or so.
For reasons that are too terrible to mention, too horrific to retell, fine people are being forced to develop in MicroSoft Visual Studio. Please issue a syntax highlighter and other build tools for these poor souls.