Skip to content

Commit 7c0d651

Browse files
NariyasuHeseriNHeseri
authored andcommitted
Fix AIDL syntax
Since syntax/java.vim was removed, we base the syntax highlighting on the Vim's builtin syntax/java.vim.
1 parent 692e359 commit 7c0d651

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

syntax/aidl.vim

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ endif
1010

1111
" Quit when a syntax file was already loaded.
1212
if exists("b:current_syntax")
13-
finish
13+
finish
1414
endif
1515

16-
source <sfile>:p:h/java.vim
17-
18-
syn keyword aidlParamDir in out inout
19-
syn keyword aidlKeyword const oneway parcelable
16+
if filereadable($VIMRUNTIME . "/syntax/java.vim")
17+
source $VIMRUNTIME/syntax/java.vim
18+
endif
2019

21-
" Needed for the 'in', 'out', 'inout' keywords to be highlighted.
22-
syn cluster javaTop add=aidlParamDir
20+
syn keyword aidlStorageClass in out inout const oneway
21+
syn keyword aidlInterfaceDecl parcelable union
2322

24-
hi def link aidlParamDir StorageClass
25-
hi def link aidlKeyword Keyword
23+
hi def link aidlStorageClass javaStorageClass
24+
hi def link aidlInterfaceDecl javaClassDecl
2625

2726
let b:current_syntax = "aidl"

0 commit comments

Comments
 (0)