mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
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:
parent
0643fa3003
commit
3818cc29d0
1 changed files with 5 additions and 3 deletions
|
|
@ -49,9 +49,6 @@
|
||||||
|
|
||||||
; Function calls
|
; Function calls
|
||||||
|
|
||||||
((identifier) @include
|
|
||||||
(#vim-match? @include "^(require|require_relative|load)$"))
|
|
||||||
|
|
||||||
"defined?" @function
|
"defined?" @function
|
||||||
|
|
||||||
(call
|
(call
|
||||||
|
|
@ -72,6 +69,11 @@
|
||||||
] @function
|
] @function
|
||||||
])
|
])
|
||||||
|
|
||||||
|
(program
|
||||||
|
(method_call
|
||||||
|
(identifier) @include)
|
||||||
|
(#vim-match? @include "^(require|require_relative|load)$"))
|
||||||
|
|
||||||
; Function definitions
|
; Function definitions
|
||||||
|
|
||||||
(alias (identifier) @function)
|
(alias (identifier) @function)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue