Skip to content

Commit

Permalink
Add highlighting for Ruby method parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
connorshea committed May 26, 2019
1 parent 3515874 commit 4639744
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function colorRuby(x: Parser.SyntaxNode, editor: vscode.TextEditor) {
colors.push([x, 'variable'])
} else if (x.type == 'call' && x.lastChild!.type == 'identifier') {
colors.push([x.lastChild!, 'entity.name.function'])
// Method parameters
} else if (x.type == 'identifier' && x.parent!.type == 'method_parameters') {
colors.push([x, 'variable.parameter'])
} else if (x.type == 'method_call' && x.firstChild!.type == 'identifier') {
colors.push([x.firstChild!, 'entity.name.function'])
} else if (x.type == 'end') {
Expand Down

0 comments on commit 4639744

Please sign in to comment.