annotate runtime/syntax/cabalconfig.vim @ 25162:c44d6ac81c42 v8.2.3117

patch 8.2.3117: Vim9: type not properly checked in for loop Commit: https://github.com/vim/vim/commit/efc5db5215b4efc424b2de34613525d729a05c93 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 7 21:21:30 2021 +0200 patch 8.2.3117: Vim9: type not properly checked in for loop Problem: Vim9: type not properly checked in for loop. Solution: Have items() return a list of lists. Add runtime type checks. (closes #8515)
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Jul 2021 21:30:03 +0200
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"