zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.85k stars 1.17k forks source link

Request (or just a general question) about .mo (modelica) syntax highlight support. #3415

Open PauloMorgs opened 1 month ago

PauloMorgs commented 1 month ago

Hello folks, hope you're doing fine!

I'm kinda new on the linux environment and sometimes I have some really stupid questions, this may be one of them. I need to write physical models in the modelica (.mo) language and I used to use Notepad++ on windows because someone made a custom modelica syntax highlight file for it. I moved to linux and discovered Micro and, man, I really love it. Unfortunately, though, the absence of .mo syntax highlight makes my life really difficult. How one would go about adding a custom syntax highlight file on micro? How is this file structured? Is there a fast way to quickly convert the custom template file I have for Notepad++ to the model Micro uses?

Thanks a lot for your attention,

Commit hash: IDK, sorry. OS: Arch Linux Terminal: Kitty, Shell: Fish

dmaluka commented 1 month ago

help colors described how to creates custom syntax highlighting files: https://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-files

TL;DR you need to be familiar with regular expressions.