aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/debsources.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-10-27 09:40:31 +0200
committerChristian Clason <c.clason@uni-graz.at>2023-10-27 10:06:52 +0200
commit4fcdfa5ad01fd8f7e8c0e044fcf004692c0889d5 (patch)
tree7c281e51be467df2065d6766050310bed2bbb9bd /runtime/syntax/debsources.vim
parent5753e5e7ebb60d26d78aa3c99a8b0e2ee8023056 (diff)
downloadrneovim-4fcdfa5ad01fd8f7e8c0e044fcf004692c0889d5.tar.gz
rneovim-4fcdfa5ad01fd8f7e8c0e044fcf004692c0889d5.tar.bz2
rneovim-4fcdfa5ad01fd8f7e8c0e044fcf004692c0889d5.zip
vim-patch:7b7cda67a124
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 <jamessan@jamessan.com> Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Co-authored-by: James Addison <jay@jp-hosting.net> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Co-authored-by: James Addison <jay@jp-hosting.net> Co-authored-by: Viktor Szépe <viktor@szepe.net>
Diffstat (limited to 'runtime/syntax/debsources.vim')
-rw-r--r--runtime/syntax/debsources.vim40
1 files changed, 13 insertions, 27 deletions
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index cbb3b36c10..9846cfdef0 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2023 Feb 06
+" Last Change: 2023 Oct 11
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
" Standard syntax initialization
@@ -21,41 +21,27 @@ syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|
" Match comments
syn match debsourcesComment /#.*/ contains=@Spell
-let s:cpo = &cpo
-set cpo-=C
-let s:supported = [
- \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
- \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
- \
- \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
- \ 'devel'
- \ ]
-let s:unsupported = [
- \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
- \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
- \ 'jessie', 'stretch',
- \
- \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
- \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
- \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
- \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
- \ ]
-let &cpo=s:cpo
+" Include Debian versioning information
+runtime! syntax/shared/debversions.vim
+
+exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
+exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
+
+unlet g:debSharedSupportedVersions
+unlet g:debSharedUnsupportedVersions
" Match uri's
syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
-exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
-exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
+syn region debsourcesLine start="^" end="$" contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword oneline
+
" Associate our matches and regions with pretty colours
-hi def link debsourcesLine Error
hi def link debsourcesType Statement
hi def link debsourcesFreeComponent Statement
hi def link debsourcesNonFreeComponent Statement
-hi def link debsourcesDistrKeyword Type
-hi def link debsourcesUnsupportedDistrKeyword WarningMsg
hi def link debsourcesComment Comment
hi def link debsourcesUri Constant
+hi def link debsourcesDistrKeyword Type
+hi def link debsourcesUnsupportedDistrKeyword WarningMsg
let b:current_syntax = 'debsources'