{"id":2770,"date":"2020-09-15T09:27:38","date_gmt":"2020-09-15T13:27:38","guid":{"rendered":"http:\/\/codinggorilla.com\/?p=2770"},"modified":"2020-09-21T10:06:41","modified_gmt":"2020-09-21T14:06:41","slug":"updates-to-antlrvsix-2","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2020\/09\/15\/updates-to-antlrvsix-2\/","title":{"rendered":"Updates to Antlrvsix"},"content":{"rendered":"\n<p>Many months ago, I had VSCode working with <a href=\"https:\/\/github.com\/kaby76\/AntlrVSIX\">Antlrvsix<\/a>. Back then, rather than release what I had, I decided to put it off because I was concentrating my effort on getting the server capabilities expanded. But, the main problem why I didn&#8217;t release a VSCode extension was that I could not support &#8220;semantic highlighting&#8221; in my server in a standardized way because the API I was using did not support it. Since then, the server capabilities have been enhanced. But, more importantly, I changed the API to get semantic highlighting in Antlrvsix to work with VSCode. I have now released <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=KenDomino.Antlrvsix-vscode\" class=\"ek-link\">Antlrvsix for VSCode<\/a> to the Microsoft Marketplace for VSCode.<\/p>\n\n\n\n<p>To get semantic highlighting working with VSCode, I decided to write a <a href=\"https:\/\/github.com\/kaby76\/AntlrVSIX\/tree\/master\/Protocol\" class=\"ek-link\">drop-in replacement<\/a> for Microsoft&#8217;s <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.VisualStudio.LanguageServer.Protocol\/\" class=\"ek-link\">Microsoft.VisualStudio.LanguageServer.Protocol<\/a> API. While Microsoft does make a release of the API every three months or so, there are many features missing that have been in the LSP spec for years. Semantic highlighting is a crucial new addition, but I have no confidence that Microsoft will ever implement it based on the changes I&#8217;ve seen over the last year. This drop-in replacement is the current version with additions for semantic highlighting.<\/p>\n\n\n\n<p>On the grammar transforms, I have a <a href=\"https:\/\/github.com\/kaby76\/AntlrVSIX\/blob\/master\/Trash\/optimize_java9.txt\" class=\"ek-link\">script<\/a> for the &#8220;Trash&#8221; command-line tool of Antlrvsix to optimize the Java9 grammar partially. The transforms for expressions aren&#8217;t yet there, but so far, the optimized grammar parser works several times faster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many months ago, I had VSCode working with Antlrvsix. Back then, rather than release what I had, I decided to put it off because I was concentrating my effort on getting the server capabilities expanded. But, the main problem why I didn&#8217;t release a VSCode extension was that I could not support &#8220;semantic highlighting&#8221; in &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2020\/09\/15\/updates-to-antlrvsix-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Updates to Antlrvsix&#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\/2770"}],"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=2770"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2770\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=2770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=2770"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=2770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}