diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dacd71..e393aee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,17 @@ project adheres to [Semantic Versioning]. ### Added -- Adds some supports for the Rust programming language: +- Add some supports for the Python programming language. The use of highlights + for builtin elements have been disabled by the instruction: + + ``` + let g:python_no_builtin_highlight = 1 + ``` + + Plus, The `print` function is considered to be a function and not a + statement. It means that there is no support for Python 2 `print` statement. + +- Add some supports for the Rust programming language: + Some already existing syntax groups have been cleared to provide highlighting only for important items. @@ -20,7 +30,7 @@ project adheres to [Semantic Versioning]. - Add the support for the Java method references by using the `Type` and `Function` highlight groups. -- Adds three Java syntax groups in order to be able to fold multiline +- Add three Java syntax groups in order to be able to fold multiline comments, `import` statement blocks and `import static` statement blocks. ### Changed @@ -34,7 +44,7 @@ project adheres to [Semantic Versioning]. ``` *Note*: `g:odyssey_java_javadoc` must be different from `0` to enable the - highlighting of the Javadoc. + highlighting of the Javadoc. - Change the name of some of the Java syntax group added by the plugin. diff --git a/after/syntax/python.vim b/after/syntax/python.vim new file mode 100644 index 0000000..3b08bf0 --- /dev/null +++ b/after/syntax/python.vim @@ -0,0 +1,21 @@ +" +" Maintainer: Ludovic Koenig +" Version: 0.5.0 +" Since: 0.5.0 +" License: MIT +" +" Python Syntax {{{ + +syntax keyword pythonOdysseyNone None +syntax keyword pythonOdysseyBoolean True False +syntax keyword pythonOdysseyBuiltin int float bool str bytes +syntax keyword pythonOdysseySelf self +syntax keyword pythonOdysseyPrint print +syntax match pythonOdysseyArrow '->' +syntax match pythonOdysseyFunction '\<\l\w*\>('me=e-1 +syntax match pythonOdysseyType '\<\u\w*\>' +syntax keyword pythonStatement class nextgroup=pythonOdysseyClass skipwhite +syntax match pythonOdysseyClass "\<\u\w*\>" + +" }}} +" vim: foldmethod=marker diff --git a/colors/odyssey.vim b/colors/odyssey.vim index a0b0c91..99971c1 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -293,6 +293,24 @@ else let g:java_ignore_javadoc = 1 endif +" }}} +" Python Highlights {{{ + +call s:h( 'pythonDecorator', 'background', 'warning', 'italic') +call s:h( 'pythonDecoratorName', 'background', 'warning', 'italic') +call s:l( 'pythonOdysseyNone', 'Constant') +call s:l( 'pythonOdysseyBoolean', 'Constant') +call s:l( 'pythonOdysseyBuiltin', 'Type') +call s:l( 'pythonOdysseyPrint', 'Function') +call s:l( 'pythonOdysseyArrow', 'Keyword') +call s:l( 'pythonInclude', 'Statement') +call s:l('pythonOdysseyFunction', 'Function') +call s:l( 'pythonOdysseySelf', 'Special') +call s:l( 'pythonOdysseyType', 'Type') +call s:l( 'pythonOdysseyClass', 'Type') + +let g:python_no_builtin_highlight = 1 + " }}} " Ruby Highlights {{{ @@ -309,6 +327,6 @@ call s:l( 'rubyStringDelimiter', 'Constant') call s:l( 'rustLifetime', 'Constant') call s:l( 'rustQuestionMark', 'Operator') call s:l('rustOdysseyFunction', 'Function') -call s:l( 'rustOdysseyType', 'Type') +call s:l( 'rustOdysseyType', 'Type') " }}} " vim: foldmethod=marker