{"id":2236,"date":"2019-08-21T11:51:30","date_gmt":"2019-08-21T15:51:30","guid":{"rendered":"http:\/\/codinggorilla.com\/?p=2236"},"modified":"2019-08-23T08:53:20","modified_gmt":"2019-08-23T12:53:20","slug":"towards-a-universal-visual-studio-extension-supporting-any-programming-language","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2019\/08\/21\/towards-a-universal-visual-studio-extension-supporting-any-programming-language\/","title":{"rendered":"Towards a Visual Studio IDE extension supporting any programming language"},"content":{"rendered":"\n<p>As I pointed out before, it now seems possible to write a VS extension that supports any programming language. I&#8217;ve been updating <a rel=\"noreferrer noopener\" aria-label=\"AntlrVSIX (opens in a new tab)\" href=\"https:\/\/github.com\/kaby76\/AntlrVSIX\" target=\"_blank\">AntlrVSIX<\/a> to input a description of the syntax of a programming language and tag a file of that language in the editor. I have this now working for Antlr and Java, and plan to try a dozen or so languages.<\/p>\n\n\n\n<p>At issue is identifying what are the commonalities of a programming language, such as defining and applied occurrences, and how the editor should use that.<\/p>\n\n\n\n<p>However, some extensions tag the programming language that my extension is also trying to tag, which results in multiple competing and conflicting classifiers and formatters. I solved this problem by changing the IContentType associated with a buffer to one that I define for the extension. But, ideally, I&#8217;d prefer to just &#8220;turn off&#8221; any formatters that are competing with my formatter.<\/p>\n\n\n\n<p>It may not look like much, but here is how Java is formatted by Visual Studio by default, and how my extension formats it (first attempt to get something working).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"http:\/\/codinggorilla.com\/wordpress\/wp-content\/uploads\/2019\/08\/2019-08-22-3-1024x549.png\" alt=\"\" class=\"wp-image-2244\"\/><figcaption>Current VS 2019 &#8220;code++.java&#8221; formatting. Variable &#8220;token&#8221; labeled erroneously in comments.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"http:\/\/codinggorilla.com\/wordpress\/wp-content\/uploads\/2019\/08\/2019-08-22-4-1024x549.png\" alt=\"\" class=\"wp-image-2245\"\/><figcaption>Formatting from the Antlr extension. Squiggles indicate no defining occurrence in the file, but should be found via imported libraries.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>As I pointed out before, it now seems possible to write a VS extension that supports any programming language. I&#8217;ve been updating AntlrVSIX to input a description of the syntax of a programming language and tag a file of that language in the editor. I have this now working for Antlr and Java, and plan &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2019\/08\/21\/towards-a-universal-visual-studio-extension-supporting-any-programming-language\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Towards a Visual Studio IDE extension supporting any programming language&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2236"}],"collection":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/comments?post=2236"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2236\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=2236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=2236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=2236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}