From 3818cc29d05d26be1aa1badd22ea1545315c5310 Mon Sep 17 00:00:00 2001 From: Dennis B Date: Sun, 20 Sep 2020 15:48:48 +1000 Subject: Highlight top-level 'require' as TSInclude (fix #463) Same for 'require_relative' & 'load' code importation mechanisms. Note, method calls of 'require' (as in Rails strong-params) will be still be highlighted as Method/Function. --- queries/ruby/highlights.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'queries/ruby') diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index a1f1913b5..0dea8e8bb 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -49,9 +49,6 @@ ; Function calls -((identifier) @include - (#vim-match? @include "^(require|require_relative|load)$")) - "defined?" @function (call @@ -72,6 +69,11 @@ ] @function ]) +(program + (method_call + (identifier) @include) + (#vim-match? @include "^(require|require_relative|load)$")) + ; Function definitions (alias (identifier) @function) -- cgit v1.2.3-70-g09d2