diff options
| author | SolitudeSF <solitudesf@protonmail.com> | 2018-12-27 21:34:07 +0200 |
|---|---|---|
| committer | SolitudeSF <solitudesf@protonmail.com> | 2018-12-27 21:34:33 +0200 |
| commit | a4e65d4706a665feff785b2118b4f7cc7e71748e (patch) | |
| tree | d75e310e754a06ffb1266f9102b5818cc1703118 | |
| parent | 2323d9d8ac1ef6289a5f87e1192bf936a4785bb9 (diff) | |
rc: add missing builtin types, fix displaying of triple string literals, float literals, character literals, type suffixes, enable raw string literals in nim
| -rw-r--r-- | rc/extra/nim.kak | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rc/extra/nim.kak b/rc/extra/nim.kak index 8ca36733..c02ae882 100644 --- a/rc/extra/nim.kak +++ b/rc/extra/nim.kak @@ -13,14 +13,15 @@ hook global BufCreate .*\.nim(s|ble)? %{ add-highlighter shared/nim regions add-highlighter shared/nim/code default-region group -add-highlighter shared/nim/single_string region "'" (?<!\\)(\\\\)*' fill string -add-highlighter shared/nim/double_string region '"' (?<!\\)(\\\\)*" fill string -add-highlighter shared/nim/triple_string region '"""' '"""' fill string +add-highlighter shared/nim/triple_string region '"""' '"""(?!")' 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/comment region '#?#\[' '\]##?' fill comment -add-highlighter shared/nim/code/ regex \b(0[xXocCbB])?[\d_]+('[iIuUfFdD](8|16|32|64|128))?\b 0:value -add-highlighter shared/nim/code/ regex \b\d+\.\d+\b 0:value -add-highlighter shared/nim/code/ regex %{'[^'\n]'} 0:string +add-highlighter shared/nim/code/ regex [=+-/<>@$~&%|!?^.:\\*]+ 0:operator +add-highlighter shared/nim/code/ regex \b(0[xXocCbB])?[\d_]+('[iIuU](8|16|32|64)|'d|'f(32|64|128)?)?\b 0:value +add-highlighter shared/nim/code/ regex \b\d[\d_]*\.\d[\d_]*([eE]\d[\d_]*)?('d|'f(32|64|128))?\b 0:value +add-highlighter shared/nim/code/ regex %{'(\\([rcnlftvabe\\"']|\d+|x[0-9a-fA-F]{2})|[^'\n])'} 0:string evaluate-commands %sh{ # Grammar @@ -34,7 +35,7 @@ evaluate-commands %sh{ keywords="${keywords}|with|without|xor|yield" types="int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float" types="${types}|float32|float64|bool|char|object|seq|array|cstring|string" - types="${types}|tuple|varargs" + types="${types}|tuple|varargs|typedesc|pointer|byte|set" values="false|true" # Add the language's grammar to the static completion list |
