mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
feat(locals)!: switch to upstream captures
This commit is contained in:
parent
306367a7f4
commit
8fb218dbfd
95 changed files with 1154 additions and 1154 deletions
|
|
@ -1,9 +1,9 @@
|
|||
; References
|
||||
|
||||
(identifier) @reference
|
||||
((type_identifier) @reference
|
||||
(identifier) @local.reference
|
||||
((type_identifier) @local.reference
|
||||
(#set! reference.kind "type"))
|
||||
((field_identifier) @reference
|
||||
((field_identifier) @local.reference
|
||||
(#set! reference.kind "field"))
|
||||
|
||||
; Scopes
|
||||
|
|
@ -20,49 +20,49 @@
|
|||
(struct_item)
|
||||
(enum_item)
|
||||
(impl_item)
|
||||
] @scope
|
||||
] @local.scope
|
||||
|
||||
(use_declaration
|
||||
argument: (scoped_identifier
|
||||
name: (identifier) @definition.import))
|
||||
name: (identifier) @local.definition.import))
|
||||
|
||||
(use_as_clause
|
||||
alias: (identifier) @definition.import)
|
||||
alias: (identifier) @local.definition.import)
|
||||
|
||||
(use_list
|
||||
(identifier) @definition.import) ; use std::process::{Child, Command, Stdio};
|
||||
(identifier) @local.definition.import) ; use std::process::{Child, Command, Stdio};
|
||||
|
||||
; Functions
|
||||
|
||||
(function_definition
|
||||
(identifier) @definition.function)
|
||||
(identifier) @local.definition.function)
|
||||
|
||||
(function_definition
|
||||
(identifier) @definition.method
|
||||
(identifier) @local.definition.method
|
||||
(parameter (self)))
|
||||
|
||||
; Function with parameters, defines parameters
|
||||
|
||||
(parameter
|
||||
[ (identifier) (self) ] @definition.parameter)
|
||||
[ (identifier) (self) ] @local.definition.parameter)
|
||||
|
||||
; Types
|
||||
|
||||
(struct_item
|
||||
name: (type_identifier) @definition.type)
|
||||
name: (type_identifier) @local.definition.type)
|
||||
|
||||
(constrained_type_parameter
|
||||
left: (type_identifier) @definition.type) ; the P in remove_file<P: AsRef<Path>>(path: P)
|
||||
left: (type_identifier) @local.definition.type) ; the P in remove_file<P: AsRef<Path>>(path: P)
|
||||
|
||||
(enum_item
|
||||
name: (type_identifier) @definition.type)
|
||||
name: (type_identifier) @local.definition.type)
|
||||
|
||||
; Module
|
||||
|
||||
(mod_item
|
||||
name: (identifier) @definition.namespace)
|
||||
name: (identifier) @local.definition.namespace)
|
||||
|
||||
; Variables
|
||||
|
||||
(assignment_expression
|
||||
left: (identifier) @definition.var)
|
||||
left: (identifier) @local.definition.var)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue