1
0
Fork 0
mirror of synced 2024-11-21 17:45:36 -05:00

feat(garuda-common-settings): add syntax highlighting for configs in micro

Add syntax highlighting for config files opened in Micro that don't directly call a shell.
* Add a syntax definition for `filetype: conf` in `syntax/conf.yaml` with some basic rules (for example, highlighting commented lines);
* Define `/etc/*` and `/home/*/.config/*` as conf filetype in `settings.json`, because they contain a lot of config files that don't end in ".conf" or ".cfg".
This commit is contained in:
BluishHumility 2023-11-11 10:27:16 -05:00
parent 2c9248f9d7
commit 93f0691b06
2 changed files with 24 additions and 0 deletions

View file

@ -1,4 +1,10 @@
{
"/etc/*": {
"filetype": "conf"
},
"/home/*/.config/*": {
"filetype": "conf"
},
"autosu": true,
"colorscheme": "geany",
"mkparents": true

View file

@ -0,0 +1,18 @@
filetype: conf
detect:
filename: "(\\.(conf)$|\\.(cfg)$)"
rules:
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"