From 4fcdfa5ad01fd8f7e8c0e044fcf004692c0889d5 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 27 Oct 2023 09:40:31 +0200 Subject: vim-patch:7b7cda67a124 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runtime(debian): update debian related runtime files (vim/vim#13423) * Update Debian runtime files Add mantic as a supported Ubuntu release and move buster/kinetic to unsupported. Add syntax highlighting for deb822sources filetype. Add debsources ftplugin to set relevant comment options. Move common version information to shared/debversions.vim Closes vim/vim#11934 * Add myself as codeowner for Debian-related runtime files --------- https://github.com/vim/vim/commit/7b7cda67a1246874520b280277d9b1447e1a7ef5 Co-authored-by: James McCoy Co-authored-by: Heinrich Schuchardt Co-authored-by: James Addison Co-authored-by: Viktor Szépe Co-authored-by: Heinrich Schuchardt Co-authored-by: James Addison Co-authored-by: Viktor Szépe --- runtime/syntax/deb822sources.vim | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 runtime/syntax/deb822sources.vim (limited to 'runtime/syntax/deb822sources.vim') diff --git a/runtime/syntax/deb822sources.vim b/runtime/syntax/deb822sources.vim new file mode 100644 index 0000000000..81113610e8 --- /dev/null +++ b/runtime/syntax/deb822sources.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" Language: Debian deb822-format source list file +" Maintainer: Debian Vim Maintainers +" Last Change: 2023 May 25 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +" case insensitive +syn case ignore + +" Comments are matched from the first character of a line to the end-of-line +syn region deb822sourcesComment start="^#" end="$" + +" A bunch of useful keywords +syn match deb822sourcesType /\(deb-src\|deb\)/ +syn match deb822sourcesFreeComponent /\(main\|universe\)/ +syn match deb822sourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ + +" Include Debian versioning information +runtime! syntax/shared/debversions.vim + +exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' +exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' + +unlet g:debSharedSupportedVersions +unlet g:debSharedUnsupportedVersions + +syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline + +syn keyword deb822sourcesForce contained force +syn keyword deb822sourcesYesNo contained yes no + +" Match uri's +syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' + +syn match deb822sourcesEntryField "^\%(Types\|URIs\|Suites\|Components\): *" +syn match deb822sourcesOptionField "^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" +syn match deb822sourcesMultiValueOptionField "^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" + +syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline +syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline + +hi def link deb822sourcesComment Comment +hi def link deb822sourcesEntryField Keyword +hi def link deb822sourcesOptionField Special +hi def link deb822sourcesMultiValueOptionField Special +hi def link deb822sourcesBooleanOptionField Special +hi def link deb822sourcesForceBooleanOptionField Special +hi def link deb822sourcesStrictField Error +hi def link deb822sourcesType Identifier +hi def link deb822sourcesFreeComponent Identifier +hi def link deb822sourcesNonFreeComponent Identifier +hi def link deb822sourcesForce Identifier +hi def link deb822sourcesYesNo Identifier +hi def link deb822sourcesUri Constant +hi def link deb822sourcesSupportedSuites Type +hi def link deb822sourcesUnsupportedSuites WarningMsg + +let b:current_syntax = 'deb822sources' -- cgit