Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Better color syntax for CoffeeScript in emacs?

I've seen that when I write a function in coffeescript-textmate it colors the name of function

pleasePutMeSomeColor = () -> console.log "textmate works great!"

in this example pleasePutMeColor is colored inside textmate. This allows me to recognize which are functions much quicker. But when I write the same example inside emacs this word isn't colored. It is harder to identify which are functions.

Is there a way to highlight functions with a different color in emacs?

like image 892
clagccs Avatar asked Oct 30 '11 23:10

clagccs


2 Answers

Are you using defunkt's coffee-mode? That's the only CoffeeScript syntax highlighting plugin for Emacs that I'm aware of; it's under active development, so feel free to submit an issue if you have a specific suggestion.

like image 110
Trevor Burnham Avatar answered Sep 22 '22 08:09

Trevor Burnham


yup...I'm going to answer my question: Inside github there is a defunkt coffee-mode fork that adds syntax highlighting for functions.

https://github.com/handle/coffee-mode

It isn't perfect but works well...I hope that it will be added to the official coffe-mode repo.

like image 25
clagccs Avatar answered Sep 25 '22 08:09

clagccs