mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 12:30:01 -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
|
||||
|
||||
((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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue