25619
|
1 " Syntax file for scdoc files
|
|
2 " Maintainer: Gregory Anders <greg@gpanders.com>
|
|
3 " Last Updated: 2021-08-04
|
|
4
|
|
5 if exists('b:current_syntax')
|
|
6 finish
|
|
7 endif
|
|
8 let b:current_syntax = 'scdoc'
|
|
9
|
|
10 syntax match scdocFirstLineError "\%^.*$"
|
|
11 syntax match scdocFirstLineValid "\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$"
|
|
12
|
|
13 syntax region scdocCommentError start="^;\S" end="$" keepend
|
|
14 syntax region scdocComment start="^; " end="$" keepend
|
|
15
|
|
16 syntax region scdocHeaderError start="^#\{3,}" end="$" keepend
|
|
17 syntax region scdocHeader start="^#\{1,2}" end="$" keepend
|
|
18
|
|
19 syntax match scdocIndentError "^[ ]\+"
|
|
20
|
|
21 syntax match scdocLineBreak "++$"
|
|
22
|
|
23 syntax match scdocOrderedListMarker "^\s*\.\%(\s\+\S\)\@="
|
|
24 syntax match scdocListMarker "^\s*-\%(\s\+\S\)\@="
|
|
25
|
|
26 syntax match scdocTableStartMarker "^[\[|\]][\[\-\]]"
|
|
27 syntax match scdocTableMarker "^[|:][\[\-\] ]"
|
|
28
|
|
29 syntax region scdocBold concealends matchgroup=scdocBoldDelimiter start="\\\@<!\*" end="\\\@<!\*"
|
|
30 syntax region scdocUnderline concealends matchgroup=scdocUnderlineDelimiter start="\<\\\@<!_" end="\\\@<!_\>"
|
|
31 syntax region scdocPre matchgroup=scdocPreDelimiter start="^\t*```" end="^\t*```"
|
|
32
|
|
33 hi link scdocFirstLineValid Comment
|
|
34 hi link scdocComment Comment
|
|
35 hi link scdocHeader Title
|
|
36 hi link scdocOrderedListMarker Statement
|
|
37 hi link scdocListMarker scdocOrderedListMarker
|
|
38 hi link scdocLineBreak Special
|
|
39 hi link scdocTableMarker Statement
|
|
40 hi link scdocTableStartMarker scdocTableMarker
|
|
41
|
|
42 hi link scdocFirstLineError Error
|
|
43 hi link scdocCommentError Error
|
|
44 hi link scdocHeaderError Error
|
|
45 hi link scdocIndentError Error
|
|
46
|
|
47 hi link scdocPreDelimiter Delimiter
|
|
48
|
|
49 hi scdocBold term=bold cterm=bold gui=bold
|
|
50 hi scdocUnderline term=underline cterm=underline gui=underline
|
|
51 hi link scdocBoldDelimiter scdocBold
|
|
52 hi link scdocUnderlineDelimiter scdocUnderline
|