Mercurial > vim
annotate runtime/syntax/cabal.vim @ 15472:0fcc1315c061 v8.1.0744
patch 8.1.0744: compiler warnings for signed/unsigned strings
commit https://github.com/vim/vim/commit/b1443b480fe9965a6eaa9211657d299e88964084
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 13 23:51:14 2019 +0100
patch 8.1.0744: compiler warnings for signed/unsigned strings
Problem: Compiler warnings for signed/unsigned strings.
Solution: A few more type cast fixes.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Jan 2019 00:00:04 +0100 |
parents | bbff863d3cae |
children | 17c4178f26ea |
rev | line source |
---|---|
2152 | 1 " Vim syntax file |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
2 " Language: Haskell Cabal Build file |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
3 " Author: Vincent Berthoux <twinside@gmail.com> |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
4 " Maintainer: Marcin Szamotulski <profunctor@pm.me> |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
5 " Previous Maintainer: Vincent Berthoux <twinside@gmail.com> |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
6 " File Types: .cabal |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
7 " Last Change: 15 May 2018 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
8 " v1.5: Incorporated changes from |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
9 " https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
10 " Use `syn keyword` instead of `syn match`. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
11 " Added cabalStatementRegion to limit matches of keywords, which fixes |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
12 " the highlighting of description's value. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
13 " Added cabalVersionRegion to limit the scope of cabalVersionOperator |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
14 " and cabalVersion matches. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
15 " Added cabalLanguage keyword. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
16 " Added calbalTitle, cabalAuthor and cabalMaintainer syntax groups. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
17 " Added ! and ^>= operators (calbal 2.0) |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
18 " Added build-type keywords |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
19 " v1.4: Add benchmark support, thanks to Simon Meier |
2152 | 20 " v1.3: Updated to the last version of cabal |
21 " Added more highlighting for cabal function, true/false | |
22 " and version number. Also added missing comment highlighting. | |
23 " Cabal known compiler are highlighted too. | |
24 " | |
25 " V1.2: Added cpp-options which was missing. Feature implemented | |
26 " by GHC, found with a GHC warning, but undocumented. | |
27 " Whatever... | |
28 " | |
29 " v1.1: Fixed operator problems and added ftdetect file | |
30 " (thanks to Sebastian Schwarz) | |
31 " | |
32 " v1.0: Cabal syntax in vimball format | |
33 " (thanks to Magnus Therning) | |
34 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2206
diff
changeset
|
35 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2206
diff
changeset
|
36 if exists("b:current_syntax") |
2152 | 37 finish |
38 endif | |
39 | |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
40 " this file uses line continuation |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
41 let s:cpo_save = &cpo |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
42 set cpo&vim |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
43 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
44 " set iskeyword for this syntax script |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
45 syn iskeyword @,48-57,192-255,- |
2152 | 46 |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
47 " Case sensitive matches |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
48 syn case match |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
49 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
50 syn keyword cabalConditional if else |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
51 syn keyword cabalFunction os arche impl flag |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
52 syn match cabalComment /--.*$/ |
2152 | 53 |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
54 " Case insensitive matches |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
55 syn case ignore |
2152 | 56 |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
57 syn keyword cabalCategory contained |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
58 \ executable |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
59 \ library |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
60 \ benchmark |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
61 \ test-suite |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
62 \ source-repository |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
63 \ flag |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
64 \ custom-setup |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
65 syn match cabalCategoryTitle contained /[^{]*\ze{\?/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
66 syn match cabalCategoryRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
67 \ contains=cabalCategory,cabalCategoryTitle |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
68 \ nextgroup=cabalCategory skipwhite |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
69 \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
70 syn keyword cabalTruth true false |
2152 | 71 |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
72 " cabalStatementRegion which limits the scope of cabalStatement keywords, this |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
73 " way they are not highlighted in description. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
74 syn region cabalStatementRegion start=+^\s*\(--\)\@<!\k\+\s*:+ end=+:+ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
75 syn keyword cabalStatement contained containedin=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
76 \ default-language |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
77 \ default-extensions |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
78 \ author |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
79 \ branch |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
80 \ bug-reports |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
81 \ build-depends |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
82 \ build-tools |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
83 \ build-type |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
84 \ buildable |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
85 \ c-sources |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
86 \ cabal-version |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
87 \ category |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
88 \ cc-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
89 \ copyright |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
90 \ cpp-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
91 \ data-dir |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
92 \ data-files |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
93 \ default |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
94 \ description |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
95 \ executable |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
96 \ exposed-modules |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
97 \ exposed |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
98 \ extensions |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
99 \ extra-tmp-files |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
100 \ extra-doc-files |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
101 \ extra-lib-dirs |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
102 \ extra-libraries |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
103 \ extra-source-files |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
104 \ exta-tmp-files |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
105 \ for example |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
106 \ frameworks |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
107 \ ghc-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
108 \ ghc-prof-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
109 \ ghc-shared-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
110 \ homepage |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
111 \ hs-source-dirs |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
112 \ hugs-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
113 \ include-dirs |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
114 \ includes |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
115 \ install-includes |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
116 \ ld-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
117 \ license |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
118 \ license-file |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
119 \ location |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
120 \ main-is |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
121 \ maintainer |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
122 \ manual |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
123 \ module |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
124 \ name |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
125 \ nhc98-options |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
126 \ other-extensions |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
127 \ other-modules |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
128 \ package-url |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
129 \ pkgconfig-depends |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
130 \ setup-depends |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
131 \ stability |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
132 \ subdir |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
133 \ synopsis |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
134 \ tag |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
135 \ tested-with |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
136 \ type |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
137 \ version |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
138 \ virtual-modules |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
139 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
140 " operators and version operators |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
141 syn match cabalOperator /&&\|||\|!/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
142 syn match cabalVersionOperator contained |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
143 \ /!\|==\|\^\?>=\|<=\|<\|>/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
144 " match version: `[%]\@<!` is to exclude `%20` in http addresses. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
145 syn match cabalVersion contained |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
146 \ /[%$_-]\@<!\<\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
147 " cabalVersionRegion which limits the scope of cabalVersion pattern. |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
148 syn match cabalVersionRegionA |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
149 \ contains=cabalVersionOperator,cabalVersion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
150 \ keepend |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
151 \ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
152 " version inside `version: ...` |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
153 syn match cabalVersionRegionB |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
154 \ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
155 \ /^\s*\%(cabal-\)\?version\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
156 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
157 syn keyword cabalLanguage Haskell98 Haskell2010 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
158 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
159 " title region |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
160 syn match cabalName contained /:\@<=.*/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
161 syn match cabalNameRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
162 \ contains=cabalStatementRegion,cabalName |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
163 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
164 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
165 \ /^\c\s*name\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
166 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
167 " author region |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
168 syn match cabalAuthor contained /:\@<=.*/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
169 syn match cabalAuthorRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
170 \ contains=cabalStatementRegion,cabalStatement,cabalAuthor |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
171 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
172 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
173 \ /^\c\s*author\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
174 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
175 " maintainer region |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
176 syn match cabalMaintainer contained /:\@<=.*/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
177 syn match cabalMaintainerRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
178 \ contains=cabalStatementRegion,cabalStatement,cabalMaintainer |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
179 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
180 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
181 \ /^\c\s*maintainer\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
182 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
183 " license region |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
184 syn match cabalLicense contained /:\@<=.*/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
185 syn match cabalLicenseRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
186 \ contains=cabalStatementRegion,cabalStatement,cabalLicense |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
187 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
188 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
189 \ /^\c\s*license\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
190 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
191 " license-file region |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
192 syn match cabalLicenseFile contained /:\@<=.*/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
193 syn match cabalLicenseFileRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
194 \ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
195 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
196 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
197 \ /^\c\s*license-file\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
198 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
199 " tested-with region with compilers and versions |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
200 syn keyword cabalCompiler contained ghc nhc yhc hugs hbc helium jhc lhc |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
201 syn match cabalTestedWithRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
202 \ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
203 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
204 \ oneline |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
205 \ /^\c\s*tested-with\s*:.*$/ |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
206 |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
207 " build type keywords |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
208 syn keyword cabalBuildType contained |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
209 \ simple custom configure |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
210 syn match cabalBuildTypeRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
211 \ contains=cabalStatementRegion,cabalStatement,cabalBuildType |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
212 \ nextgroup=cabalStatementRegion |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
213 \ /^\c\s*build-type\s*:.*$/ |
2152 | 214 |
215 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2206
diff
changeset
|
216 " Only when an item doesn't have highlighting yet |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
217 hi def link cabalName Title |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
218 hi def link cabalAuthor Normal |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
219 hi def link cabalMaintainer Normal |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
220 hi def link cabalCategoryTitle Title |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
221 hi def link cabalLicense Normal |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
222 hi def link cabalLicenseFile Normal |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
223 hi def link cabalBuildType Keyword |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
224 hi def link cabalVersion Number |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
225 hi def link cabalTruth Boolean |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
226 hi def link cabalComment Comment |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
227 hi def link cabalStatement Statement |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
228 hi def link cabalLanguage Type |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
229 hi def link cabalCategory Type |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
230 hi def link cabalFunction Function |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
231 hi def link cabalConditional Conditional |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
232 hi def link cabalOperator Operator |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
233 hi def link cabalVersionOperator Operator |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
234 hi def link cabalCompiler Constant |
2152 | 235 |
236 let b:current_syntax = "cabal" | |
237 | |
13960
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
238 let &cpo = s:cpo_save |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
239 unlet! s:cpo_save |
bbff863d3cae
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
240 |
2152 | 241 " vim: ts=8 |