Monokai/monokai-pro-sublime-text

Some Ruby keywords look off in ST4

Closed this issue ยท 6 comments

I'm not sure I've seen this in the past but the colouring of some Ruby keywords look off to me.

Here's a screenshot.

Screenshot 2020-12-14 at 18 35 43

I would expect class/end and def/end to match each other.

Here are the scope names I'm seeing for each keyword.

Screenshot 2020-12-14 at 18 37 20

Screenshot 2020-12-14 at 18 37 27

Screenshot 2020-12-14 at 18 38 00

Hi, I also noticed it and it is also broken for sublimes own Monokai theme.
They changed a few syntax "things" (not sure what exactly) and I reported this as a bug which they confirmed. They did not change it back via the updates though and many other color themes don't have this problem. So easiest fix would be to go from ruby specific to generic start end keyword declaration? Not sure.

fixed in 1.1.19

Thank you! ๐Ÿ™ โค๏ธ

Turns out it's not completely fixed. module keywords are still coloured differently. See attached screenshot.

Screenshot 2021-04-07 at 12 15 28

It looks like modules are scoped differently. See attached screenshot.

Screenshot 2021-04-07 at 12 15 54

Until this i solved, here is a quick fix (tested on linux):

  • Go to ~/.config/sublime-text-3/Installed Packages (maybe the path will differ a bit with a clean ST4 install -- I upgraded from ST3)
  • Open the Theme - Monokai Pro.sublime-package file with your archive manager
  • Open the .sublime-color-scheme that matches the color scheme you're using (for me it's Monokai Pro (Filter Machine).sublime-color-scheme)
  • FInd "name": "ruby specific" and update the scope (add , keyword.declaration.namespace.ruby)
  • Save and restart sublime

I've added the the above fix in 1.1.20. Thanks!