Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding syntax highlighting to programming languages in Xcode 4.0

Does anyone know if it's possible to add custom syntax highlighting to Xcode 4?

In Xcode 3 you just had to add some files in:

~/Library/Application Support/Developer/Shared/Xcode/Specifications/

but that does not seem to work anymore?

like image 989
Jyaif Avatar asked Mar 11 '11 07:03

Jyaif


2 Answers

XCode syntax coloring for lua https://github.com/bastos/lua-xcode-coloring

like image 82
Anton Chikin Avatar answered Nov 11 '22 08:11

Anton Chikin


I haven't tried that, but I think it's worth trying the following (at least on XCode 4.3):

1 - Go to /Contents/OtherFrameworks/DevToolsCore.framework/Versions/A/Resources/ inside the XCode package;

2 - Find the files "Built-in file types.pbfilespec" and "Standard file types.pbfilespec";

3 - Create backup copies of those files;

4 - The language syntax should be inserted in the file "Built-in file types.pbfilespec". Just take the definition of C language, for instance, as a template and define the new language syntax;

5 - The file "Standard file types.pbfilespec" seems to make reference to the file "Built-in file types.pbfilespec", but that's just a guess. If step 4 is not enough, consider editing this file too;

Hope it helps.

like image 40
Thiagoab Avatar answered Nov 11 '22 09:11

Thiagoab