Improve ruby highlighting (#7829)
Release Notes: - Improved syntax-highlighting of identifiers in Ruby. Before:  After: 
This commit is contained in:
parent
7c6b34cb73
commit
ed791c4fc1
1 changed files with 8 additions and 7 deletions
|
@ -30,8 +30,6 @@
|
|||
"yield"
|
||||
] @keyword
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
((identifier) @keyword
|
||||
(#match? @keyword "^(private|protected|public)$"))
|
||||
|
||||
|
@ -54,11 +52,6 @@
|
|||
|
||||
; Identifiers
|
||||
|
||||
[
|
||||
(class_variable)
|
||||
(instance_variable)
|
||||
] @property
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
||||
|
||||
|
@ -73,11 +66,19 @@
|
|||
((constant) @constant
|
||||
(#match? @constant "^[A-Z\\d_]+$"))
|
||||
|
||||
(global_variable) @constant
|
||||
|
||||
(constant) @type
|
||||
|
||||
(self) @variable.special
|
||||
(super) @variable.special
|
||||
|
||||
[
|
||||
(class_variable)
|
||||
(instance_variable)
|
||||
] @variable.member
|
||||
|
||||
|
||||
; Literals
|
||||
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue