annotate runtime/syntax/cabalconfig.vim @ 26588:c929ca14d8a9

Added tag v8.2.3823 for changeset b2bbc72183a5a95aab5201d35b8617cc7736b4a7
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 Dec 2021 11:15:04 +0100
parents 29c5f168c6fd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Cabal Config
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: profunctor@pm.me
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: Marcin Szamotulski
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Original Author: Marcin Szamotulski
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:current_syntax")
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 syn match CabalConfigSection /^\S[[:alpha:]]\+\%(-[[:alpha:]]\+\)*[^:]*$/
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 syn region CabalConfigRegion matchgroup=CabalConfigKey start=/^\s*[[:alpha:]]\+\%(-[[:alpha:]]\+\)*:/ matchgroup=NONE end=/$/ contains=CabalConfigSeparator,CabalConfigKeyword,CabalConfigPath keepend
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syn match CabalConfigComment /^\s*--.*$/
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn match CabalConfigValue /.*$/ contained
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 syn match CabalConfigKey /[[:alpha:]]\+\%(-[[:alpha:]]\+\)*\ze:/
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn keyword CabalConfigSeparator : contained
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn match CabalConfigVariable /\$[[:alpha:]]\+/
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 syn keyword CabalConfigKeyword True False ghc
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn match CabalConfigPath /\%([[:alpha:]]\+:\)\?\%(\/[[:print:]]\+\)\+/
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 hi def link CabalConfigComment Comment
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 hi def link CabalConfigSection Title
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 hi def link CabalConfigKey Statement
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 hi def link CabalConfigSeparator NonText
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 hi def link CabalConfigValue Normal
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 hi def link CabalConfigVariable Identifier
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 hi def link CabalConfigKeyword Keyword
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 hi def link CabalConfigPath Directory
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 let b:current_syntax = "cabal.config"