2015-06-10 23:48:52 +03:00
|
|
|
hook global BufCreate .*\.ks %{
|
2017-11-03 10:34:41 +03:00
|
|
|
set-option buffer filetype kickstart
|
2015-06-10 23:48:52 +03:00
|
|
|
}
|
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
add-highlighter shared/kickstart regions
|
|
|
|
add-highlighter shared/kickstart/code default-region group
|
2018-07-02 13:59:12 +03:00
|
|
|
add-highlighter shared/kickstart/comment region '(^|\h)\K#' $ fill comment
|
|
|
|
add-highlighter shared/kickstart/double_string region '"' (?<!\\)(\\\\)*" fill string
|
|
|
|
add-highlighter shared/kickstart/single_string region "'" (?<!\\)(\\\\)*' fill string
|
|
|
|
add-highlighter shared/kickstart/packages region '^\h*\K%packages\b' '^\h*\K%end\b' group
|
|
|
|
add-highlighter shared/kickstart/shell region '^\h*\K%(pre|pre-install|post)\b' '^\h*\K%end\b' group
|
2015-06-10 23:48:52 +03:00
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
add-highlighter shared/kickstart/code/ regex "^\h*\b(auth|authconfig|autopart|autostep|bootloader|btrfs|clearpart|cmdline|device|dmraid|driverdisk|fcoe|firewall|firstboot|group|graphical|halt|ignoredisk|install|cdrom|harddrive|liveimg|nfs|url|iscsi|iscsiname|keyboard|lang|logvol|logging|mediacheck|monitor|multipath|network|part|partition|poweroff|raid|realm|reboot|repo|rescue|rootpw|selinux|services|shutdown|sshkey|sshpw|skipx|text|timezone|updates|upgrade|user|vnc|volgroup|xconfig|zerombr|zfcp)\b" 1:keyword
|
|
|
|
add-highlighter shared/kickstart/code/ regex '(--[\w-]+=? ?)([^-"\n][^\h\n]*)?' 1:attribute 2:string
|
|
|
|
add-highlighter shared/kickstart/code/ regex '%(include|ksappend)\b' 0:keyword
|
2015-06-10 23:48:52 +03:00
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
add-highlighter shared/kickstart/packages/ regex "^\h*[\w-]*" 0:value
|
|
|
|
add-highlighter shared/kickstart/packages/ regex "#[^\n]*" 0:comment
|
|
|
|
add-highlighter shared/kickstart/packages/ regex "^\h*@\^?[\h\w-]*" 0:attribute
|
|
|
|
add-highlighter shared/kickstart/packages/ regex '\A\h*\K%packages\b' 0:type
|
|
|
|
add-highlighter shared/kickstart/packages/ regex '^\h*%end\b' 0:type
|
|
|
|
add-highlighter shared/kickstart/shell/ regex '\A\h*\K%(pre-install|pre|post)\b' 0:type
|
|
|
|
add-highlighter shared/kickstart/shell/ regex '^\h*%end\b' 0:type
|
|
|
|
add-highlighter shared/kickstart/shell/ ref sh
|
2015-06-10 23:48:52 +03:00
|
|
|
|
|
|
|
|
2018-11-28 12:39:18 +03:00
|
|
|
hook -group kickstart-highlight global WinSetOption filetype=kickstart %{
|
|
|
|
add-highlighter window/kickstart ref kickstart
|
2018-12-11 02:11:35 +03:00
|
|
|
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/kickstart }
|
2018-11-28 12:39:18 +03:00
|
|
|
}
|