Add a new language to Visual Studio 2010 with syntax highlighting and intellisense

走远了吗. 提交于 2020-01-01 00:44:27

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/14835410/add-a-new-language-to-visual-studio-2010-with-syntax-highlighting-and-intellisen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!