mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-02 02:17:44 +03:00
Rust symbol queries (#12859)
This commit is contained in:
parent
c3a8bcf95f
commit
378bb8c876
2 changed files with 34 additions and 1 deletions
|
@ -182,7 +182,7 @@
|
|||
| ron | ✓ | | ✓ | | |
|
||||
| rst | ✓ | | | | |
|
||||
| ruby | ✓ | ✓ | ✓ | | `solargraph` |
|
||||
| rust | ✓ | ✓ | ✓ | | `rust-analyzer` |
|
||||
| rust | ✓ | ✓ | ✓ | ✓ | `rust-analyzer` |
|
||||
| sage | ✓ | ✓ | | | |
|
||||
| scala | ✓ | ✓ | ✓ | | `metals` |
|
||||
| scheme | ✓ | | ✓ | | |
|
||||
|
|
33
runtime/queries/rust/symbols.scm
Normal file
33
runtime/queries/rust/symbols.scm
Normal file
|
@ -0,0 +1,33 @@
|
|||
(struct_item
|
||||
name: (type_identifier) @definition.struct
|
||||
body: (field_declaration_list))
|
||||
|
||||
(const_item
|
||||
name: (identifier) @definition.constant)
|
||||
|
||||
(trait_item
|
||||
name: (type_identifier) @definition.interface
|
||||
body: (declaration_list))
|
||||
|
||||
(function_item
|
||||
name: (identifier) @definition.function
|
||||
parameters: (parameters)
|
||||
body: (block))
|
||||
|
||||
(function_signature_item
|
||||
name: (identifier) @definition.function
|
||||
parameters: (parameters))
|
||||
|
||||
(enum_item
|
||||
name: (type_identifier) @definition.type
|
||||
body: (enum_variant_list))
|
||||
|
||||
(enum_variant
|
||||
name: (identifier) @definition.struct)
|
||||
|
||||
(mod_item
|
||||
name: (identifier) @definition.module
|
||||
body: (declaration_list))
|
||||
|
||||
(macro_definition
|
||||
macro: (identifier) @definition.macro)
|
Loading…
Add table
Add a link
Reference in a new issue