diff options
| author | Matt Schick <matt@schickm.com> | 2017-01-05 19:25:34 -0800 |
|---|---|---|
| committer | Matt Schick <matt@schickm.com> | 2017-01-06 07:27:21 -0800 |
| commit | 0d5cb798012012de8b82db8a8ad29d58fd472d85 (patch) | |
| tree | 21399507f923b2e88ec88dbb19658e1e11e96d27 /rc/base/javascript.kak | |
| parent | 7fabda2e45d095757d59efc125086e2e8c079735 (diff) | |
Add support for ES6 template literals to javascript highlighting
Diffstat (limited to 'rc/base/javascript.kak')
| -rw-r--r-- | rc/base/javascript.kak | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rc/base/javascript.kak b/rc/base/javascript.kak index 353e156b..1a084c24 100644 --- a/rc/base/javascript.kak +++ b/rc/base/javascript.kak @@ -11,6 +11,7 @@ hook global BufCreate .*[.](js) %{ addhl -group / regions -default code javascript \ double_string '"' (?<!\\)(\\\\)*" '' \ single_string "'" (?<!\\)(\\\\)*' '' \ + literal "`" (?<!\\)(\\\\)*` '' \ comment // '$' '' \ comment /\* \*/ '' @@ -20,6 +21,8 @@ addhl -group / regions -default code javascript \ addhl -group /javascript/double_string fill string addhl -group /javascript/single_string fill string addhl -group /javascript/comment fill comment +addhl -group /javascript/literal fill string +addhl -group /javascript/literal regex \${.*?} 0:value addhl -group /javascript/code regex \$\w* 0:identifier addhl -group /javascript/code regex \b(document|false|null|parent|self|this|true|undefined|window)\b 0:value |
