diff --git a/CHANGELOG.md b/CHANGELOG.md index 460f3d6..85d0449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,15 @@ project adheres to [Semantic Versioning]. ### Added +- Supports for the Java programming language have been added. The highlights + are achieved by reusing some existing pieces of syntax and by creating new + ones. Existing syntax groups have been remapped to other default syntax + groups and some new ones have been created for the occassion. + - Supports for the Ruby programming language have been added. Some highlights - of the existing syntax have been modified to better fit the color scheme. + of the existing syntax have been modified to better fit the color scheme. In + other words, some existing Ruby syntax groups have been linked to other + default syntax groups. ### Changed diff --git a/after/syntax/java.vim b/after/syntax/java.vim new file mode 100644 index 0000000..d8c46bc --- /dev/null +++ b/after/syntax/java.vim @@ -0,0 +1,25 @@ +" _ ____ +" (_)____ _ _ __ ____ _ / __/____ _____ +" / // __ `/| | / // __ `/ / /_ / __ \ / ___/ +" / // /_/ / | |/ // /_/ / / __// /_/ // / +" __/ / \__,_/ |___/ \__,_/ /_/ \____//_/ +" /___/ __ +" ____ ____/ /__ __ _____ _____ ___ __ __ +" / __ \ / __ // / / // ___// ___// _ \ / / / / +" / /_/ // /_/ // /_/ /(__ )(__ )/ __// /_/ / +" \____/ \__,_/ \__, //____//____/ \___/ \__, / +" /____/ /____/ +" +" Java Syntax {{{ +syntax keyword javaOdysseyThis this +syntax match javaOdysseyClass "\%(\\s\+\)\@<=\<\u\w*\>" +syntax match javaOdysseyInterface "\%(\\s\+\)\@<=\<\u\w*\>" +syntax match javaOdysseyArray "\[\]" contained +syntax match javaOdysseyGeneric "[><]" contained +syntax match javaOdysseySeparator "," contained +syntax match javaOdysseyType "\%(\<\u\w*\>\%(<\%(\w\|,\|\s\|<\|>\)\+>\)\=\%(\[\]\)\=\)\%(\s*\<\l\w*\>\)\@=" containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator +syntax match javaOdysseyConstructor "\%(\<\u\w*\>\)\%(<\%(\w\|,\|\s\|<\|>\)\+>\)\=\%((\|\[\)"me=e-1 containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseySeparator +syntax match javaOdysseyMethod "\<\l\w*\>("me=e-1 containedin=javaParenT,javaParenT1,javaParenT2 +syntax match javaOdysseyCasting "(\<\u\w*\>\%(<\%(\w\|,\|\s\|<\|>\)\+>\)\=\%(\[\]\)\=)"hs=s+1,he=e-1 containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator +" }}} +" vim: foldmethod=marker diff --git a/colors/odyssey.vim b/colors/odyssey.vim index 0e6c00e..44747fb 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -255,6 +255,22 @@ call s:h( 'Ignore', 'background', 'background', 'none') call s:h( 'Error', 'background', 'error', 'bold') call s:h( 'Todo', 'background', 'warning', 'bold') +" }}} +" Java Highlights {{{ + +call s:h( 'javaAnnotation', 'background', 'warning', 'italic') +call s:l( 'javaExternal', 'Statement') +call s:l( 'javaTypeDef', 'javaOdysseyThis') +call s:l( 'javaOdysseyClass', 'Type') +call s:l( 'javaOdysseyInterface', 'Type') +call s:l( 'javaOdysseyCasting', 'Type') +call s:l( 'javaOdysseyArray', 'Normal') +call s:l( 'javaOdysseyGeneric', 'Normal') +call s:l( 'javaOdysseyType', 'Type') +call s:l('javaOdysseyConstructor', 'Type') +call s:l( 'javaOdysseyMethod', 'Function') +call s:l( 'javaOdysseyThis', 'Special') + " }}} " Ruby Highlights {{{