Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Preferences/Comments.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.teal</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>-- </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_2</string>
<key>value</key>
<string>--[[</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_2</string>
<key>value</key>
<string>]]</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>3F859481-316B-41E9-ACBF-13013A152FD1</string>
</dict>
</plist>
14 changes: 14 additions & 0 deletions Preferences/Indentation Rules.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.teal - comment - string</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string>(^\s*\b(elsei|elseif|else|end|until)\b.*$|^((?!\{).)*\}\;?.*$)</string>
<key>increaseIndentPattern</key>
<string>(^\s*\b(((local)?[\s\w=]+)?(function|enum|record|interface|macroexp)|repeat|else|elseif|if|while)\b((?!\bend\b).)*$|^.*\b(do|then)\b((?!\bend\b).)*$|^.*\{((?!\}).)*$)</string>
</dict>
</dict>
</plist>
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
This repo provides a TextMate bundle for [Teal](https://github.com/teal-language/tl), a statically-typed dialect of Lua.

The grammar is currently used in [Teal for Visual Studio Code](https://github.com/teal-language/vscode-teal), but it should work in other text editors, too! Feel free to open an issue if you encounter problems with this bundle.


## Developing the Grammar
We update Teal.yaml in `src` and generate the corresponding files in `Syntaxes` using `./script/build.sh`. It is currently using [yaplon](https://github.com/twardoch/yaplon) to generate the syntaxes. It can be installed via `./scripts/setup.sh` or via pip: `pip install yaplon`
Loading