Breaking change: as of v1 release August 2019, migrated MATLAB grammar source from TextMate to official MATLAB support mathworks/MATLAB-Language-grammar. This fixed many reported issues and improved MATLAB highlighting to match official github/linguist used on Github.com.
Octave grammar source remains unchanged.
Octave grammar is converted from TextMate Bundle and remains unchanged from v0 to v1. Last update was v0.2. See: https://github.com/textmate/matlab.tmbundle
The syntax highlighting comes from the MathWorks TextMate grammar: https://github.com/mathworks/MATLAB-Language-grammar
Clone, convert, and update the grammar:
git clone firstname.lastname@example.org:mathworks/MATLAB-Language-grammar.gitapm init --package language-matlab-temp --convert MATLAB-Language-grammar/Matlab.tmbundle/cp language-matlab-temp/grammars/matlab.cson language-matlab-octave/grammars/m.cson
Apply an Atom-specific patch to the file
name: "". This prevents atom from improperly coloring all class contents.
Re-add function highlighting into updated
language-matlab-octave/grammars/m.cson, you'll see the functions to add back.
language-matlab-octave/grammars/functions-reference.cson. Use this file to update
repository:sections of the new
See the MATLAB file
highlighting-test.m for MATLAB code snippets to test syntax highlighting changes. Supposing you've updated
grammars/m.cson you can test your changes by doing the following:
cd your-repo-cloneapm remove language-matlab-octaveapm link .atom .
highlighting-test.m and ensure that the syntax highlighting is as desired. If you fix something specific, consider adding a code snippet to that file locking down your change for future testing.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.