diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index edd116332..756363f70 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -11,7 +11,7 @@ hook global BufCreate .*(([.](rb))|(irbrc)|(pryrc)|(Capfile|[.]cap)|(Gemfile)|(G # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -add-highlighter shared/ regions -default code ruby \ +add-highlighter shared/ regions -default code -match-capture ruby \ double_string '"' (? < \ + heredoc '<<-?(\w+)' '^\h*(\w+)$' '' \ division '[\w\)\]](/|(\h+/\h+))' '\w' '' # 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) @@ -32,6 +33,7 @@ add-highlighter shared/ruby/double_string regions regions interpolation \Q#{ \} add-highlighter shared/ruby/double_string/regions/interpolation fill meta add-highlighter shared/ruby/single_string fill string +add-highlighter shared/ruby/heredoc fill string add-highlighter shared/ruby/backtick fill meta add-highlighter shared/ruby/backtick regions regions interpolation \Q#{ \} \{