satococoa / atom-rubymotion

RubyMotion support in Atom
https://atom.io/packages/RubyMotion
MIT License
71 stars 4 forks source link

More intelligent RubyMotion file detection #1

Closed satococoa closed 10 years ago

satococoa commented 10 years ago

Now, firstLineMatch is used to detect RubyMotion file detection.

https://github.com/satococoa/atom-rubymotion/blob/master/grammars/rubymotion.cson#L2

It may be better to set project-wide setting not only look into the first line.

markrickert commented 10 years ago

I'd say look at the Rakefile and detect "/Library/RubyMotion/lib" from the project level.

Every RubyMotion Rakefile must have the line:

$:.unshift("/Library/RubyMotion/lib")
satococoa commented 10 years ago

I don't know how to set syntax project-wide though, It's a good idea, thank you.

SublimeRubyMotionBuilder's detection logic is almost same.

https://github.com/RubyMotionJP/SublimeRubyMotionBuilder/blob/master/RubyMotionBuilder.py#L17