diff options
author | Guido Cella <guidocella91@gmail.com> | 2020-06-20 05:49:06 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2020-06-21 10:58:32 +0200 |
commit | aa8a2b1769e7731d6cabef98315c7929a996482e (patch) | |
tree | 876a66848668063e2c987dbc78ef4f17d817c13d /src | |
parent | 4cdac180d8c9af14bfa96f1fedce67bb8fc0b36c (diff) |
Highlight systemd files as ini
Diffstat (limited to 'src')
-rw-r--r-- | src/syntax_mapping.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs index 1c817edd..a0df412c 100644 --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -47,6 +47,31 @@ impl<'a> SyntaxMapping<'a> { .insert("rails", MappingTarget::MapToUnknown) .unwrap(); + for glob in [ + "**/systemd/**/*.conf", + "**/systemd/**/*.example", + "*.automount", + "*.device", + "*.dnssd", + "*.link", + "*.mount", + "*.netdev", + "*.network", + "*.nspawn", + "*.path", + "*.service", + "*.scope", + "*.slice", + "*.socket", + "*.swap", + "*.target", + "*.timer", + ].iter() { + mapping + .insert(glob, MappingTarget::MapTo("INI")) + .unwrap(); + } + mapping } |