mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2025-12-06 10:04:23 +08:00
Support handling 'current_syntax'
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
" Author: raimon <raimon49@hotmail.com>
|
||||
" License: MIT LICENSE
|
||||
|
||||
if exists("b:current_syntax") && b:current_syntax == "requirements"
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match requirementsComment "#.*$"
|
||||
syn match requirementsCommandOption "\v^\[?--?[a-zA-Z\-]*\]?"
|
||||
syn match requirementsVersionSpecifiers "\v(\=\=\=?|\<\=?|\>\=?|\~\=|\!\=)"
|
||||
@@ -13,4 +17,6 @@ hi link requirementsCommandOption Special
|
||||
hi link requirementsVersionspecifiers Boolean
|
||||
hi link requirementsPackageName Identifier
|
||||
|
||||
let b:current_syntax = "requirements"
|
||||
|
||||
" vim: et sw=4 ts=4 sts=4:
|
||||
|
||||
Reference in New Issue
Block a user