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"
|
"yield"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(identifier) @variable
|
|
||||||
|
|
||||||
((identifier) @keyword
|
((identifier) @keyword
|
||||||
(#match? @keyword "^(private|protected|public)$"))
|
(#match? @keyword "^(private|protected|public)$"))
|
||||||
|
|
||||||
|
@ -54,11 +52,6 @@
|
||||||
|
|
||||||
; Identifiers
|
; Identifiers
|
||||||
|
|
||||||
[
|
|
||||||
(class_variable)
|
|
||||||
(instance_variable)
|
|
||||||
] @property
|
|
||||||
|
|
||||||
((identifier) @constant.builtin
|
((identifier) @constant.builtin
|
||||||
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
||||||
|
|
||||||
|
@ -73,11 +66,19 @@
|
||||||
((constant) @constant
|
((constant) @constant
|
||||||
(#match? @constant "^[A-Z\\d_]+$"))
|
(#match? @constant "^[A-Z\\d_]+$"))
|
||||||
|
|
||||||
|
(global_variable) @constant
|
||||||
|
|
||||||
(constant) @type
|
(constant) @type
|
||||||
|
|
||||||
(self) @variable.special
|
(self) @variable.special
|
||||||
(super) @variable.special
|
(super) @variable.special
|
||||||
|
|
||||||
|
[
|
||||||
|
(class_variable)
|
||||||
|
(instance_variable)
|
||||||
|
] @variable.member
|
||||||
|
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue