Skip to content

Commit

Permalink
Merge pull request #2 from PRGfx/master
Browse files Browse the repository at this point in the history
Updated completions and added snippets
  • Loading branch information
Anthodev committed Oct 19, 2015
2 parents 5fcd739 + 199b2fd commit fba50cf
Show file tree
Hide file tree
Showing 9 changed files with 6,691 additions and 1,101 deletions.
36 changes: 36 additions & 0 deletions 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 Computer//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.ms</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>301e76f4-fe97-49cb-9256-b9c9e79c945b</string>
</dict>
</plist>
7,681 changes: 6,584 additions & 1,097 deletions ManiaScript.sublime-completions

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ManiaScript.tmLanguage

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,42 @@ These files define a language grammar for syntax highlighting ManiaScript files.
- Highlight most of the ManiaScript classes/enums/variables
- You can autocomplete some ManiaScript functions and classes

### Snippets
<table>
<tr>
<th>Snippet</th>
<th>Trigger</th>
<th>Output</th>
</tr>
<tr>
<td>#Include frame</td>
<td>Include</td>
<td>`#Include "..." as ...`</td>
</tr>
<tr>
<td>declare</td>
<td>dec</td>
<td>`declare ... ...;`</td>
</tr>
<tr>
<td>declare persistent</td>
<td>dec:p</td>
<td>`declare persistent ... ... for ...;`</td>
</tr>
<tr>
<td>function</td>
<td>fun</td>
<td>```... ... (...) {
...
}```</td>
</tr>
<tr>
<td>cast</td>
<td>via strg+shift+p</td>
<td>`(<Selection> as ...)`</td>
</tr>
</table>


Contribution
------------
Expand Down
5 changes: 5 additions & 0 deletions cast.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<snippet>
<content><![CDATA[(${1:$TM_CURRENT_WORD} as ${2:Type})]]></content>
<scope>source.ms</scope>
<description>ManiaScript Cast</description>
</snippet>
6 changes: 6 additions & 0 deletions declare-persistent.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[declare persistent ${1:Type} ${2:Name} for ${3:Context};]]></content>
<tabTrigger>dec:p</tabTrigger>
<scope>source.ms</scope>
<description>declare persistent</description>
</snippet>
6 changes: 6 additions & 0 deletions declare.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[declare ${1:Type} ${2:Name};]]></content>
<tabTrigger>dec</tabTrigger>
<scope>source.ms</scope>
<description>declare</description>
</snippet>
8 changes: 8 additions & 0 deletions function.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[${1:Type} ${2:Name} (${3:Arguments}) {
$4
}]]></content>
<tabTrigger>fun</tabTrigger>
<scope>source.ms</scope>
<description>Function</description>
</snippet>
6 changes: 6 additions & 0 deletions include.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[#Include "${1:Library}" as ${2:$1}]]></content>
<tabTrigger>Include</tabTrigger>
<scope>source.ms</scope>
<description>#Include</description>
</snippet>

0 comments on commit fba50cf

Please sign in to comment.