Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 104 additions and 2 deletions.
  1. +102 −2 contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage
  2. +2 −0 contrib/install-tmbundle
View
104 contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage
@@ -12,7 +12,7 @@
<key>firstLineMatch</key>
<string>^#!/usr/bin/env\s+julia\s*$</string>
<key>foldingStartMarker</key>
- <string>^\s*(?:if|while|for|begin|function|struct|macro|module)\b(?!.*\bend\b).*$</string>
+ <string>^\s*(?:if|while|for|begin|function|struct|macro|module|type)\b(?!.*\bend\b).*$</string>
<key>foldingStopMarker</key>
<string>^\s*(?:end)\b.*$</string>
<key>name</key>
@@ -21,6 +21,18 @@
<array>
<dict>
<key>include</key>
+ <string>#function_decl</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#function_call</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#type_decl</string>
+ </dict>
+ <dict>
+ <key>include</key>
<string>#keyword</string>
</dict>
<dict>
@@ -78,13 +90,76 @@
</dict>
</array>
</dict>
+ <key>function_call</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>([a-zA-Z0-9_]+)\w*\(</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.function.julia</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\)</string>
+ <key>name</key>
+ <string>meta.function.call.julia</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <key>function_decl</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(function)\w*([a-zA-Z0-9_]+)\w*\(</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.other.julia</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.function.julia</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\)</string>
+ <key>name</key>
+ <string>meta.function.julia</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
<key>keyword</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
- <string>\b(?:function|macro|quote|type|abstract|bitstype|typealias|struct|module)\b</string>
+ <string>\b(?:function|type|macro|quote|abstract|bitstype|typealias|struct|module)\b</string>
<key>name</key>
<string>keyword.other.julia</string>
</dict>
@@ -321,6 +396,31 @@
</dict>
</array>
</dict>
+ <key>type_decl</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.other.julia</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.type.julia</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(type)\s+([a-zA-Z0-9_]+)</string>
+ <key>name</key>
+ <string>meta.type.julia</string>
+ </dict>
+ </array>
+ </dict>
</dict>
<key>scopeName</key>
<string>source.julia</string>
View
2 contrib/install-tmbundle
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp -r Julia.tmbundle ~/Library/Application\ Support/TextMate/Bundles

No commit comments for this range

Something went wrong with that request. Please try again.