summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Thrasher <jimmy@jimmythrasher.com>2018-11-21 16:44:41 -0500
committerJimmy Thrasher <jimmy@jimmythrasher.com>2018-11-21 16:45:07 -0500
commit576f7b13b9bf98ffc85192eef39dfbc19c0a9c02 (patch)
tree5bc69911b44e4bdd56f057697e42ecf2dba91210
parent3ed7ec21bd4fb072cb9df327fea163c81adf33fb (diff)
Don't highlight Ruby eigenclass definitions as here docs
E.g. for the following code snippet, the code was highlighted as a string ```ruby class Bob class <<self def hello end end end ```
-rw-r--r--rc/base/ruby.kak2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak
index f8dafe6b..6c9c653a 100644
--- a/rc/base/ruby.kak
+++ b/rc/base/ruby.kak
@@ -23,7 +23,7 @@ add-highlighter shared/ruby/ region -recurse \( '%[iqrswxIQRSWX]\('
add-highlighter shared/ruby/ region -recurse \{ '%[iqrswxIQRSWX]\{' \} fill meta
add-highlighter shared/ruby/ region -recurse \[ '%[iqrswxIQRSWX]\[' \] fill meta
add-highlighter shared/ruby/ region -recurse < '%[iqrswxIQRSWX]<' > fill meta
-add-highlighter shared/ruby/heredoc region '<<[-~]?(\w+)' '^\h*(\w+)$' fill string
+add-highlighter shared/ruby/heredoc region '<<[-~]?(?!self)(\w+)' '^\h*(\w+)$' fill string
add-highlighter shared/ruby/division region '[\w\)\]](/|(\h+/\h+))' '\w' group # Help Kakoune to better detect /…/ literals
# Regular expression flags are: i → ignore case, m → multi-lines, o → only interpolate #{} blocks once, x → extended mode (ignore white spaces)