Oli Lane on September 3rd 2018
Microsoft’s VSCode has come along leaps and bounds in the last couple of years, both in functionality and popularity. One of my favourite things about it is that it’s open source, which means that not only can you check out the source code for yourself, you can contribute, too!
At its core, VSCode is powered by the Monaco editor, which handles all of the code editing functionality. Since it’s all built on top of browser technology, it’s actually possible to use the Monaco editor by itself inside a browser - and in fact, that’s exactly what we do to render most of our code and XML diffs within Gearset.
Monaco handles things like diff rendering, quick navigation and syntax highlighting for you, but when it came to displaying Apex diffs, there was no Apex syntax highlighter available. Since Java and Apex are syntactically pretty similar, we got away with using the inbuilt Java syntax highlighting for a little while, but we wanted to both improve our product and give back to the open source community that helps build this fantastic editor. So, I decided to take a stab at writing an Apex syntax highlighter and contributing it back to the project.
Read the rest of this post