diff --git a/languages/ruby/highlights.scm b/languages/ruby/highlights.scm index 6c3dea9..c2220ec 100644 --- a/languages/ruby/highlights.scm +++ b/languages/ruby/highlights.scm @@ -91,10 +91,10 @@ ; Function definitions (alias - (identifier) @function.method) + (identifier) @function.method.definition) (setter - (identifier) @function.method) + (identifier) @function.method.definition) (method name: [ @@ -153,7 +153,7 @@ (super) @variable.special -(class_variable) @variable.special +(class_variable) @variable.special.class (instance_variable) @variable.special.instance diff --git a/tests/languages/ruby/snapshots/highlights.snap b/tests/languages/ruby/snapshots/highlights.snap index 60bc327..a164be4 100644 --- a/tests/languages/ruby/snapshots/highlights.snap +++ b/tests/languages/ruby/snapshots/highlights.snap @@ -22,7 +22,7 @@ expression: captures line: 6 column: 1 text: "@instance_variable" -- name: variable.special +- name: variable.special.class line: 7 column: 1 text: "@@class_variable" @@ -1826,7 +1826,7 @@ expression: captures line: 147 column: 1 text: alias -- name: function.method +- name: function.method.definition line: 147 column: 7 text: foo @@ -1918,7 +1918,7 @@ expression: captures line: 154 column: 1 text: def -- name: function.method +- name: function.method.definition line: 154 column: 5 text: setter