Merge the changes done for Python
It adds some new syntax group and new highlight linkages to better handle the python syntax. It closes #2 on Github.
This commit is contained in:
+13
-3
@@ -7,7 +7,17 @@ project adheres to [Semantic Versioning].
|
|||||||
|
|
||||||
### Added
|
### 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
|
+ Some already existing syntax groups have been cleared to provide
|
||||||
highlighting only for important items.
|
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
|
- Add the support for the Java method references by using the `Type` and
|
||||||
`Function` highlight groups.
|
`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.
|
comments, `import` statement blocks and `import static` statement blocks.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@@ -34,7 +44,7 @@ project adheres to [Semantic Versioning].
|
|||||||
```
|
```
|
||||||
|
|
||||||
*Note*: `g:odyssey_java_javadoc` must be different from `0` to enable the
|
*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.
|
- Change the name of some of the Java syntax group added by the plugin.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
"
|
||||||
|
" Maintainer: Ludovic Koenig <ludovic.koenig@gmail.com>
|
||||||
|
" 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
|
||||||
+19
-1
@@ -293,6 +293,24 @@ else
|
|||||||
let g:java_ignore_javadoc = 1
|
let g:java_ignore_javadoc = 1
|
||||||
endif
|
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 {{{
|
" Ruby Highlights {{{
|
||||||
|
|
||||||
@@ -309,6 +327,6 @@ call s:l( 'rubyStringDelimiter', 'Constant')
|
|||||||
call s:l( 'rustLifetime', 'Constant')
|
call s:l( 'rustLifetime', 'Constant')
|
||||||
call s:l( 'rustQuestionMark', 'Operator')
|
call s:l( 'rustQuestionMark', 'Operator')
|
||||||
call s:l('rustOdysseyFunction', 'Function')
|
call s:l('rustOdysseyFunction', 'Function')
|
||||||
call s:l( 'rustOdysseyType', 'Type')
|
call s:l( 'rustOdysseyType', 'Type')
|
||||||
" }}}
|
" }}}
|
||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
|||||||
Reference in New Issue
Block a user