Logo
Explore Help
Sign In
realAscot/helix-editor
realAscot/helix-editor
1
0
Fork 0
You've already forked helix-editor
mirror of https://github.com/realAscot/helix.git synced 2025-09-15 04:33:04 +02:00
Code Issues Packages Projects Releases Wiki Activity
helix-editor/runtime/queries/rust/locals.scm

19 lines
237 B
Scheme
Raw Normal View History

syntax: Add go & rust locals, improve tree-sitter error message
2021-09-06 18:13:52 +09:00
; Scopes
Rust queries: add `(function_item)` as a local scope (#3345)
2022-08-06 12:58:06 +02:00
[
(function_item)
(closure_expression)
(block)
] @local.scope
syntax: Add go & rust locals, improve tree-sitter error message
2021-09-06 18:13:52 +09:00
; Definitions
(parameter
(identifier) @local.definition)
Fix locals tracking in Rust closures (#3027) The fix comes from the rewriting of the `closure_parameters` stanza: it was capturing the entire `closure_parameters` node including paretheses, whitespace, and commas. Capturing the identifiers within fixes the tracking. In order to make sure locals definitions from closure parameters don't leak out of the body of the closure, though, we should also mark the closure itself as a locals scope.
2022-07-20 10:51:35 +08:00
(closure_parameters (identifier) @local.definition)
syntax: Add go & rust locals, improve tree-sitter error message
2021-09-06 18:13:52 +09:00
; References
(identifier) @local.reference
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 66ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API