this repo has no description
1" Vim syntax file
2" Language: prr
3" Maintainer: Daniel Xu <dxu@dxuuu.xyz>
4" Last Change: 2022 Mar 25
5" Credits: Bram Moolenaar <Bram@vim.org>
6"
7" This version is copied and edited from diff.vim
8
9" Check whether an earlier file has defined a syntax already
10if exists("b:current_syntax")
11 finish
12endif
13
14syn region prrFile start=/^> diff/ end=/^> diff/ms=s-1,me=s-1 transparent fold keepend contains=prrHeader,prrIndex,prrChunk
15
16syn region prrChunk start=/^> @@/ start=/^\n> /rs=e-2 end=/^> @@/ms=s-1,me=s-1 end=/^> diff/ms=s-1,me=s-1 end=/^$/ transparent fold keepend contains=CONTAINED,prrTag
17
18syn match prrAdded contained "^> +.*"
19syn match prrRemoved contained "^> -.*"
20
21syn match prrHeader contained "^> diff.*"
22syn match prrIndex contained "^> index.*"
23syn match prrChunkH contained "^> @@.*"
24
25syn match prrTag "^@.*" contains=prrTagName,prrResult transparent
26
27syn match prrTagName contained "@prr" nextgroup=prrResult
28syn keyword prrResult contained approve reject comment
29
30" Define the default highlighting.
31" Only used when an item doesn't have highlighting yet
32hi def link prrAdded Identifier
33hi def link prrRemoved Special
34
35hi def link prrTagName Keyword
36hi def link prrResult String
37hi def link prrHeader Include
38hi def link prrIndex Comment
39hi def link prrChunkH Function
40
41let b:current_syntax = "prr"