I had to look for a syntax highlighting solution for Cocoa recently and after searching on Stack Overflow, Google and GitHub couldn't find anything modern, easy to re-use and still in active development.
It seems most syntax highlighters these days are written for the web. Fortunately it's actually quite easy to embed them in a WebView to use in any Cocoa app. Communicating with the editor can be done through WebKit's WebScriptObject protocol.
Here's an example wrapper for the popular JavaScript text editor CodeMirror for Cocoa:
https://github.com/swisspol/CodeMirrorView