It clears some Rust already existing syntax to better highlight the
important language items.
It then relinks some syntax to use the color scheme in a more efficient
way, and it adds some support for types and functions.
Those are the first for the Rust programming language.
It adds a mechanism that allows to trigger the highlight of the Javadoc.
In order to do so, the user must add the following to its .vimrc file
before declaring the colorscheme:
let g:odyssey_java_javadoc = 1
colorscheme odyssey
It must be noted that if g:odyssey_java_javadoc equals 0, the
highlighting of the Javadoc is not taken into account.
By default, comments should keep their basic highlight with Odyssey.
Therefore, the plugin introduces the variable `g:java_ignore_javadoc`
which prevent the highlight of the Javadoc.
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.
The next syntax group names have been modified as followed:
- javaOdysseyImport -> javaOdysseyGetClass
- javaOdysseyImportMethod -> javaOdysseyGetStaticMethod
- javaOdysseyImportClass -> javaOdysseyGetStaticClass
- javaOdysseyDottedClass -> javaOdysseyDotOperator
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.
It modifies the 'import' statement by fixing some bugs and adding some
new support.
Plus enum values and classes used with the dot operator are also now
highlighted.
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 '.'.
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.
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.
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.
The Type highlight has no more an italic attribute, and the text is now
expected to be normal. In fact, that must words in italic was kind of
annoying.
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.
It corrects some bugs or omissions that occured in the Java syntax.
Plus, it adds some new stuff like the highlight of enum classes when
decalred or the arrow operator '->'.
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.
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.
Methods are colored in green, types in yellows and annotations in
orange. Some italic flavours are also used.
The most difficult thing to achieve was to highlight constantly Java
types or classe names.
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'.
A new function s:l has been introduced in order to use 'highlight link'
instead of just a 'highlight' which redefined a new highlight instead of
using an existing one.
This function is used in some case in order not to redefine an
highlight. Now, Function links to Identifier and StorageClass, Structure
and Typedef all link to Statement.
The highlight group named 'Operator' is colored with the procedure
color.
Plus, the highlight groups named 'StorageClass', 'Structure' and
'Typedef' are colored with the keyword color.
A last minute change before the new release: Types are back to having no
attribute.
In fact, it is expected to set all the attributes in the next release
(0.4.0), so we don't want to go head of ourselves.
The 'Syntax' section is renamed 'Default Syntax'.
Then, if a language or a plugin is supported, its associated section
will be named '<language or plugin> Syntax'.
A script-scoped variable containing all the different attributes has
been initialized.
This variable is a list with the attibutes for the terminals and the
GUIs.
The colors related to the errors, the warnings and the types have been
changed.
- Hue of the red (errors): 10
- Hue of the orange (warnings): 40
- Hue of the yellow (types): 80
The following colors have been modified:
- type: The color of the types is now very yellowish, and its hue is 70.
- keyword: The color of the keywords is now a blue a little bit darker
whose hue is 180. It is great because it is nearer the hue of
the background color.
- constant: The color of the constants is now a dark blue instead of a
yellow-green.
The RGB values of the GUI colors are now taken in input to compute the
value of the Xterm colors by using an approximation.
Now, in order to chose colors for the GUI or the TERM, it is enough to
only provide the HSB triplet.
The function named s:hsv2hex has been separated into two functions named
respectively s:hsv2rgb and s:rgb2hex.
The function that helps now populating the s:color array is named
s:colorize.
The are now two Utility sections:
- Color Utility: Part of the script that helps defining colors.
- Highlight Utility: Part of the script that helps defining highlights.
In some terminals, a color of cursor disappeared when it was on a
parenthese. This modification seems to solve the problem given that the
cursor turns orange and the matching parenthese is underlined in orange.
The variable s:colors is now a dictionary that maps the keys 'gui' and
'term' to their associated value. In one case, it is an hexadecimal
string and, in the other, it is a number between 0 and 255.