micro icon indicating copy to clipboard operation
micro copied to clipboard

add .conf file syntax file

Open cbc02009 opened this issue 3 years ago • 2 comments

Conf syntax is based off example done by @zoomosis in #2179 and the ini.yaml config.

regex is definitely not my strong suit, so if any changes are needed let me know. it seems to work for me.

cbc02009 avatar Jun 21 '22 15:06 cbc02009

looking at it now, just a straight copy (or link) of the .toml config might actually be better. Thoughts?

cbc02009 avatar Jun 23 '22 12:06 cbc02009

I don't think the proposed change make a lot of sense, as I've seen .conf and .cfg as a file extension for all kinds of syntax as it simply means that a file is used for configuration purposes.

totoroot avatar Jul 06 '22 11:07 totoroot

Sure they can use emojies in conf and cfg files, but this is just bit of color stuff, not like it breaks functionality. So if it works for majority of basic config files in linux world /etc/... then its fine.

edit

Ok, here is mine, basicly just coppied TOML and added square brackets highlight and commenting out not just # but also // Also it should match any file that has no extension (no dot anywhere in name) and contains the string conf

DoTheEvo avatar Oct 01 '22 23:10 DoTheEvo

Using the modified TOML did the trick, but I noticed that using INI also gave variable values a different color than their names (e.g. var=value, "var" being green and "value" white). So, I merged both @DoTheEvo 's file and the one at https://github.com/zyedidia/micro/blob/master/runtime/syntax/ini.yaml. You can find it here.

Would a merge request adding this as a new file in micro/blob/master/runtime/syntax/conf.yaml accomplish anything?

another-sapiens avatar May 31 '23 09:05 another-sapiens