microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
39.52k stars 3.54k forks source link

Feature request: Implement syntax highlighting support for MATLAB #1577

Open tarheels100 opened 4 years ago

tarheels100 commented 4 years ago

Feature request

Add syntax highlighting support for the MATLAB programming language.

porteusconf commented 4 years ago

Please keep this candidate alive ;-) If when I ever find time, I might try to add matlab/octave syntax highlighting per steps here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/ide/lib/languages/README.md

The idea being to port TextMate or other existing syntax high-lighters to monoco (which is used apparently by gitlab)? Does seem possible, tho welcome help, especially with test suite. If I start a fork I'll post it here.

NOTE: Atom and github figured it out years ago, and even made major improvement in 2019: https://atom.io/packages/language-matlab-octave

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.

Also note, some systems detect .m file type as "ObjectiveC Mode", prompting the suggestion to look at first line of the .m file to autodetect if it is matlab, octave, or something else, per https://github.com/ajaxorg/ace/issues/2228

nicolaskoehler commented 2 years ago

Hi all, is this issue still considered to be developed? Or is there already an alternative way how to get MATLAB syntax highlighting into Azure DevOps? Many thanks, Nicolas