mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
feat(dart): add function call expression highlight
This is a work around since currently the upstream grammar does not support a call_expression
This commit is contained in:
parent
bd00e4064f
commit
106eb8e500
1 changed files with 6 additions and 0 deletions
|
|
@ -3,11 +3,17 @@
|
|||
; Methods
|
||||
; --------------------
|
||||
(super) @function
|
||||
|
||||
; TODO: add method/call_expression to grammar and
|
||||
; distinguish method call from variable access
|
||||
(function_expression_body (identifier) @function)
|
||||
; ((identifier)(selector (argument_part)) @function)
|
||||
|
||||
; NOTE: This query is a bit of a work around for the fact that the dart grammar doesn't
|
||||
; specifically identify a node as a function call
|
||||
(((identifier) @function (#match? @function "^_?[a-z]"))
|
||||
. (selector . (argument_part))) @function
|
||||
|
||||
; Annotations
|
||||
; --------------------
|
||||
(annotation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue