diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-06 11:58:09 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-06 11:58:15 +0100 |
commit | b4b054ebf56caf4ac8d721b125e368d9b45b8551 (patch) | |
tree | 03a39a3fd2ce232d8fe54900a1a556bf18f995a6 /after/syntax | |
parent | 08ea94e01188531e819e5d6bea5c84a773b4eb98 (diff) | |
download | vim-polyglot-b4b054ebf56caf4ac8d721b125e368d9b45b8551.tar.gz vim-polyglot-b4b054ebf56caf4ac8d721b125e368d9b45b8551.zip |
Add objc syntax highlighting, closes #77
Diffstat (limited to 'after/syntax')
-rw-r--r-- | after/syntax/objc.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/after/syntax/objc.vim b/after/syntax/objc.vim new file mode 100644 index 00000000..7e64248d --- /dev/null +++ b/after/syntax/objc.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 + +" ARC type modifiers +syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained + +" Block modifiers +syn keyword objcTypeModifier __block + +" Remote messaging modifiers +syn keyword objcTypeModifier byref + +" Property keywords - these are only highlighted inside '@property (...)' +syn keyword objcPropertyAttribute contained getter setter readwrite readonly strong weak copy assign retain nonatomic +syn match objcProperty display "^\s*@property\>\s*([^)]*)" contains=objcPropertyAttribute + +" The @property directive must be defined after objcProperty or it won't be +" highlighted +syn match objcDirective "@property\|@synthesize\|@dynamic\|@package" + +" Highlight property attributes as if they were type modifiers +hi def link objcPropertyAttribute objcTypeModifier + +endif |