Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve Ruby grammar to recognize method parameters (#8284)

Ben Hamment7d0c515be9aa
diff --git a/crates/languages/src/ruby/highlights.scm b/crates/languages/src/ruby/highlights.scm
index 14703c4ff28..afbf7ca1779 100644
--- a/crates/languages/src/ruby/highlights.scm
+++ b/crates/languages/src/ruby/highlights.scm
@@ -49,6 +49,11 @@
(setter (identifier) @function.method)
(method name: [(identifier) (constant)] @function.method)
(singleton_method name: [(identifier) (constant)] @function.method)
+(method_parameters [
+ (identifier) @variable.parameter
+ (optional_parameter name: (identifier) @variable.parameter)
+ (keyword_parameter [name: (identifier) (":")] @variable.parameter)
+ ])
; Identifiers