Closed Freed-Wu closed 2 years ago
The upstream issue tracking tmLanguage support in the syntax highlighting library we use is https://github.com/trishume/syntect/issues/418
Thanks, I have followed https://forum.sublimetext.com/t/trying-to-convert-tmlanguage-syntax-to-sublime-syntax/53427 to convert https://github.com/wuub/requirementstxt/blob/master/requirementstxt.tmLanguage to *.sublime-syntax
. However, it highlights seems to have some bugs. I'll take a look at it.
%YAML 1.2
---
# http://www.sublimetext.com/docs/syntax.html
name: requirements.txt
scope: source.requirementstxt
file_extensions:
- requirements.txt
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
https://github.com/raimon49/requirements.txt.vim/blob/master/examples/requirements.txt
http://www.sublimetext.com/docs/syntax.html
Can bat support
*.tmLanguage
? I notice https://github.com/wuub/requirementstxt/ only provide*.tmLanguage
not*.sublime-syntax
. It seemsbat
don't support it. Thanks!