summaryrefslogtreecommitdiff
path: root/runtime/queries/r/locals.scm
diff options
context:
space:
mode:
authorMatthew Toohey2022-04-08 00:30:44 +0000
committerGitHub2022-04-08 00:30:44 +0000
commit31c468ab95fe775dc65bef0674ca3c3ec219259f (patch)
tree2a093aa93528966ae8ad999f14a3dfa3b413a593 /runtime/queries/r/locals.scm
parentd37369c1e056e41d405bc95b13efd550c57fa933 (diff)
add languages `r` and `rmarkdown` (#1998)
* add languages `r` and `rmarkdown` * r: fix highlights * rmarkdown: add eof in queries * rmarkdown: update lang-support.md * r: fix highlight query precedence
Diffstat (limited to 'runtime/queries/r/locals.scm')
-rw-r--r--runtime/queries/r/locals.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/queries/r/locals.scm b/runtime/queries/r/locals.scm
new file mode 100644
index 00000000..be6cc637
--- /dev/null
+++ b/runtime/queries/r/locals.scm
@@ -0,0 +1,11 @@
+; locals.scm
+
+(function_definition) @local.scope
+
+(formal_parameters (identifier) @local.definition)
+
+(left_assignment name: (identifier) @local.definition)
+(equals_assignment name: (identifier) @local.definition)
+(right_assignment name: (identifier) @local.definition)
+
+(identifier) @local.reference