ObserverOfTime | 2f339aa | 2023-08-13 11:26:20 +0300 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: PyPA manifest |
| 3 | " Maintainer: ObserverOfTime <chronobserver@disroot.org> |
| 4 | " Filenames: MANIFEST.in |
| 5 | " Last Change: 2023 Aug 12 |
| 6 | |
| 7 | if exists('b:current_syntax') |
| 8 | finish |
| 9 | endif |
| 10 | |
| 11 | let s:cpo_save = &cpoptions |
| 12 | set cpoptions&vim |
| 13 | |
| 14 | syn iskeyword @,- |
| 15 | |
| 16 | " Comments |
| 17 | syn keyword pymanifestTodo contained TODO FIXME XXX |
| 18 | syn match pymanifestComment /\\\@1<!#.*/ contains=pymanifestTodo |
| 19 | |
| 20 | " Commands |
| 21 | syn keyword pymanifestCommand |
| 22 | \ include exclude |
Viktor Szépe | 3fc7a7e | 2023-08-23 21:20:00 +0200 | [diff] [blame] | 23 | \ recursive-include recursive-exclude |
ObserverOfTime | 2f339aa | 2023-08-13 11:26:20 +0300 | [diff] [blame] | 24 | \ global-include global-exclude |
| 25 | \ graft prune |
| 26 | |
| 27 | " Globs & character ranges |
| 28 | syn match pymanifestGlob /\*\|\*\*\|?/ |
| 29 | syn match pymanifestRange /\\\@1<!\[.\{-}\]/ |
| 30 | |
| 31 | " Line break |
| 32 | syn match pymanifestLinebreak /\\$\|\\\ze\s\+#/ |
| 33 | |
| 34 | hi def link pymanifestCommand Keyword |
| 35 | hi def link pymanifestComment Comment |
| 36 | hi def link pymanifestGlob SpecialChar |
| 37 | hi def link pymanifestLinebreak SpecialKey |
| 38 | hi def link pymanifestRange Special |
| 39 | hi def link pymanifestTodo Todo |
| 40 | |
| 41 | let b:current_syntax = 'pymanifest' |
| 42 | |
| 43 | let &cpoptions = s:cpo_save |
| 44 | unlet s:cpo_save |