Commit Graph
20 Commits
Author SHA1 Message Date
Ludovic Koenig 2b1cbdeb0f Add javaOdysseyLombok to the javaTop cluster
This modification should fix the highlight of the `val` keyword within
lambdas bodies.
2019-09-10 21:56:00 +02:00
Ludovic Koenig fae680df6c Add the syntax groups for Java method references 2019-09-07 15:34:43 +02:00
Ludovic Koenig 42567fef60 Add some Java syntax group for folding
It adds three Java syntax group in order to have more folding
capabilities:

- javaOdysseyComment: It allows to fold any multiline Java comments.

- javaOdysseyImport: It allows to fold any 'import' statement block.

- javaOdysseyImportStatic: It allows to fold any 'import static'
                           statement block.
2019-08-09 06:18:42 +02:00
Ludovic Koenig cf387ad4ef Modify some Java syntax group names
The next syntax group names have been modified as followed:

- javaOdysseyImport       -> javaOdysseyGetClass

- javaOdysseyImportMethod -> javaOdysseyGetStaticMethod

- javaOdysseyImportClass  -> javaOdysseyGetStaticClass

- javaOdysseyDottedClass  -> javaOdysseyDotOperator
2019-08-06 22:02:21 +02:00
Ludovic Koenig 0ee7534410 Fix the highlight of import for nested classes
It fixes the highlight of the 'import' statement for nested classes.

In order to do so, it declares the 'javaOdysseyDottedClass' before the
'javaOdysseyImport' syntax group. It follows that all outer classes are
considered as being part of the 'javaOdysseyDottedClass' syntax group.

It fixes #1 on GitHub.
2019-08-06 21:48:39 +02:00
Ludovic Koenig ea44266bf7 Update the headers of the scripts
It reintroduces the release number, plus it adds a 'since' release
number.

It also provides some explanations about the 'after/syntax/java.vim'
file.
2019-08-02 23:26:12 +02:00
Ludovic Koenig 281a5ce07c Fix the header of the Java syntax file 2019-08-02 07:45:27 +02:00
Ludovic Koenig f3a0932228 Add some more supports for the Java import syntax
Static imports are now highlight in green for functions and in yellow
for the nested static classes.

A minor bug has been fixed, because '.' was used instead of '\.' in the
regexes. Given that the 'magic' option is set by default, it matched
always any character instead of '.'.
2019-08-02 07:28:59 +02:00
Ludovic Koenig ad2a4ea635 Add the highlight for java classes in expressions
When a class name is used in an expression to access some kind of static
content, this class name is now highlighted. In other words, in
'System.out.println("")', 'System' must now be colored.
2019-08-02 07:00:54 +02:00
Ludovic Koenig 979e700cf9 Add suports for Java Enum values and constructors
Enum values that are often/always written in uppercase are now handled
and considered as constants. They are highlighted within the Enum
declaration and outside of it in case statements or through the use of
the dot operator on an enum.
2019-08-01 22:26:04 +02:00
Ludovic Koenig d88fbd2116 Add some syntax suport for Lombok
The syntax sugar 'val' and 'var' are now part of the 'Statement'
highlight group.

'var' may already be handled by default in vim 8.1 but anyway.
2019-08-01 20:33:35 +02:00
Ludovic Koenig fb260e6a3e Correct the matching ';' at the end of imports
At the end of each import statement, the class must be highlighted with
the Type highlight color. However, up to now, the semicolon was also
highlighted.

It has been fixed by removing the semicolon from the match thanks to the
'\@=' expression.
2019-08-01 20:14:54 +02:00
Ludovic Koenig 0fd7c51522 Add syntax for Java extends & implements keywords
The names that followed the 'extends' and 'implements' keywords were not
properly colored. Two new syntax have been added to deal with that case.

Note: Only one could have done the job.
2019-05-05 12:17:46 +02:00
Ludovic Koenig 6f568a81f9 Add the highlight of the arrow operator
The arrow operator '->' is now highlighted as an operator like 'new',
etc...
2019-04-30 23:18:22 +02:00
Ludovic Koenig 8746d7c7a7 Add the highlight of the classes in an 'import'
It highlights the name of the classes that are imported by an 'import'
statement.
2019-04-30 22:48:09 +02:00
Ludovic Koenig f6ed184a36 Add the highlight and syntax for the enums
It highlights the name of an enum the same way it highlights the one of
a class.
2019-04-30 22:38:43 +02:00
Ludovic Koenig 4e8c85fae3 Fix some highlight overflows
In some case, the highlight of some generic types was overflowing:

  public void method(List<String> strings, List<Integer> integers) {}
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                       overflow of the first parameter

It corrects this behavior by restraining the type highlight before the
parameter name.
2019-04-30 22:19:36 +02:00
Ludovic Koenig 34fbaa5792 Take into account the Java diamond operator
Up to now the following text 'new ArrayList<>()' was not highlighted
correctly. The modification that has been done highlights it like a
normal type name.
2019-04-30 22:09:52 +02:00
Ludovic Koenig ac5afba7bf Modify the header of java.vim
It just tries to make it more symetric.
2019-04-02 22:29:58 +02:00
Ludovic Koenig 813a42c895 Add the syntax for Java
The Java syntax is located under the ./after/syntax repository.

The syntax provides mainly rules for methods, types and annotations. All
syntax rules have the prefix 'javaOdyssey'.
2019-04-02 21:58:17 +02:00