From e54d696781de694417e9383324c57693d27e38a5 Mon Sep 17 00:00:00 2001 From: Nariyasu Heseri Date: Fri, 24 Feb 2023 19:59:24 +0900 Subject: [PATCH] Fix AIDL syntax Since syntax/java.vim was removed, we base the syntax highlighting on the Vim's builtin syntax/java.vim. --- syntax/aidl.vim | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/syntax/aidl.vim b/syntax/aidl.vim index 524a8938e..4b1dc979d 100644 --- a/syntax/aidl.vim +++ b/syntax/aidl.vim @@ -10,18 +10,17 @@ endif " Quit when a syntax file was already loaded. if exists("b:current_syntax") - finish + finish endif -source :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"