mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 13:44:48 +08:00
None is highlighted as constant value (which it is in python3)
This commit is contained in:
@@ -214,6 +214,7 @@ syn region FunctionParameters start='(' end=')' display contains=
|
|||||||
\ pythonRawString,
|
\ pythonRawString,
|
||||||
\ pythonBytes,
|
\ pythonBytes,
|
||||||
\ pythonBuiltinObj,
|
\ pythonBuiltinObj,
|
||||||
|
\ pythonNone,
|
||||||
\ pythonBuiltinFunc,
|
\ pythonBuiltinFunc,
|
||||||
\ pythonBoolean nextgroup=pythonRaiseFromStatement display contained
|
\ pythonBoolean nextgroup=pythonRaiseFromStatement display contained
|
||||||
syn match OptionalParameters /\i*\ze=/ display contained
|
syn match OptionalParameters /\i*\ze=/ display contained
|
||||||
@@ -430,7 +431,7 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
|
|||||||
"
|
"
|
||||||
|
|
||||||
if s:Enabled("g:python_highlight_builtin_objs")
|
if s:Enabled("g:python_highlight_builtin_objs")
|
||||||
syn keyword pythonBuiltinObj None
|
syn keyword pythonNone None
|
||||||
syn keyword pythonBoolean True False
|
syn keyword pythonBoolean True False
|
||||||
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
||||||
syn match pythonBuiltinObj '\v(\.)@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>' nextgroup=FunctionParameters
|
syn match pythonBuiltinObj '\v(\.)@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>' nextgroup=FunctionParameters
|
||||||
@@ -585,6 +586,7 @@ if version >= 508 || !exists("did_python_syn_inits")
|
|||||||
HiLink pythonBinError Error
|
HiLink pythonBinError Error
|
||||||
|
|
||||||
HiLink pythonBoolean Boolean
|
HiLink pythonBoolean Boolean
|
||||||
|
HiLink pythonNone Constant
|
||||||
|
|
||||||
HiLink pythonBuiltinObj Structure
|
HiLink pythonBuiltinObj Structure
|
||||||
HiLink pythonBuiltinFunc Function
|
HiLink pythonBuiltinFunc Function
|
||||||
|
|||||||
Reference in New Issue
Block a user