1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 10:32:19 +03:00

Merge remote-tracking branch 'danr/pyhl'

This commit is contained in:
Maxime Coste 2018-01-08 09:45:02 +11:00
commit c308cddcd8

View File

@ -12,8 +12,8 @@ hook global BufCreate .*[.](py) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/ regions -default code python \
double_string '"""' '"""' '' \
single_string "'''" "'''" '' \
docstring '"""' '"""' '' \
docstring "'''" "'''" '' \
double_string '"' (?<!\\)(\\\\)*" '' \
single_string "'" (?<!\\)(\\\\)*' '' \
comment '#' '$' ''
@ -32,6 +32,13 @@ add-highlighter shared/python/code regex '\b\d+\+\d+[jJ]\b' 0:value
add-highlighter shared/python/double_string fill string
add-highlighter shared/python/single_string fill string
add-highlighter shared/python/docstring/ regions -default docstring py-docstring \
python '>>> \K' '\z' '' \
python '\.\.\. \K' '\z' ''
add-highlighter shared/python/docstring/py-docstring/python ref python
add-highlighter shared/python/docstring/py-docstring/docstring fill string
add-highlighter shared/python/comment fill comment
%sh{
@ -113,6 +120,9 @@ add-highlighter shared/python/comment fill comment
"
}
add-highlighter shared/python/code regex (?<=[\w\s\d'"_])(<=|<<|>>|>=|<>|<|>|!=|==|\||\^|&|\+|-|\*\*|\*|//|/|%|~) 0:operator
add-highlighter shared/python/code regex (?<=[\w\s\d'"_])((?<![=<>!])=(?![=])|[+*-]=) 0:builtin
# Commands
# ‾‾‾‾‾‾‾‾