GitLab Does Not Highlight MATLAB Files Syntax

Asked 2 years ago, Updated 2 years ago, 76 views

GitLab CE was introduced into Ubuntu-14.04 as instructed by Omnibus package.

However, MATLAB scripts in GitLab's managed repository are not syntax highlighted.

This may be the original specification, but is there anything I should introduce to highlight like GitHub...?

git gitlab

2022-09-30 18:32

2 Answers

I don't think Matlab and Objective-C are highlighted because they both have .m extensions and have been interpreted as Objective-C codes.

If you look at the language setting language.yml, the matlab extension is set to .matlab by default, so if you change the language.yml description of Objective-C and Matlab, it will be highlighted.


2022-09-30 18:32

If, as others have answered, it is an extension issue, you can also highlight something other than .matlab as MATLAB.

In the root directory of the project, create a file called .gitattributes and write the settings inside.

*.m gitlab-language=matlab

You can now identify and highlight a file with the extension .m as MATLAB.

Home Description Page


2022-09-30 18:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.