How to force language precedence for ambiguous extensions?


#1

How can I force Atom to treat most *.s files as assembler code rather than as R code? Can Atom apply Vim/Emacs mimetype comments?

For now, I am working around this annoying behavior by disabling the language-r package, though this method is not going to be much help when I switch over to working on my R projects.


#2

Pretty sure the shebang-set-grammar package can provide a solution.


#3

Assembler does not typically feature shebangs.


#4

Is there a problem with setting *.s to default as assembler and using the shebang to recognize R when you need it?

https://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-language-recognition