Add 'requirements.txt' syntax

This commit is contained in:
sharkdp 2019-05-31 20:51:00 +02:00
parent 8ec96da9f0
commit c7d08cfcfd
3 changed files with 23 additions and 0 deletions

3
.gitmodules vendored
View File

@ -129,3 +129,6 @@
[submodule "assets/syntaxes/Org mode"]
path = assets/syntaxes/Org mode
url = https://github.com/jezcope/Org.tmbundle.git
[submodule "assets/syntaxes/requirementstxt"]
path = assets/syntaxes/requirementstxt
url = https://github.com/wuub/requirementstxt

1
assets/syntaxes/requirementstxt vendored Submodule

@ -0,0 +1 @@
Subproject commit 775e6dd62aa16f7b28632a200882ff6ad0315b01

View File

@ -0,0 +1,19 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: requirements.txt
file_extensions:
- requirements.txt
scope: source.requirementstxt
contexts:
main:
- match: (#).*$\n?
scope: comment.line.requirementstxt
captures:
1: punctuation.definition.comment.requirementstxt
- match: '(?i)^[a-z0-9_\-\.]+'
scope: string.package_name.requirementstxt
- match: (?i)==|<|<=|>=|>
scope: keyword.operator.logical.punctuation.requirementstxt
- match: '(?i)\d+\.[\da-z\-_\.]*'
scope: constant.numeric.verions.requirementstxt