From aa8a2b1769e7731d6cabef98315c7929a996482e Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sat, 20 Jun 2020 05:49:06 +0200 Subject: [PATCH] Highlight systemd files as ini --- src/syntax_mapping.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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 }