mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Improve ruby highlighting (#7829)
Release Notes: - Improved syntax-highlighting of identifiers in Ruby. Before: ![screenshot-2024-02-15-14 40 19@2x](https://github.com/zed-industries/zed/assets/1185253/29fca0eb-7c0c-4aee-9f31-a8a3c6680cb9) After: ![screenshot-2024-02-15-14 40 56@2x](https://github.com/zed-industries/zed/assets/1185253/2ce0e0c9-8689-4ff8-9f40-2ea5f6ccc2f6)
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…
Reference in a new issue