Mercurial > vim
annotate runtime/syntax/cabal.vim @ 10721:9177c4f6a229
Added tag v8.0.0250 for changeset 44a1661f4cfaa091f12206458ff6ab8e9c122803
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jan 2017 14:00:05 +0100 |
parents | 46763b01cd9a |
children | bbff863d3cae |
rev | line source |
---|---|
2152 | 1 " Vim syntax file |
2 " Language: Haskell Cabal Build file | |
3 " Maintainer: Vincent Berthoux <twinside@gmail.com> | |
4 " File Types: .cabal | |
2206
a8afba7027ae
Add extra floating point functions.
Bram Moolenaar <bram@vim.org>
parents:
2152
diff
changeset
|
5 " Last Change: 2010 May 18 |
2152 | 6 " v1.3: Updated to the last version of cabal |
7 " Added more highlighting for cabal function, true/false | |
8 " and version number. Also added missing comment highlighting. | |
9 " Cabal known compiler are highlighted too. | |
10 " | |
11 " V1.2: Added cpp-options which was missing. Feature implemented | |
12 " by GHC, found with a GHC warning, but undocumented. | |
13 " Whatever... | |
14 " | |
15 " v1.1: Fixed operator problems and added ftdetect file | |
16 " (thanks to Sebastian Schwarz) | |
17 " | |
18 " v1.0: Cabal syntax in vimball format | |
19 " (thanks to Magnus Therning) | |
20 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2206
diff
changeset
|
21 " 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
|
22 if exists("b:current_syntax") |
2152 | 23 finish |
24 endif | |
25 | |
26 syn keyword cabalCategory Library library Executable executable Flag flag | |
27 syn keyword cabalCategory source-repository Source-Repository | |
28 | |
29 syn keyword cabalConditional if else | |
30 syn match cabalOperator "&&\|||\|!\|==\|>=\|<=" | |
31 syn keyword cabalFunction os arche impl flag | |
32 syn match cabalComment /--.*$/ | |
33 syn match cabalVersion "\d\+\(.\(\d\)\+\)\+" | |
34 | |
35 syn match cabalTruth "\ctrue" | |
36 syn match cabalTruth "\cfalse" | |
37 | |
38 syn match cabalCompiler "\cghc" | |
39 syn match cabalCompiler "\cnhc" | |
40 syn match cabalCompiler "\cyhc" | |
41 syn match cabalCompiler "\chugs" | |
42 syn match cabalCompiler "\chbc" | |
43 syn match cabalCompiler "\chelium" | |
44 syn match cabalCompiler "\cjhc" | |
45 syn match cabalCompiler "\clhc" | |
46 | |
47 | |
48 syn match cabalStatement "\cauthor" | |
49 syn match cabalStatement "\cbranch" | |
50 syn match cabalStatement "\cbug-reports" | |
51 syn match cabalStatement "\cbuild-depends" | |
52 syn match cabalStatement "\cbuild-tools" | |
53 syn match cabalStatement "\cbuild-type" | |
54 syn match cabalStatement "\cbuildable" | |
55 syn match cabalStatement "\cc-sources" | |
56 syn match cabalStatement "\ccabal-version" | |
57 syn match cabalStatement "\ccategory" | |
58 syn match cabalStatement "\ccc-options" | |
59 syn match cabalStatement "\ccopyright" | |
60 syn match cabalStatement "\ccpp-options" | |
61 syn match cabalStatement "\cdata-dir" | |
62 syn match cabalStatement "\cdata-files" | |
63 syn match cabalStatement "\cdefault" | |
64 syn match cabalStatement "\cdescription" | |
65 syn match cabalStatement "\cexecutable" | |
66 syn match cabalStatement "\cexposed-modules" | |
67 syn match cabalStatement "\cexposed" | |
68 syn match cabalStatement "\cextensions" | |
69 syn match cabalStatement "\cextra-lib-dirs" | |
70 syn match cabalStatement "\cextra-libraries" | |
71 syn match cabalStatement "\cextra-source-files" | |
72 syn match cabalStatement "\cextra-tmp-files" | |
73 syn match cabalStatement "\cfor example" | |
74 syn match cabalStatement "\cframeworks" | |
75 syn match cabalStatement "\cghc-options" | |
76 syn match cabalStatement "\cghc-prof-options" | |
77 syn match cabalStatement "\cghc-shared-options" | |
78 syn match cabalStatement "\chomepage" | |
79 syn match cabalStatement "\chs-source-dirs" | |
80 syn match cabalStatement "\chugs-options" | |
81 syn match cabalStatement "\cinclude-dirs" | |
82 syn match cabalStatement "\cincludes" | |
83 syn match cabalStatement "\cinstall-includes" | |
84 syn match cabalStatement "\cld-options" | |
85 syn match cabalStatement "\clicense-file" | |
86 syn match cabalStatement "\clicense" | |
87 syn match cabalStatement "\clocation" | |
88 syn match cabalStatement "\cmain-is" | |
89 syn match cabalStatement "\cmaintainer" | |
90 syn match cabalStatement "\cmodule" | |
91 syn match cabalStatement "\cname" | |
92 syn match cabalStatement "\cnhc98-options" | |
93 syn match cabalStatement "\cother-modules" | |
94 syn match cabalStatement "\cpackage-url" | |
95 syn match cabalStatement "\cpkgconfig-depends" | |
96 syn match cabalStatement "\cstability" | |
97 syn match cabalStatement "\csubdir" | |
98 syn match cabalStatement "\csynopsis" | |
99 syn match cabalStatement "\ctag" | |
100 syn match cabalStatement "\ctested-with" | |
101 syn match cabalStatement "\ctype" | |
102 syn match cabalStatement "\cversion" | |
103 | |
104 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2206
diff
changeset
|
105 " Only when an item doesn't have highlighting yet |
2152 | 106 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
107 hi def link cabalVersion Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
108 hi def link cabalTruth Boolean |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
109 hi def link cabalComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
110 hi def link cabalStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
111 hi def link cabalCategory Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
112 hi def link cabalFunction Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
113 hi def link cabalConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
114 hi def link cabalOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
115 hi def link cabalCompiler Constant |
2152 | 116 |
117 let b:current_syntax = "cabal" | |
118 | |
119 " vim: ts=8 |