blob: 4ca8f6d92184ce84264e09dd7c5c523b0ec361d7 [file] [log] [blame]
Adam Monsen0aa65b42024-08-02 19:54:15 +02001" Vim syntax file
2" Language: GoAccess configuration
3" Maintainer: Adam Monsen <haircut@gmail.com>
4" Last Change: 2024 Aug 1
5" Remark: see https://goaccess.io/man#configuration
6"
7" The GoAccess configuration file syntax is line-separated settings. Settings
8" are space-separated key value pairs. Comments are any line starting with a
9" hash mark.
10" Example: https://github.com/allinurl/goaccess/blob/master/config/goaccess.conf
11"
12" This syntax definition supports todo/fixme highlighting in comments, and
13" special (Keyword) highlighting if a setting's value is 'true' or 'false'.
14"
15" TODO: a value is required, so use extreme highlighting (e.g. bright red
16" background) if a setting is missing a value.
17
18if exists("b:current_syntax")
19 finish
20endif
21
22syn match goaccessSettingName '^[a-z-]\+' nextgroup=goaccessSettingValue
23syn match goaccessSettingValue '\s\+.\+$' contains=goaccessKeyword
24syn match goaccessComment "^#.*$" contains=goaccessTodo,@Spell
25syn keyword goaccessTodo TODO FIXME contained
26syn keyword goaccessKeyword true false contained
27
28hi def link goaccessSettingName Type
29hi def link goaccessSettingValue String
30hi def link goaccessComment Comment
31hi def link goaccessTodo Todo
32hi def link goaccessKeyword Keyword
33
34let b:current_syntax = "goaccess"