mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2025-12-06 10:04:23 +08:00
Support comments after environment markers
For example:
package; python_version < '3' # Comment
Previously, the environment marker syntax group matched to the end of
the line and didn't stop at the comment character (`#`).
This commit is contained in:
@@ -37,7 +37,7 @@ syn match requirementsPackageName "\v^([a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9])"
|
||||
syn match requirementsExtras "\v\[\S+\]"
|
||||
syn match requirementsVersionControls "\v(git\+?|hg\+|svn\+|bzr\+)\S+"
|
||||
syn match requirementsURLs "\v(\@\s)?(https?|ftp|gopher)://?[^\s/$.?#].\S*"
|
||||
syn match requirementsEnvironmentMarkers "\v;\s.+$"
|
||||
syn match requirementsEnvironmentMarkers "\v;\s[^#]+"
|
||||
|
||||
hi link requirementsComment Comment
|
||||
hi link requirementsCommandOption Special
|
||||
|
||||
Reference in New Issue
Block a user