hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
361 stars 68 forks source link

add `synchronized` keyword #124

Closed bmalehorn closed 7 years ago

bmalehorn commented 7 years ago

Before, the keyword synchronized wouldn't get highlighted like all other keywords. Now, it's highlighted.


Before:

before

After:

after

fommil commented 7 years ago

That's because it's not a keyword :-)

Sorry, we're sticking with the scala language spec on this one.

hvesalai commented 7 years ago

However, I think I included some support for having your own keywords, didn't I.

hvesalai commented 7 years ago

Yes, you could customize the scala-font-lock:constant-list.

M-x customize-variable

bmalehorn commented 7 years ago

Wow you're right! synchronized is a function that presumably uses some JVM synchronized primitive.

@hvesalai thanks, but I'll probably keep it unhighlighted since that's more accurate.

fommil commented 7 years ago

Not using it might be even better. But it's there for a reason...