Skip to content

Commit

Permalink
[D] Syntax rewrite (#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminSchaaf authored and wbond committed Feb 27, 2019
1 parent ade0bec commit 5d52e08
Show file tree
Hide file tree
Showing 21 changed files with 4,933 additions and 356 deletions.
78 changes: 69 additions & 9 deletions D/Comments.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>/*</string>
<string>//</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END</string>
<string>TM_COMMENT_START_2</string>
<key>value</key>
<string>*/</string>
<string>/*</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_MODE</string>
<string>TM_COMMENT_END_2</string>
<key>value</key>
<string>block</string>
<string>*/</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_DISABLE_INDENT</string>
<string>TM_COMMENT_MODE_2</string>
<key>value</key>
<string>yes</string>
<string>block</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_2</string>
<string>TM_COMMENT_DISABLE_INDENT_2</string>
<key>value</key>
<string>//</string>
<string>yes</string>
</dict>
<dict>
<key>name</key>
Expand All @@ -57,6 +57,66 @@
<key>value</key>
<string>block</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_DISABLE_INDENT_3</string>
<key>value</key>
<string>yes</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_4</string>
<key>value</key>
<string>///</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_5</string>
<key>value</key>
<string>/**</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_5</string>
<key>value</key>
<string>*/</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_MODE_5</string>
<key>value</key>
<string>block</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_DISABLE_INDENT_5</string>
<key>value</key>
<string>yes</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_6</string>
<key>value</key>
<string>/++</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_6</string>
<key>value</key>
<string>+/</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_MODE_6</string>
<key>value</key>
<string>block</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_DISABLE_INDENT_6</string>
<key>value</key>
<string>yes</string>
</dict>
</array>
</dict>
</dict>
Expand Down
12 changes: 12 additions & 0 deletions D/Completion Rules.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.d</string>
<key>settings</key>
<dict>
<key>cancelCompletion</key>
<string>^\s*(\}?\s*(else|try|do|finally|synchonized|struct|union|unittest|debug)|(class|struct|interface|union)\s*[a-zA-Z_0-9]+*)$</string>
</dict>
</dict>
</plist>
8 changes: 8 additions & 0 deletions D/D dub.sublime-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"shell_cmd": "dub build",
"file_regex": "^(.*?)\\(([0-9]+)(,[0-9]+)?\\)",
"working_dir": "${folder:${project_path:${file_path}}}",
"selector": "source.d",
"syntax": "Packages/D/DMD Output.sublime-syntax",
"keyfiles": ["dub.sdl", "dub.json"],
}
15 changes: 12 additions & 3 deletions D/D.sublime-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"cmd": ["dmd", "$file"],
"file_regex": "^(.*?)\\(([0-9]+)\\)",
"selector": "source.d"
"shell_cmd": "dmd \"$file\"",
"file_regex": "^(.*?)\\(([0-9]+)(,[0-9]+)?\\)",
"selector": "source.d",
"syntax": "Packages/D/DMD Output.sublime-syntax",

"variants":
[
{
"name": "Run",
"shell_cmd": "rdmd \"$file\"",
}
]
}
Loading

0 comments on commit 5d52e08

Please sign in to comment.