Repository: rust-lang/rust-enhanced (language: rust)

Issue:
Function name highlight when there is space between function name and parameters
### Sublime Text Version
Sublime Text 4 (Build 4126)

### Rust Enhanced Version
2.24.0

### Operating system
Arch Linux

### Expected behavior
The function name in a call is highlighted even when there is a space between function name and its parameters.

### Actual behavior
The function name appear in white color.

### Steps to reproduce
1. Type this line: function_name (arg1, arg2, arg2);
2. See the function name color



Discussion / hints:

Fix patch:
diff --git a/RustEnhanced.sublime-syntax b/RustEnhanced.sublime-syntax
index 6b4990a..5d83a8b 100644
--- a/RustEnhanced.sublime-syntax
+++ b/RustEnhanced.sublime-syntax
@@ -214,7 +214,7 @@ contexts:
       scope: punctuation.separator.rust
       push: after-operator
 
-    - match: '\b[[:lower:]_][[:lower:][:digit:]_]*(?=\()'
+    - match: '\b[[:lower:]_][[:lower:][:digit:]_]*\s*(?=\()'
       scope: variable.function.rust
 
     - match: '{{identifier}}'


Test patch:
diff --git a/tests/syntax-rust/syntax_test_expr.rs b/tests/syntax-rust/syntax_test_expr.rs
index a3c5d29..7edb4b2 100644
--- a/tests/syntax-rust/syntax_test_expr.rs
+++ b/tests/syntax-rust/syntax_test_expr.rs
@@ -167,3 +167,22 @@ a <<= b;
 //^^^ keyword.operator.assignment
 a >>= b;
 //^^^ keyword.operator.assignment
+
+fn call_expressions() {
+    call();
+//  ^^^^ variable.function
+//      ^ meta.group punctuation.section.group.begin
+//       ^ meta.group punctuation.section.group.end
+//        ^ punctuation.terminator
+
+    call_with_space ();
+//  ^^^^^^^^^^^^^^^^ meta.function meta.block variable.function
+//                  ^ meta.group punctuation.section.group.begin
+//                   ^ meta.group punctuation.section.group.end
+    self.method();
+//  ^^^^ variable.language
+//      ^ punctuation.accessor.dot
+//       ^^^^^^ variable.function
+//             ^ meta.group punctuation.section.group.begin
+//              ^ meta.group punctuation.section.group.end
+}