annotate runtime/syntax/requirements.vim @ 35784:43ea277664a6

Added tag v9.1.0613 for changeset 9dd6970e4bdf127bee6f35932e8926ac771024a9
author Christian Brabandt <cb@256bit.org>
date Wed, 24 Jul 2024 21:45:04 +0200
parents 84bd7cb1251d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34938
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " the Requirements File Format syntax support for Vim
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Version: 1.8.0
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Author: raimon <raimon49@hotmail.com>
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " Upstream: https://github.com/raimon49/requirements.txt.vim
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " License: MIT LICENSE
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " The MIT License (MIT)
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 "
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 " Copyright (c) 2015 raimon
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 "
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 " Permission is hereby granted, free of charge, to any person obtaining a copy
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 " of this software and associated documentation files (the "Software"), to deal
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 " in the Software without restriction, including without limitation the rights
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 " copies of the Software, and to permit persons to whom the Software is
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 " furnished to do so, subject to the following conditions:
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 "
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 " The above copyright notice and this permission notice shall be included in all
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 " copies or substantial portions of the Software.
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 "
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 " SOFTWARE.
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 if exists("b:current_syntax") && b:current_syntax == "requirements"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 finish
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 endif
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 syn case match
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 " https://pip.pypa.io/en/stable/reference/requirements-file-format/
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 " https://pip.pypa.io/en/stable/reference/inspect-report/#example
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 syn keyword requirementsKeyword implementation_name implementation_version os_name platform_machine platform_release platform_system platform_version python_full_version platform_python_implementation python_version sys_platform contained
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 syn region requirementsSubst matchgroup=requirementsSubstDelim start="\V${" end="\V}"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 syn region requirementsString matchgroup=requirementsStringDelim start=`'` skip=`\\'` end=`'`
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 syn region requirementsString matchgroup=requirementsStringDelim start=`"` skip=`\\"` end=`"`
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 syn match requirementsVersion "\v\d+[a-zA-Z0-9\.\-\*]*"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 syn region requirementsComment start="[ \t]*#" end="$"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 syn match requirementsCommandOption "\v^\[?--?[a-zA-Z\-]*\]?"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 syn match requirementsVersionSpecifiers "\v(\=\=\=?|\<\=?|\>\=?|\~\=|\!\=)"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 syn match requirementsPackageName "\v^([a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9])"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 syn match requirementsExtras "\v\[\S+\]"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 syn match requirementsVersionControls "\v(git\+?|hg\+|svn\+|bzr\+).*://.\S+"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 syn match requirementsURLs "\v(\@\s)?(https?|ftp|gopher)://?[^\s/$.?#].\S*"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 syn match requirementsEnvironmentMarkers "\v;\s[^#]+" contains=requirementsKeyword,requirementsVersionSpecifiers,requirementsString
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 hi def link requirementsKeyword Keyword
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 hi def link requirementsSubstDelim Delimiter
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 hi def link requirementsSubst PreProc
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 hi def link requirementsStringDelim Delimiter
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 hi def link requirementsString String
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 hi def link requirementsVersion Number
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 hi def link requirementsComment Comment
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 hi def link requirementsCommandOption Special
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 hi def link requirementsVersionSpecifiers Boolean
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 hi def link requirementsPackageName Identifier
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 hi def link requirementsExtras Type
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 hi def link requirementsVersionControls Underlined
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 hi def link requirementsURLs Underlined
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 hi def link requirementsEnvironmentMarkers Macro
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 let b:current_syntax = "requirements"
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66
84bd7cb1251d patch 9.1.0326: filetype: some requirements files are not recognized
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 " vim: et sw=4 ts=4 sts=4: