Give lua block comments higher match precedence

This commit is contained in:
lePerdu 2018-11-12 15:38:13 -05:00
parent b96ab67479
commit e539347f2a

View File

@ -13,11 +13,11 @@ hook global BufCreate .*[.](lua) %{
add-highlighter shared/lua regions add-highlighter shared/lua regions
add-highlighter shared/lua/code default-region group add-highlighter shared/lua/code default-region group
add-highlighter shared/lua/raw_string region -match-capture '\[(=*)\[' '\](=*)\]' fill string
add-highlighter shared/lua/raw_comment region -match-capture '--\[(=*)\[' '\](=*)\]' fill comment
add-highlighter shared/lua/double_string region '"' (?<!\\)(?:\\\\)*" fill string add-highlighter shared/lua/double_string region '"' (?<!\\)(?:\\\\)*" fill string
add-highlighter shared/lua/single_string region "'" (?<!\\)(?:\\\\)*' fill string add-highlighter shared/lua/single_string region "'" (?<!\\)(?:\\\\)*' fill string
add-highlighter shared/lua/comment region '--' $ fill comment add-highlighter shared/lua/comment region '--' $ fill comment
add-highlighter shared/lua/raw_string region -match-capture '\[(=*)\[' '\](=*)\]' fill string
add-highlighter shared/lua/raw_comment region -match-capture '--\[(=*)\[' '\](=*)\]' fill comment
add-highlighter shared/lua/code/ regex \b(and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b 0:keyword add-highlighter shared/lua/code/ regex \b(and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b 0:keyword