In the Atom text editor, when two language packages define syntax and snippets for files with the same file extension, what determines the precedence?
For example, both language-ruby
and language-ruby-on-rails
are available by default, as they are included in the so-called Core Package set, and the two packages share the .rb
file extension.
How can I make sure that Atom will by default treat .rb
file as, say, source.ruby.rails
instead of source.ruby
files in my projects?
In your config.cson
file you can specify filename regexes and a related grammars, like so:
"*":
"file-types":
".rb?$": "source.ruby.rails"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.