execjosh / atom-file-types

Specify additional file types for languages.
https://atom.io/packages/file-types
MIT License
52 stars 15 forks source link

Associate '_spec.rb' with RSpec #37

Closed evmorov closed 8 years ago

evmorov commented 9 years ago

Hello! I'm trying to do this association but have no idea what is going wrong. My config:

"file-types":
  '_spec\.rb$': 'source.rspec'
  rb: "source.ruby"

Any suggestions?

execjosh commented 9 years ago

Hi, thanks for your question.

Is this under the "*" section of your config?

evmorov commented 9 years ago

@execjosh yeap! Maybe I should write not 'source.rspec' but something else? Any ideas where to look?

evmorov commented 9 years ago

I also tried like this but it didn't help

  "file-types":
    '_spec\.rb$': 'source.ruby.rspec'
    rb: "source.ruby"
execjosh commented 8 years ago

I just tried this in atom 1.6.0 and it works. I'm going to close this as irreproducible. Please reopen it if you're still having problems (as I might be misunderstanding).

"*":
  "file-types":
    "_spec\.rb$": "source.ruby.rspec"
execjosh commented 8 years ago

Wait, I see. The ruby scope is winning, right?

evmorov commented 8 years ago

@execjosh I guess so. I'm on 1.6.0 and it's still not working for me.

execjosh commented 8 years ago

When you remove rb: "source.ruby", then it works, right?

evmorov commented 8 years ago

I've figured out! It should be (without 'rb: "source.ruby"'):

"file-types":
    '_spec\.rb$': 'source.ruby.rspec'

Thanks!

execjosh commented 8 years ago

Great :smile: