Incorporate the changes for Java

This commit is contained in:
Ludovic Koenig
2019-04-02 22:12:33 +02:00
3 changed files with 49 additions and 1 deletions
+8 -1
View File
@@ -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
+25
View File
@@ -0,0 +1,25 @@
" _ ____
" (_)____ _ _ __ ____ _ / __/____ _____
" / // __ `/| | / // __ `/ / /_ / __ \ / ___/
" / // /_/ / | |/ // /_/ / / __// /_/ // /
" __/ / \__,_/ |___/ \__,_/ /_/ \____//_/
" /___/ __
" ____ ____/ /__ __ _____ _____ ___ __ __
" / __ \ / __ // / / // ___// ___// _ \ / / / /
" / /_/ // /_/ // /_/ /(__ )(__ )/ __// /_/ /
" \____/ \__,_/ \__, //____//____/ \___/ \__, /
" /____/ /____/
"
" Java Syntax {{{
syntax keyword javaOdysseyThis this
syntax match javaOdysseyClass "\%(\<class\>\s\+\)\@<=\<\u\w*\>"
syntax match javaOdysseyInterface "\%(\<interface\>\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
+16
View File
@@ -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 {{{