1package p
2
3import (
4 . "github.com/alecthomas/chroma" // nolint
5 "github.com/alecthomas/chroma/lexers/internal"
6)
7
8// Pacmanconf lexer.
9var Pacmanconf = internal.Register(MustNewLexer(
10 &Config{
11 Name: "PacmanConf",
12 Aliases: []string{"pacmanconf"},
13 Filenames: []string{"pacman.conf"},
14 MimeTypes: []string{},
15 },
16 Rules{
17 "root": {
18 {`#.*$`, CommentSingle, nil},
19 {`^\s*\[.*?\]\s*$`, Keyword, nil},
20 {`(\w+)(\s*)(=)`, ByGroups(NameAttribute, Text, Operator), nil},
21 {`^(\s*)(\w+)(\s*)$`, ByGroups(Text, NameAttribute, Text), nil},
22 {Words(``, `\b`, `$repo`, `$arch`, `%o`, `%u`), NameVariable, nil},
23 {`.`, Text, nil},
24 },
25 },
26))