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.
This commit is contained in:
Dennis B 2020-09-20 15:48:48 +10:00 committed by Stephan Seitz
parent 0643fa3003
commit 3818cc29d0

View file

@ -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)