Mercurial > vim
comparison runtime/syntax/deb822sources.vim @ 34438:f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Commit: https://github.com/vim/vim/commit/c7ddc9b73543d4b3b906b56948dc9a6861150e12
Author: James McCoy <jamessan@jamessan.com>
Date: Tue Feb 27 01:34:45 2024 -0500
runtime(debian): update Debian syntax files (https://github.com/vim/vim/issues/14098)
* debversions.vim: Move lunar to unsupported release
* debsources: Add word boundaries around keyword match patterns
Co-authored-by: James Addison <jay@jp-hosting.net>
Signed-off-by: James Addison <jay@jp-hosting.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 27 Feb 2024 07:45:04 +0100 |
parents | c6d5af39dc7f |
children | 15d2d82ff285 |
comparison
equal
deleted
inserted
replaced
34437:4f26c67bbf00 | 34438:f8951966ef0c |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Debian deb822-format source list file | 2 " Language: Debian deb822-format source list file |
3 " Maintainer: Debian Vim Maintainers | 3 " Maintainer: Debian Vim Maintainers |
4 " Last Change: 2023 May 25 | 4 " Last Change: 2024 Jan 30 |
5 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim | 5 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim |
6 | 6 |
7 " Standard syntax initialization | 7 " Standard syntax initialization |
8 if exists('b:current_syntax') | 8 if exists('b:current_syntax') |
9 finish | 9 finish |
10 endif | 10 endif |
11 | 11 |
12 " case insensitive | 12 " case insensitive |
13 syn case ignore | 13 syn case ignore |
14 | 14 |
15 " A bunch of useful keywords | |
16 syn match deb822sourcesType /\<\(deb-src\|deb\)\ */ contained | |
17 syn match deb822sourcesFreeComponent /\<\(main\|universe\)\> */ contained | |
18 syn match deb822sourcesNonFreeComponent /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\> */ contained | |
19 | |
15 " Comments are matched from the first character of a line to the end-of-line | 20 " Comments are matched from the first character of a line to the end-of-line |
16 syn region deb822sourcesComment start="^#" end="$" | 21 syn region deb822sourcesComment start="^#" end="$" |
17 | |
18 " A bunch of useful keywords | |
19 syn match deb822sourcesType /\(deb-src\|deb\)/ | |
20 syn match deb822sourcesFreeComponent /\(main\|universe\)/ | |
21 syn match deb822sourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ | |
22 | 22 |
23 " Include Debian versioning information | 23 " Include Debian versioning information |
24 runtime! syntax/shared/debversions.vim | 24 runtime! syntax/shared/debversions.vim |
25 | 25 |
26 exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' | 26 exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+' |
27 exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' | 27 exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+' |
28 | 28 |
29 unlet g:debSharedSupportedVersions | 29 unlet g:debSharedSupportedVersions |
30 unlet g:debSharedUnsupportedVersions | 30 unlet g:debSharedUnsupportedVersions |
31 | 31 |
32 syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline | 32 syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline |
35 syn keyword deb822sourcesYesNo contained yes no | 35 syn keyword deb822sourcesYesNo contained yes no |
36 | 36 |
37 " Match uri's | 37 " Match uri's |
38 syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' | 38 syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' |
39 | 39 |
40 syn match deb822sourcesEntryField "^\%(Types\|URIs\|Suites\|Components\): *" | 40 syn region deb822sourcesStrictField matchgroup=deb822sourcesEntryField start="^\%(Types\|URIs\|Suites\|Components\): *" end="$" contains=deb822sourcesType,deb822sourcesUri,deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites,deb822sourcesFreeComponent,deb822sourcesNonFreeComponent oneline |
41 syn match deb822sourcesOptionField "^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" | 41 syn region deb822sourcesField matchgroup=deb822sourcesOptionField start="^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" end="$" oneline |
42 syn match deb822sourcesMultiValueOptionField "^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" | 42 syn region deb822sourcesField matchgroup=deb822sourcesMultiValueOptionField start="^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" end="$" oneline |
43 | |
44 syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline | 43 syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline |
45 syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline | 44 syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline |
46 | 45 |
46 hi def link deb822sourcesField Default | |
47 hi def link deb822sourcesComment Comment | 47 hi def link deb822sourcesComment Comment |
48 hi def link deb822sourcesEntryField Keyword | 48 hi def link deb822sourcesEntryField Keyword |
49 hi def link deb822sourcesOptionField Special | 49 hi def link deb822sourcesOptionField Special |
50 hi def link deb822sourcesMultiValueOptionField Special | 50 hi def link deb822sourcesMultiValueOptionField Special |
51 hi def link deb822sourcesBooleanOptionField Special | 51 hi def link deb822sourcesBooleanOptionField Special |