Sublime Forum

Scala syntax highlighting

#1

Scala doesn’t seem to be formatted properly. I’m assuming it’s supported since I have the option to set the syntax of a file to Scala, but the colours for different types of things are all wrong, and when I try and customise it the different pieces of syntax aren’t categorised how I would expect.

For example many things seem to be categorised as “Storage”, which makes no sense to me. Example rule:
“rules”:
[
{
“name”: “Storage”,
“scope”: “storage”,
“foreground”: “var(blue-vibrant)”,
“font_style”: “underline”
}
]

results in this:

Anyone know if Scala is supposed to be supported?

p.s. this is a scala 2 project, same with scala 3 though

0 Likes

#2

storage.modifier is the correct scope for that kind of keyword and is consistent with other syntax definitions. See https://www.sublimetext.com/docs/scope_naming.html#storage

1 Like

#3

Thanks for the response. I guess I’m finding it weird that implicit, extends, abstract, and private all have to have the same highlighting. That’s ok though, if it’s working it’s working.

EDIT: thanks a lot for that link too, I was trying to find the definition of those things but failing at search

0 Likes