aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/debchangelog.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /runtime/syntax/debchangelog.vim
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.gz
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.bz2
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'runtime/syntax/debchangelog.vim')
-rw-r--r--runtime/syntax/debchangelog.vim59
1 files changed, 22 insertions, 37 deletions
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 691c3778c1..da35a6a10b 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,8 +3,8 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2022 Oct 29
-" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
+" Last Change: 2023 Oct 11
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debchangelog.vim
" Standard syntax initialization
if exists('b:current_syntax')
@@ -17,34 +17,19 @@ syn case ignore
let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\='
let s:binNMU='binary-only=yes'
-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 = [
- \ 'frozen', '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 debchangelogTarget contained "\%( \%('.join(g:debSharedSupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'
+exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(g:debSharedUnsupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'
+
+unlet g:debSharedSupportedVersions
+unlet g:debSharedUnsupportedVersions
" Define some common expressions we can use later on
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
-exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"'
-exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"'
syn match debchangelogUnreleased contained / UNRELEASED/
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
@@ -58,19 +43,19 @@ syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail
syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline
" Associate our matches and regions with pretty colours
-hi def link debchangelogHeader Error
-hi def link debchangelogFooter Identifier
-hi def link debchangelogEntry Normal
-hi def link debchangelogCloses Statement
-hi def link debchangelogLP Statement
-hi def link debchangelogFirstKV Identifier
-hi def link debchangelogOtherKV Identifier
-hi def link debchangelogName Comment
-hi def link debchangelogVersion Identifier
-hi def link debchangelogTarget Identifier
-hi def link debchangelogUnsupportedTarget Identifier
+hi def link debchangelogHeader Error
+hi def link debchangelogFooter Identifier
+hi def link debchangelogEntry Normal
+hi def link debchangelogCloses Statement
+hi def link debchangelogLP Statement
+hi def link debchangelogFirstKV Identifier
+hi def link debchangelogOtherKV Identifier
+hi def link debchangelogName Comment
+hi def link debchangelogVersion Identifier
hi def link debchangelogUnreleased WarningMsg
-hi def link debchangelogEmail Special
+hi def link debchangelogEmail Special
+hi def link debchangelogTarget Identifier
+hi def link debchangelogUnsupportedTarget Identifier
let b:current_syntax = 'debchangelog'