Add hosts file syntax highlighting

This commit is contained in:
ema
2025-07-10 07:33:57 +08:00
parent d06abf461e
commit 8d66dfac54
4 changed files with 157 additions and 3 deletions

View File

@@ -25,11 +25,11 @@ public class FormatDetector
internal IFormatDetector[] TextDetectors =
[
new CMakeListsDetector(),
new XMLDetector(),
new JSONDetector(),
new MakefileDetector(),
new CMakeListsDetector(),
//new HostsDetector(),
new HostsDetector(),
new DockerfileDetector(),
];

View File

@@ -24,7 +24,7 @@ public sealed class HostsDetector : IFormatDetector
{
public string Name => "Hosts";
public string Extension => null;
public string Extension => ".hosts";
public bool Detect(string path, string text)
{