annotate runtime/syntax/cabal.vim @ 32851:8e9fbfc90732 v9.0.1736

patch 9.0.1736: Github Actions times out after 20 minutes Commit: https://github.com/vim/vim/commit/07a2b61d4c76b264740a47fac781803a9b8bcc08 Author: Christian Brabandt <cb@256bit.org> Date: Fri Aug 18 01:18:22 2023 +0200 patch 9.0.1736: Github Actions times out after 20 minutes Problem: Github Actions times out after 20 minutes Solution: Increase the timeout to 25 minutes Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 18 Aug 2023 01:30:02 +0200
parents 5acd6f02ea35
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
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
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
7 " Last Change: 22 Oct 2022
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
8 " v1.6: Added support for foreign-libraries
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
9 " Added highlighting for various fields
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
10 " v1.5: Incorporated changes from
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
11 " 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
12 " Use `syn keyword` instead of `syn match`.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
13 " Added cabalStatementRegion to limit matches of keywords, which fixes
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
14 " the highlighting of description's value.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
15 " Added cabalVersionRegion to limit the scope of cabalVersionOperator
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
16 " and cabalVersion matches.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
17 " Added cabalLanguage keyword.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
18 " Added calbalTitle, cabalAuthor and cabalMaintainer syntax groups.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
19 " Added ! and ^>= operators (calbal 2.0)
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
20 " Added build-type keywords
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
21 " v1.4: Add benchmark support, thanks to Simon Meier
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
22 " v1.3: Updated to the last version of cabal
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
23 " Added more highlighting for cabal function, true/false
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
24 " and version number. Also added missing comment highlighting.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
25 " Cabal known compiler are highlighted too.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
26 "
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
27 " V1.2: Added cpp-options which was missing. Feature implemented
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
28 " by GHC, found with a GHC warning, but undocumented.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
29 " Whatever...
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
30 "
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
31 " v1.1: Fixed operator problems and added ftdetect file
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
32 " (thanks to Sebastian Schwarz)
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
33 "
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
34 " v1.0: Cabal syntax in vimball format
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
35 " (thanks to Magnus Therning)
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
36
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2206
diff changeset
37 " 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
38 if exists("b:current_syntax")
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
39 finish
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
40 endif
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
41
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
42 " this file uses line continuation
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
43 let s:cpo_save = &cpo
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
44 set cpo&vim
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
45
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
46 " set iskeyword for this syntax script
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
47 syn iskeyword @,48-57,192-255,-
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
48
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
49 " Case sensitive matches
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
50 syn case match
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
51
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
52 syn keyword cabalConditional if else
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
53 syn keyword cabalFunction os arche impl flag
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
54 syn match cabalComment /--.*$/
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
55
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
56 " Case insensitive matches
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
57 syn case ignore
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
58
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
59 syn keyword cabalCategory contained
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
60 \ executable
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
61 \ library
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
62 \ benchmark
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
63 \ test-suite
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
64 \ source-repository
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
65 \ flag
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
66 \ foreign-library
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
67 \ custom-setup
22565
17c4178f26ea Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 13960
diff changeset
68 \ common
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
69 syn match cabalCategoryTitle contained /[^{]*\ze{\?/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
70 syn match cabalCategoryRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
71 \ contains=cabalCategory,cabalCategoryTitle
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
72 \ nextgroup=cabalCategory skipwhite
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
73 \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|foreign-library\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
74 syn keyword cabalTruth true false
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
75
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
76 " cabalStatementRegion which limits the scope of cabalStatement keywords, this
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
77 " way they are not highlighted in description.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
78 syn region cabalStatementRegion start=+^\s*\(--\)\@<!\k\+\s*:+ end=+:+
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
79 syn keyword cabalStatement contained containedin=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
80 \ default-language
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
81 \ default-extensions
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
82 \ author
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
83 \ autogen-includes
22565
17c4178f26ea Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 13960
diff changeset
84 \ autogen-modules
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
85 \ asm-sources
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
86 \ asm-options
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
87 \ branch
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
88 \ bug-reports
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
89 \ build-depends
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
90 \ build-tools
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
91 \ build-tool-depends
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
92 \ build-type
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
93 \ buildable
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
94 \ c-sources
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
95 \ cabal-version
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
96 \ category
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
97 \ cc-options
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
98 \ copyright
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
99 \ cmm-sources
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
100 \ cmm-options
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
101 \ cpp-options
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
102 \ cxx-options
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
103 \ cxx-sources
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
104 \ data-dir
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
105 \ data-files
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
106 \ default
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
107 \ default-extensions
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
108 \ description
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
109 \ executable
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
110 \ exposed-modules
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
111 \ exposed
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
112 \ extensions
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
113 \ extra-bundled-libraries
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
114 \ extra-doc-files
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
115 \ extra-dynamic-library-flavours
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
116 \ extra-framework-dirs
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
117 \ extra-ghci-libraries
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
118 \ extra-lib-dirs
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
119 \ extra-lib-dirs-static
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
120 \ extra-libraries
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
121 \ extra-libraries-static
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
122 \ extra-library-flavours
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
123 \ extra-source-files
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
124 \ extra-tmp-files
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
125 \ for example
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
126 \ frameworks
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
127 \ ghc-options
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
128 \ ghc-prof-options
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
129 \ ghc-shared-options
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
130 \ ghcjs-options
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
131 \ ghcjs-prof-options
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
132 \ ghcjs-shared-options
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
133 \ homepage
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
134 \ hs-source-dir
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
135 \ hs-source-dirs
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
136 \ hugs-options
22565
17c4178f26ea Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 13960
diff changeset
137 \ import
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
138 \ include-dirs
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
139 \ includes
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
140 \ install-includes
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
141 \ js-sources
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
142 \ ld-options
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
143 \ lib-version-info
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
144 \ lib-version-linux
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
145 \ license
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
146 \ license-file
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
147 \ location
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
148 \ main-is
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
149 \ maintainer
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
150 \ manual
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
151 \ mixins
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
152 \ module
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
153 \ mod-def-file
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
154 \ name
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
155 \ nhc98-options
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
156 \ options
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
157 \ other-extensions
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
158 \ other-language
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22565
diff changeset
159 \ other-languages
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
160 \ other-modules
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
161 \ package-url
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
162 \ pkgconfig-depends
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
163 \ scope
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
164 \ setup-depends
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
165 \ signatures
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
166 \ stability
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
167 \ subdir
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
168 \ synopsis
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
169 \ reexported-modules
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
170 \ tag
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
171 \ tested-with
31028
5acd6f02ea35 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
172 \ test-module
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
173 \ type
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
174 \ version
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
175 \ virtual-modules
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
176
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
177 " operators and version operators
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
178 syn match cabalOperator /&&\|||\|!/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
179 syn match cabalVersionOperator contained
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
180 \ /!\|==\|\^\?>=\|<=\|<\|>/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
181 " match version: `[%]\@<!` is to exclude `%20` in http addresses.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
182 syn match cabalVersion contained
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
183 \ /[%$_-]\@<!\<\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
184 " cabalVersionRegion which limits the scope of cabalVersion pattern.
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
185 syn match cabalVersionRegionA
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
186 \ contains=cabalVersionOperator,cabalVersion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
187 \ keepend
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
188 \ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
189 " version inside `version: ...`
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
190 syn match cabalVersionRegionB
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
191 \ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
192 \ /^\s*\%(cabal-\)\?version\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
193
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
194 syn keyword cabalLanguage Haskell98 Haskell2010
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
195
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
196 " title region
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
197 syn match cabalName contained /:\@<=.*/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
198 syn match cabalNameRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
199 \ contains=cabalStatementRegion,cabalName
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
200 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
201 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
202 \ /^\c\s*name\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
203
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
204 " author region
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
205 syn match cabalAuthor contained /:\@<=.*/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
206 syn match cabalAuthorRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
207 \ contains=cabalStatementRegion,cabalStatement,cabalAuthor
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
208 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
209 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
210 \ /^\c\s*author\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
211
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
212 " maintainer region
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
213 syn match cabalMaintainer contained /:\@<=.*/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
214 syn match cabalMaintainerRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
215 \ contains=cabalStatementRegion,cabalStatement,cabalMaintainer
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
216 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
217 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
218 \ /^\c\s*maintainer\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
219
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
220 " license region
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
221 syn match cabalLicense contained /:\@<=.*/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
222 syn match cabalLicenseRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
223 \ contains=cabalStatementRegion,cabalStatement,cabalLicense
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
224 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
225 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
226 \ /^\c\s*license\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
227
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
228 " license-file region
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
229 syn match cabalLicenseFile contained /:\@<=.*/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
230 syn match cabalLicenseFileRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
231 \ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
232 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
233 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
234 \ /^\c\s*license-file\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
235
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
236 " tested-with region with compilers and versions
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
237 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
238 syn match cabalTestedWithRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
239 \ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
240 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
241 \ oneline
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
242 \ /^\c\s*tested-with\s*:.*$/
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
243
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
244 " build type keywords
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
245 syn keyword cabalBuildType contained
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
246 \ simple custom configure
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
247 syn match cabalBuildTypeRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
248 \ contains=cabalStatementRegion,cabalStatement,cabalBuildType
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
249 \ nextgroup=cabalStatementRegion
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
250 \ /^\c\s*build-type\s*:.*$/
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
251
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
252 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2206
diff changeset
253 " Only when an item doesn't have highlighting yet
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
254 hi def link cabalName Title
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
255 hi def link cabalAuthor Normal
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
256 hi def link cabalMaintainer Normal
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
257 hi def link cabalCategoryTitle Title
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
258 hi def link cabalLicense Normal
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
259 hi def link cabalLicenseFile Normal
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
260 hi def link cabalBuildType Keyword
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
261 hi def link cabalVersion Number
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
262 hi def link cabalTruth Boolean
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
263 hi def link cabalComment Comment
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
264 hi def link cabalStatement Statement
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
265 hi def link cabalLanguage Type
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
266 hi def link cabalCategory Type
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
267 hi def link cabalFunction Function
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
268 hi def link cabalConditional Conditional
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
269 hi def link cabalOperator Operator
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
270 hi def link cabalVersionOperator Operator
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
271 hi def link cabalCompiler Constant
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
272
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
273 let b:current_syntax = "cabal"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
274
13960
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
275 let &cpo = s:cpo_save
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
276 unlet! s:cpo_save
bbff863d3cae Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
277
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
278 " vim: ts=8