diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
commit | 21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch) | |
tree | 84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /runtime/syntax/debsources.vim | |
parent | d9c904f85a23a496df4eb6be42aa43f007b22d50 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-colorcolchar.tar.gz rneovim-colorcolchar.tar.bz2 rneovim-colorcolchar.zip |
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'runtime/syntax/debsources.vim')
-rw-r--r-- | runtime/syntax/debsources.vim | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 9b75797b54..9846cfdef0 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,8 +2,8 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2022 Oct 29 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim +" Last Change: 2023 Oct 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim " Standard syntax initialization if exists('b:current_syntax') @@ -14,44 +14,34 @@ endif syn case match " A bunch of useful keywords -syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/ +syn match debsourcesType /\(deb-src\|deb\)/ +syn match debsourcesFreeComponent /\(main\|universe\)/ +syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ " 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 debsourcesKeyword Statement -hi def link debsourcesDistrKeyword Type -hi def link debsourcesUnsupportedDistrKeyword WarningMsg +hi def link debsourcesType Statement +hi def link debsourcesFreeComponent Statement +hi def link debsourcesNonFreeComponent Statement 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' |