rc: nim - fix prefixed triplestring edgecase

This commit is contained in:
SolitudeSF 2018-12-29 09:05:11 +02:00
parent 81cef40171
commit d010b163fa
No known key found for this signature in database
GPG Key ID: 789B06817C385387

View File

@ -13,7 +13,7 @@ hook global BufCreate .*\.nim(s|ble)? %{
add-highlighter shared/nim regions add-highlighter shared/nim regions
add-highlighter shared/nim/code default-region group add-highlighter shared/nim/code default-region group
add-highlighter shared/nim/triple_string region '"""' '"""(?!")' fill string add-highlighter shared/nim/triple_string region '([A-Za-z](_?\w)*)?"""' '"""(?!")' fill string
add-highlighter shared/nim/raw_string region '[A-Za-z](_?\w)*"' '(?<!")"(?!")' fill string add-highlighter shared/nim/raw_string region '[A-Za-z](_?\w)*"' '(?<!")"(?!")' fill string
add-highlighter shared/nim/string region '"' (?<!\\)(\\\\)*" fill string add-highlighter shared/nim/string region '"' (?<!\\)(\\\\)*" fill string
add-highlighter shared/nim/comment region '#?#\[' '\]##?' fill comment add-highlighter shared/nim/comment region '#?#\[' '\]##?' fill comment
@ -65,8 +65,8 @@ def -hidden nim-indent-on-new-line %{
try %{ exec -draft \; K <a-&> } try %{ exec -draft \; K <a-&> }
# cleanup trailing whitespaces from previous line # cleanup trailing whitespaces from previous line
try %{ exec -draft k <a-x> s \h+$ <ret> d } try %{ exec -draft k <a-x> s \h+$ <ret> d }
# indent after line ending with const, let, var, ':' or '=' # indent after line ending with type, import, export, const, let, var, ':' or '='
try %{ exec -draft <space> k x <a-k> (:|=|const|let|var)$ <ret> j <a-gt> } try %{ exec -draft <space> k x <a-k> (:|=|const|let|var|import|export|type)$ <ret> j <a-gt> }
} }
} }