Incorporate the changes for the Java syntax

This commit is contained in:
Ludovic Koenig
2019-08-06 22:14:11 +02:00
3 changed files with 30 additions and 11 deletions
+19
View File
@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file. This All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning]. project adheres to [Semantic Versioning].
## [Unreleased]
## Changed
- Change the name of some of the Java syntax group added by the plugin.
+ `javaOdysseyImport` becomes `javaOdysseyGetClass`,
+ `javaOdysseyStaticMethod` becomes `javaOdysseyGetStaticMethod`,
+ `javaOdysseyStaticClass` becomes `javaOdysseyGetStaticClass`,
+ `javaOdysseyDottedClass` becomes `javaOdysseyDotOperator`.
## Fixed
- Fix the Java highlight for nested class names in 'import' statements.
## [0.4.0] - 2019-08-02 ## [0.4.0] - 2019-08-02
### Added ### Added
@@ -143,6 +161,7 @@ project adheres to [Semantic Versioning].
+ Otherwise, a GUI version of Vim must be used. + Otherwise, a GUI version of Vim must be used.
[Unreleased]: https://github.com/ludokng/vim-odyssey/compare/0.4.0...HEAD
[0.4.0]: https://github.com/ludokng/vim-odyssey/compare/0.3.0...0.4.0 [0.4.0]: https://github.com/ludokng/vim-odyssey/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/ludokng/vim-odyssey/compare/0.2.0...0.3.0 [0.3.0]: https://github.com/ludokng/vim-odyssey/compare/0.2.0...0.3.0
[0.2.0]: https://github.com/ludokng/vim-odyssey/compare/0.1.0...0.2.0 [0.2.0]: https://github.com/ludokng/vim-odyssey/compare/0.1.0...0.2.0
+7 -7
View File
@@ -35,15 +35,15 @@ syntax match javaOdysseySeparator "," contained
syntax match javaOdysseyType "\%(\<\u\w*\>\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=\%(\[\]\)\=\)\%(\s*\<\l\w*\>\)\@=" containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator syntax match javaOdysseyType "\%(\<\u\w*\>\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=\%(\[\]\)\=\)\%(\s*\<\l\w*\>\)\@=" containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator
syntax match javaOdysseyConstructor "\%(\<\u\w*\>\)\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=\%((\|\[\)"me=e-1 containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseySeparator syntax match javaOdysseyConstructor "\%(\<\u\w*\>\)\%(<\%(\u\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 javaOdysseyMethod "\<\l\w*\>("me=e-1 containedin=javaParenT,javaParenT1,javaParenT2
syntax match javaOdysseyCasting "(\<\u\w*\>\%(<\%(\u\w*\|,\|\s\|<\|>\)\+>\)\=\%(\[\]\)\=)"hs=s+1,he=e-1 containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator syntax match javaOdysseyDotOperator "\<\u\w*\>\."me=e-1 containedin=javaParenT,javaParenT1,javaParenT2
syntax match javaOdysseyImport "\%(\<import\>\s\+\%(\l\+\.\)\+\)\@<=\%(\u\w*\)\%(\s*;\)\@="
syntax match javaOdysseyStaticMethod "\%(\<import\>\s\+\<static\>\s\+\%(\w\+\.\)\+\)\@<=\%(\l\w*\)\%(\s*;\)\@="
syntax match javaOdysseyStaticClass "\%(\<import\>\s\+\<static\>\s\+\%(\w\+\.\)\+\)\@<=\%(\u\w*\)\%(\s*;\)\@="
syntax match javaOdysseyExtends "\%(\<extends\>\s\+\)\@<=\%(\<\u\w*\>\)\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=" contains=javaOdysseyGeneric,javaOdysseySeparator
syntax match javaOdysseyImplements "\%(\<implements\>\s\+\)\@<=\%(\<\u\w*\>\)\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=" contains=javaOdysseyGeneric,javaOdysseySeparator
syntax match javaOdysseyDottedClass "\<\u\w*\>\."me=e-1 containedin=javaParenT,javaParenT1,javaParenT2
syntax match javaOdysseyEnumValue "\<[A-Z][_A-Z0-9]\+\>" containedin=javaParenT,javaParenT1,javaParenT2,javaLabelRegion syntax match javaOdysseyEnumValue "\<[A-Z][_A-Z0-9]\+\>" containedin=javaParenT,javaParenT1,javaParenT2,javaLabelRegion
syntax match javaOdysseyEnumConstructor "\<[A-Z][_A-Z0-9]\+\>("me=e-1 containedin=javaParenT,javaParenT1,javaParenT2 syntax match javaOdysseyEnumConstructor "\<[A-Z][_A-Z0-9]\+\>("me=e-1 containedin=javaParenT,javaParenT1,javaParenT2
syntax match javaOdysseyCasting "(\<\u\w*\>\%(<\%(\u\w*\|,\|\s\|<\|>\)\+>\)\=\%(\[\]\)\=)"hs=s+1,he=e-1 containedin=javaParenT,javaParenT1,javaParenT2 contains=javaOdysseyGeneric,javaOdysseyArray,javaOdysseySeparator
syntax match javaOdysseyGetClass "\%(\<import\>\s\+\%(\w\+\.\)\+\)\@<=\%(\u\w*\)\%(\s*;\)\@="
syntax match javaOdysseyGetStaticMethod "\%(\<import\>\s\+\<static\>\s\+\%(\w\+\.\)\+\)\@<=\%(\l\w*\)\%(\s*;\)\@="
syntax match javaOdysseyGetStaticClass "\%(\<import\>\s\+\<static\>\s\+\%(\w\+\.\)\+\)\@<=\%(\u\w*\)\%(\s*;\)\@="
syntax match javaOdysseyExtends "\%(\<extends\>\s\+\)\@<=\%(\<\u\w*\>\)\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=" contains=javaOdysseyGeneric,javaOdysseySeparator
syntax match javaOdysseyImplements "\%(\<implements\>\s\+\)\@<=\%(\<\u\w*\>\)\%(<\%(\u\w*\|,\|\s\|<\|>\)*>\)\=" contains=javaOdysseyGeneric,javaOdysseySeparator
" }}} " }}}
" vim: foldmethod=marker " vim: foldmethod=marker
+4 -4
View File
@@ -263,13 +263,13 @@ call s:h( 'javaAnnotation', 'background', 'warning', 'italic')
call s:l( 'javaExternal', 'Statement') call s:l( 'javaExternal', 'Statement')
call s:l( 'javaTypeDef', 'javaOdysseyThis') call s:l( 'javaTypeDef', 'javaOdysseyThis')
call s:l( 'javaOdysseyClass', 'Type') call s:l( 'javaOdysseyClass', 'Type')
call s:l( 'javaOdysseyDottedClass', 'Type') call s:l( 'javaOdysseyDotOperator', 'Type')
call s:l( 'javaOdysseyInterface', 'Type') call s:l( 'javaOdysseyInterface', 'Type')
call s:l( 'javaOdysseyEnum', 'Type') call s:l( 'javaOdysseyEnum', 'Type')
call s:l( 'javaOdysseyCasting', 'Type') call s:l( 'javaOdysseyCasting', 'Type')
call s:l( 'javaOdysseyImport', 'Type') call s:l( 'javaOdysseyGetClass', 'Type')
call s:l( 'javaOdysseyStaticMethod', 'Function') call s:l('javaOdysseyGetStaticMethod', 'Function')
call s:l( 'javaOdysseyStaticClass', 'Type') call s:l( 'javaOdysseyGetStaticClass', 'Type')
call s:l( 'javaOdysseyExtends', 'Type') call s:l( 'javaOdysseyExtends', 'Type')
call s:l( 'javaOdysseyImplements', 'Type') call s:l( 'javaOdysseyImplements', 'Type')
call s:l( 'javaOdysseyArray', 'Normal') call s:l( 'javaOdysseyArray', 'Normal')