fix: make tree-sitter lookup in .js and .ts files pick up only last preceding comment before code block
This commit is contained in:
parent
3c2271aa17
commit
cb4db878b8
2 changed files with 7 additions and 7 deletions
|
|
@ -1,12 +1,12 @@
|
|||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(class_declaration
|
||||
name: (_) @name
|
||||
) @definition
|
||||
)
|
||||
|
||||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(function_declaration
|
||||
name: (_) @name
|
||||
parameters: (_) @parameters
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
)
|
||||
|
||||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(method_definition
|
||||
name: (_) @name
|
||||
parameters: (_) @parameters
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(class_declaration
|
||||
name: (_) @name
|
||||
) @definition
|
||||
)
|
||||
|
||||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(function_declaration
|
||||
name: (_) @name
|
||||
parameters: (_) @parameters
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
)
|
||||
|
||||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(method_definition
|
||||
name: (_) @name
|
||||
parameters: (_) @parameters
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
)
|
||||
|
||||
(
|
||||
(comment)? @comment
|
||||
(comment)? @comment .
|
||||
(interface_declaration
|
||||
name: (_) @name) @definition
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue