Improve highlighting of Kakrc string regions
Unfortunately Strings that start with a quoted quote (like '''str') are still incorrectly highlighted, a deeper refactoring of the regions highlighter will be necessary.
This commit is contained in:
parent
759a253923
commit
7abf04babd
|
@ -13,8 +13,8 @@ hook global BufCreate (.*/)?(kakrc|.*.kak) %{
|
||||||
|
|
||||||
add-highlighter shared/ regions -default code kakrc \
|
add-highlighter shared/ regions -default code kakrc \
|
||||||
comment (^|\h)\K# $ '' \
|
comment (^|\h)\K# $ '' \
|
||||||
double_string %{(^|\h)\K"} %{(?<!")("")*"(?!")} '' \
|
double_string %{(^|\h)\K"} %{"(?!")} %{(?<!")("")+(?!")} \
|
||||||
single_string %{(^|\h)\K'} %{(?<!')('')*'(?!")} '' \
|
single_string %{(^|\h)\K'} %{'(?!')} %{(?<!')('')+(?!')} \
|
||||||
shell '(^|\h)\K%?%sh\{' '\}' '\{' \
|
shell '(^|\h)\K%?%sh\{' '\}' '\{' \
|
||||||
shell '(^|\h)\K%?%sh\(' '\)' '\(' \
|
shell '(^|\h)\K%?%sh\(' '\)' '\(' \
|
||||||
shell '(^|\h)\K%?%sh\[' '\]' '\[' \
|
shell '(^|\h)\K%?%sh\[' '\]' '\[' \
|
||||||
|
|
|
@ -1709,7 +1709,7 @@ struct RegionMatches
|
||||||
return end_it;
|
return end_it;
|
||||||
|
|
||||||
while (rec_it != recurse_matches.end() and
|
while (rec_it != recurse_matches.end() and
|
||||||
rec_it->end_coord() <= end_it->begin_coord())
|
rec_it->end_coord() <= end_it->end_coord())
|
||||||
{
|
{
|
||||||
if (not capture or rec_it->capture == *capture)
|
if (not capture or rec_it->capture == *capture)
|
||||||
++recurse_level;
|
++recurse_level;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user