From a29058fe8b4ba291a63422073e5bd3d8920942ac Mon Sep 17 00:00:00 2001 From: Karl Hiner Date: Fri, 23 Feb 2024 01:41:28 -0500 Subject: [PATCH] feat(faust): better highlighting of function calls, built-in variables, and member access --- lockfile.json | 2 +- queries/faust/highlights.scm | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lockfile.json b/lockfile.json index 5a2d278b5..a16ecc14f 100644 --- a/lockfile.json +++ b/lockfile.json @@ -159,7 +159,7 @@ "revision": "a52579670e2b14ec03d410c3c980fafaf6d659c4" }, "faust": { - "revision": "4a8ada6eb1ac2ade8f310e3822b86301f439e463" + "revision": "f3b9274514b5f9bf6b0dd4a01c30f9cc15c58bc4" }, "fennel": { "revision": "9265a7d635d2f82a10738b9ad65ba8dd8bd4a84a" diff --git a/queries/faust/highlights.scm b/queries/faust/highlights.scm index 012562971..df2c3e70a 100644 --- a/queries/faust/highlights.scm +++ b/queries/faust/highlights.scm @@ -1,11 +1,17 @@ ; Identifiers (identifier) @variable -(process) @variable.builtin +[ + "process" + "effect" +] @variable.builtin (parameters (identifier)) @variable.parameter +(access + definition: (identifier) @variable.member) + (global_metadata key: (identifier) @variable.member) @@ -49,16 +55,12 @@ (function_names) @function -[ - (lambda) - (prefix) - (prim1) - (prim2) - (prim3) - (prim4) - (prim5) - (function_call) -] @function.call +(function_call + (identifier) @function.call) + +(function_call + (access + definition: (identifier) @function.call)) [ "exp"