Skip to content

Commit

Permalink
Fix AIDL syntax
Browse files Browse the repository at this point in the history
Since syntax/java.vim was removed, we base the syntax highlighting on
the Vim's builtin syntax/java.vim.
  • Loading branch information
NariyasuHeseri authored and NHeseri committed Oct 25, 2024
1 parent 692e359 commit 7c0d651
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions syntax/aidl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ endif

" Quit when a syntax file was already loaded.
if exists("b:current_syntax")
finish
finish
endif

source <sfile>:p:h/java.vim

syn keyword aidlParamDir in out inout
syn keyword aidlKeyword const oneway parcelable
if filereadable($VIMRUNTIME . "/syntax/java.vim")
source $VIMRUNTIME/syntax/java.vim
endif

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

hi def link aidlParamDir StorageClass
hi def link aidlKeyword Keyword
hi def link aidlStorageClass javaStorageClass
hi def link aidlInterfaceDecl javaClassDecl

let b:current_syntax = "aidl"

0 comments on commit 7c0d651

Please sign in to comment.