-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change will make this language usable as a TextMate Bundle. I have used my name/email as contact for the Bundle. Feel free to change. - Add UUID's to tmLanguage and tmPreferences to make them work with TextMate - Add Build, Run, Fmt and Test tmCommands - Run Fmt on save - Symlink Comments.tmPreferences to TextMate location - Add install instructions - Add info.plist required by TextMate
- Loading branch information
Showing
16 changed files
with
386 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
autoScrollOutput: true | ||
beforeRunningCommand: saveModifiedFiles | ||
command: '#!/usr/bin/env ruby18 | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
|
||
|
||
TextMate.save_if_untitled(''zig'') | ||
|
||
TextMate::Executor.make_project_master_current_document | ||
|
||
|
||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "build-exe", ENV["TM_FILEPATH"], | ||
:create_error_pipe => true) ' | ||
input: document | ||
inputFormat: text | ||
keyEquivalent: '@b' | ||
name: Build | ||
outputCaret: afterOutput | ||
outputFormat: html | ||
outputLocation: newWindow | ||
requiredCommands: | ||
- command: zig | ||
locations: | ||
- /opt/local/bin/zig | ||
- /usr/local/bin/zig | ||
- /usr/local/zig/bin/zig | ||
variable: TM_ZIG | ||
scope: source.zig | ||
uuid: C9E6A57F-7472-445A-BF41-292C8D5F183C | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?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>autoScrollOutput</key> | ||
<true/> | ||
<key>beforeRunningCommand</key> | ||
<string>saveModifiedFiles</string> | ||
<key>command</key> | ||
<string>#!/usr/bin/env ruby18 | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
TextMate.save_if_untitled('zig') | ||
TextMate::Executor.make_project_master_current_document | ||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "build-exe", ENV["TM_FILEPATH"], :create_error_pipe => true) </string> | ||
<key>input</key> | ||
<string>document</string> | ||
<key>inputFormat</key> | ||
<string>text</string> | ||
<key>keyEquivalent</key> | ||
<string>@b</string> | ||
<key>name</key> | ||
<string>Build</string> | ||
<key>outputCaret</key> | ||
<string>afterOutput</string> | ||
<key>outputFormat</key> | ||
<string>html</string> | ||
<key>outputLocation</key> | ||
<string>newWindow</string> | ||
<key>requiredCommands</key> | ||
<array> | ||
<dict> | ||
<key>command</key> | ||
<string>zig</string> | ||
<key>locations</key> | ||
<array> | ||
<string>/opt/local/bin/zig</string> | ||
<string>/usr/local/bin/zig</string> | ||
<string>/usr/local/zig/bin/zig</string> | ||
</array> | ||
<key>variable</key> | ||
<string>TM_ZIG</string> | ||
</dict> | ||
</array> | ||
<key>scope</key> | ||
<string>source.zig</string> | ||
<key>uuid</key> | ||
<string>C9E6A57F-7472-445A-BF41-292C8D5F183C</string> | ||
<key>version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
beforeRunningCommand: nop | ||
command: "#!/usr/bin/env bash\n\n# shellcheck source=/dev/null\n. \"${TM_SUPPORT_PATH}/lib/bash_init.sh\"\ | ||
\n\nset -e \n\nPATH=/opt/local/bin:/usr/local/bin:/usr/local/zig/bin:$PATH\n \ | ||
\ \nrequire_cmd zig\n\ntmpfile=$(mktemp \"${TMPDIR:-/tmp/}zig-fmt.XXXXXX\")\n\ | ||
cat - > \"$tmpfile\"\n\nif ! error=$(\"${TM_ZIG:-zig}\" fmt \"$tmpfile\" 2>&1);then\n\ | ||
\ exit_show_tool_tip \"${error//$tmpfile/$(basename \"$TM_FILEPATH\")}\"\nfi\n\ | ||
\ncat \"$tmpfile\"\nrm \"$tmpfile\"\n" | ||
input: document | ||
inputFormat: text | ||
keyEquivalent: '' | ||
name: Fmt | ||
outputCaret: interpolateByLine | ||
outputFormat: text | ||
outputLocation: replaceDocument | ||
requiredCommands: | ||
- command: zig | ||
locations: | ||
- /opt/local/bin/zig | ||
- /usr/local/bin/zig | ||
- /usr/local/zig/bin/zig | ||
variable: TM_ZIG | ||
scope: source.zig | ||
semanticClass: callback.document.will-save | ||
uuid: BC972D6E-23AC-4EAD-AF7D-A33564F09433 | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?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>beforeRunningCommand</key> | ||
<string>nop</string> | ||
<key>command</key> | ||
<string>#!/usr/bin/env bash | ||
# shellcheck source=/dev/null | ||
. "${TM_SUPPORT_PATH}/lib/bash_init.sh" | ||
set -e | ||
PATH=/opt/local/bin:/usr/local/bin:/usr/local/zig/bin:$PATH | ||
require_cmd zig | ||
tmpfile=$(mktemp "${TMPDIR:-/tmp/}zig-fmt.XXXXXX") | ||
cat - > "$tmpfile" | ||
if ! error=$("${TM_ZIG:-zig}" fmt "$tmpfile" 2>&1);then | ||
exit_show_tool_tip "${error//$tmpfile/$(basename "$TM_FILEPATH")}" | ||
fi | ||
cat "$tmpfile" | ||
rm "$tmpfile" | ||
</string> | ||
<key>input</key> | ||
<string>document</string> | ||
<key>inputFormat</key> | ||
<string>text</string> | ||
<key>keyEquivalent</key> | ||
<string></string> | ||
<key>name</key> | ||
<string>Fmt</string> | ||
<key>outputCaret</key> | ||
<string>interpolateByLine</string> | ||
<key>outputFormat</key> | ||
<string>text</string> | ||
<key>outputLocation</key> | ||
<string>replaceDocument</string> | ||
<key>requiredCommands</key> | ||
<array> | ||
<dict> | ||
<key>command</key> | ||
<string>zig</string> | ||
<key>locations</key> | ||
<array> | ||
<string>/opt/local/bin/zig</string> | ||
<string>/usr/local/bin/zig</string> | ||
<string>/usr/local/zig/bin/zig</string> | ||
</array> | ||
<key>variable</key> | ||
<string>TM_ZIG</string> | ||
</dict> | ||
</array> | ||
<key>scope</key> | ||
<string>source.zig</string> | ||
<key>semanticClass</key> | ||
<string>callback.document.will-save</string> | ||
<key>uuid</key> | ||
<string>BC972D6E-23AC-4EAD-AF7D-A33564F09433</string> | ||
<key>version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
autoScrollOutput: true | ||
beforeRunningCommand: saveModifiedFiles | ||
command: '#!/usr/bin/env ruby18 | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
|
||
|
||
TextMate.save_if_untitled(''zig'') | ||
|
||
TextMate::Executor.make_project_master_current_document | ||
|
||
|
||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "run", ENV["TM_FILEPATH"], :create_error_pipe | ||
=> true)' | ||
input: document | ||
inputFormat: text | ||
keyEquivalent: '@r' | ||
name: Run | ||
outputCaret: afterOutput | ||
outputFormat: html | ||
outputLocation: newWindow | ||
requiredCommands: | ||
- command: zig | ||
locations: | ||
- /opt/local/bin/zig | ||
- /usr/local/bin/zig | ||
- /usr/local/zig/bin/zig | ||
variable: TM_ZIG | ||
scope: source.zig | ||
uuid: 0B3C3EB0-9F51-4997-A87D-ECA507D8E31E | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?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>autoScrollOutput</key> | ||
<true/> | ||
<key>beforeRunningCommand</key> | ||
<string>saveModifiedFiles</string> | ||
<key>command</key> | ||
<string>#!/usr/bin/env ruby18 | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
TextMate.save_if_untitled('zig') | ||
TextMate::Executor.make_project_master_current_document | ||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "run", ENV["TM_FILEPATH"], :create_error_pipe => true)</string> | ||
<key>input</key> | ||
<string>document</string> | ||
<key>inputFormat</key> | ||
<string>text</string> | ||
<key>keyEquivalent</key> | ||
<string>@r</string> | ||
<key>name</key> | ||
<string>Run</string> | ||
<key>outputCaret</key> | ||
<string>afterOutput</string> | ||
<key>outputFormat</key> | ||
<string>html</string> | ||
<key>outputLocation</key> | ||
<string>newWindow</string> | ||
<key>requiredCommands</key> | ||
<array> | ||
<dict> | ||
<key>command</key> | ||
<string>zig</string> | ||
<key>locations</key> | ||
<array> | ||
<string>/opt/local/bin/zig</string> | ||
<string>/usr/local/bin/zig</string> | ||
<string>/usr/local/zig/bin/zig</string> | ||
</array> | ||
<key>variable</key> | ||
<string>TM_ZIG</string> | ||
</dict> | ||
</array> | ||
<key>scope</key> | ||
<string>source.zig</string> | ||
<key>uuid</key> | ||
<string>0B3C3EB0-9F51-4997-A87D-ECA507D8E31E</string> | ||
<key>version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
autoScrollOutput: true | ||
beforeRunningCommand: saveModifiedFiles | ||
command: '#!/usr/bin/env ruby18 | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
|
||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
|
||
|
||
TextMate.save_if_untitled(''zig'') | ||
|
||
TextMate::Executor.make_project_master_current_document | ||
|
||
|
||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "test", ENV["TM_FILEPATH"], :create_error_pipe | ||
=> true)' | ||
input: document | ||
inputFormat: text | ||
keyEquivalent: '@R' | ||
name: Test | ||
outputCaret: afterOutput | ||
outputFormat: html | ||
outputLocation: newWindow | ||
requiredCommands: | ||
- command: zig | ||
locations: | ||
- /opt/local/bin/zig | ||
- /usr/local/bin/zig | ||
- /usr/local/zig/bin/zig | ||
variable: TM_ZIG | ||
scope: source.zig | ||
uuid: C679259A-BAFB-4895-917B-7663645C9B5F | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?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>autoScrollOutput</key> | ||
<true/> | ||
<key>beforeRunningCommand</key> | ||
<string>saveModifiedFiles</string> | ||
<key>command</key> | ||
<string>#!/usr/bin/env ruby18 | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | ||
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | ||
TextMate.save_if_untitled('zig') | ||
TextMate::Executor.make_project_master_current_document | ||
TextMate::Executor.run(ENV["TM_ZIG"] || "zig", "test", ENV["TM_FILEPATH"], :create_error_pipe => true)</string> | ||
<key>input</key> | ||
<string>document</string> | ||
<key>inputFormat</key> | ||
<string>text</string> | ||
<key>keyEquivalent</key> | ||
<string>@R</string> | ||
<key>name</key> | ||
<string>Test</string> | ||
<key>outputCaret</key> | ||
<string>afterOutput</string> | ||
<key>outputFormat</key> | ||
<string>html</string> | ||
<key>outputLocation</key> | ||
<string>newWindow</string> | ||
<key>requiredCommands</key> | ||
<array> | ||
<dict> | ||
<key>command</key> | ||
<string>zig</string> | ||
<key>locations</key> | ||
<array> | ||
<string>/opt/local/bin/zig</string> | ||
<string>/usr/local/bin/zig</string> | ||
<string>/usr/local/zig/bin/zig</string> | ||
</array> | ||
<key>variable</key> | ||
<string>TM_ZIG</string> | ||
</dict> | ||
</array> | ||
<key>scope</key> | ||
<string>source.zig</string> | ||
<key>uuid</key> | ||
<string>C679259A-BAFB-4895-917B-7663645C9B5F</string> | ||
<key>version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Support/Comments.tmPreferences |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,7 @@ | |
</dict> | ||
</array> | ||
</dict> | ||
<key>uuid</key> | ||
<string>BAB3200A-F546-4902-AC4B-A6D545F6AA07</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.