atom / language-objective-c

Objective-C package for Atom
Other
15 stars 21 forks source link

Distinguish between ObjC .m files vs. MATLAB/Octave .m files #20

Open mcandre opened 6 years ago

mcandre commented 6 years ago

Atom always opens my Objective-C *.m files as MATLAB format, when these files are really Objective-C format. Can we introduce some simple linguist detection so that Atom selects a more appropriate syntax highlighter?

bjce commented 5 years ago

I just had the opposite problem (.m file detected as objective-c instead of matlab)

Arcanemagus commented 5 years ago

Atom itself doesn't have built in MATLAB language support, so your specific issue would be due to a third-party language package you have installed.

That being said, either (or both!) of these languages could add a firstLineMatch RegEx to help differentiate between languages that share a file extension.

Until that happens, if you predominantly use one language over the other (and it usually is picking the wrong one), you can force the language of the .m file type.