Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5887db2
Showing
22 changed files
with
2,649 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,4 @@ | ||
[ | ||
{ "caption": "-"}, | ||
{ "command": "goto_opa_doc", "caption": "Opa Doc" } | ||
] |
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,3 @@ | ||
[ | ||
{ "keys": ["ctrl+d"], "command": "goto_opa_doc" } | ||
] |
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,24 @@ | ||
<?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>Opa Indent</string> | ||
<key>scope</key> | ||
<string>source.opa</string> | ||
<key>settings</key> | ||
<dict> | ||
<key>decreaseIndentPattern</key> | ||
<string>^(.*\*/)?\s*\}.*$</string> | ||
<key>increaseIndentPattern</key> | ||
<string>^.*\{[^}"']*$</string> | ||
|
||
<key>bracketIndentNextLinePattern</key> | ||
<string>(?x) | ||
^ \s* \b(if|else)\b [^;]* $ | ||
</string> | ||
</dict> | ||
<key>uuid</key> | ||
<string>BC062860-3346-4D3B-8421-C5543F83D11F</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"id": "tools", | ||
"children": | ||
[ | ||
{ | ||
"id": "opa", | ||
"caption": "Opa", | ||
"children": | ||
[ | ||
{ "caption": "Build" , "command": "build" }, | ||
{ "caption": "Run" , "command": "Disabled"}, | ||
{ "caption": "Run (no rebuild)" , "command": "Disabled"}, | ||
{ "caption": "Monitor" , "command": "Disabled"} | ||
] | ||
} | ||
] | ||
} | ||
] |
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,7 @@ | ||
{ | ||
"cmd": ["opa --no-color *.opa"], | ||
"file_regex": "^(?:File|In)[^ ]*[ ]+[\"]?([^\"[]+[.]opa)[\"]?[^[(]*[[(]([0-9]+):([0-9]+)-[0-9]+:([0-9]+)[^)].*$", | ||
"working_dir": "${project_path:${folder}}", | ||
"selector": "source.opa", | ||
"shell": true | ||
} |
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,7 @@ | ||
{ | ||
"cmd": ["opa --no-color ", "$file"], | ||
"file_regex": "^(?:File|In)[^ ]*[ ]+[\"]?([^\"[]+[.]opa)[\"]?[^[(]*[[(]([0-9]+):([0-9]+)-[0-9]+:([0-9]+).*", | ||
"working_dir": "${project_path:${folder}}", | ||
"selector": "source.opa", | ||
"shell": true | ||
} |
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,211 @@ | ||
{ "uuid": "af6424dd-5613-463c-9e25-912ab1e9ac69", | ||
"name": "Opa", | ||
"scopeName": "source.opa", | ||
"fileTypes": ["opa"], | ||
|
||
"patterns": [ | ||
|
||
|
||
{ "match": "^\\s*(package|import|import-plugin|database|db)\\b", | ||
"name": "keyword.other", | ||
"comment": "A keyword" | ||
}, | ||
|
||
{ "match": "//.*", | ||
"name": "comment.line.double-dash", | ||
"comment": "A line comment" | ||
}, | ||
|
||
{ "match": "(?=/[*][*])[ \t]*[A-Za-z_0-0]+", | ||
"name": "invalid", | ||
"comment": "A doc comment header" | ||
}, | ||
|
||
|
||
{ "begin": "/[*][*]", | ||
"end": "[*][/]", | ||
"name": "comment.block.documentation", | ||
"comment": "A doc comment" | ||
}, | ||
|
||
{ "begin": "/[*]", | ||
"end": "[*]/", | ||
"name": "comment.block", | ||
"comment": "A block comment" | ||
}, | ||
|
||
{ "match": "\\belse\\b", | ||
"name": "keyword.control", | ||
"comment": "A keyword" | ||
}, | ||
|
||
{ "match": "(?<=})(\\\"|[^\"{])*(?={)", | ||
"name": "string.quoted", | ||
"comment": "A constant string part" | ||
}, | ||
|
||
{ "match": "\"(\\\"|[^\"{])*(?={)", | ||
"name": "string.quoted", | ||
"comment": "An interpolated string start" | ||
}, | ||
|
||
{ "match": "(?<=})(\\\"|[^\"{])*\"", | ||
"name": "string.quoted", | ||
"comment": "An interpolated string end" | ||
}, | ||
|
||
{ "match": "\"(\\\"|[^\"{])*\"", | ||
"name": "string.quoted", | ||
"comment": "A constant string" | ||
}, | ||
|
||
{ "match": "\\b[0-9]+([.][0-9]+)?(e(-|[+]?)[0-9]+)?\\b", | ||
"name": "constant.numeric", | ||
"comment": "A real" | ||
}, | ||
|
||
|
||
{ | ||
"match": "</([-A-Za-z0-9]+:)?[A-Za-z0-9]*>", | ||
"name": "string.other", | ||
"comment": "Close tag" | ||
}, | ||
|
||
{ | ||
"match": "<([-A-Za-z0-9]+)?(([A-Za-z0-9]+( |>)))((?![{])(?!</).)*", | ||
"name": "string.other", | ||
"comment": "Tag until end or insert" | ||
}, | ||
|
||
{ | ||
"match": "<>((?![{])(?!</).)*", | ||
"name": "string.other", | ||
"comment": "Tag until end or insert" | ||
}, | ||
|
||
{ | ||
"match": "(?<=})[ \t]*>((?![{])(?!</).)*", | ||
"name": "string.other", | ||
"comment": "Insert end in tag" | ||
}, | ||
|
||
{ "match": "(?<=})([^<{])*(?=<)", | ||
"name": "string.quoted", | ||
"comment": "An xhtml end" | ||
}, | ||
|
||
|
||
{ | ||
"match": "(?<=(</))[ \t]*>[^{]*(?=(/>))", | ||
"name": "string.other", | ||
"comment": "Insert end in tag" | ||
}, | ||
|
||
{ "match": "^[ \t]*[#][-`a-zA-Z]+[ \t]*(?=([=]|<-))", | ||
"name": "storage.modifier", | ||
"comment": "A dom side effect target" | ||
}, | ||
|
||
{ "match": "^[ \t]*[/][-`a-zA-Z/]+[ \t]*(?=([=]|<-))", | ||
"name": "storage.modifier", | ||
"comment": "A db side effect target" | ||
}, | ||
|
||
|
||
{ "match": "^[ \t]*[a-zA-Z_]+[ \t]*(:[ \t]*[A-Za-z0-9]+[ \t]*)?(?=[=])", | ||
"name": "support.constant", | ||
"comment": "A constant binding" | ||
}, | ||
|
||
{ "match": "^[ \t]*`[^`]+`[ \t]*(:[A-Za-z0-9]+)?(?=[=])", | ||
"name": "support.constant", | ||
"comment": "A constant binding" | ||
}, | ||
|
||
|
||
{ "match": "(?<=function)[ \t]*[a-zA-Z_]+(?=[(])", | ||
"name": "support.function", | ||
"comment": "A function binding" | ||
}, | ||
|
||
{ "match": "(?<=function)[ \t]*`[^`]+`+(?=[(])", | ||
"name": "support.function", | ||
"comment": "A function binding" | ||
}, | ||
|
||
|
||
{ "match": "[a-zA-Z_]+[(][^)]*[)][ \t]*([:][^=]*?)?(?=[=])", | ||
"name": "support.function", | ||
"comment": "A function binding" | ||
}, | ||
|
||
{ "match": "`[^`]+`[(][^)]*[)][ \t]*(?=[=])", | ||
"name": "support.function", | ||
"comment": "A function binding" | ||
}, | ||
|
||
|
||
|
||
{ "match": "<|>|==|<=|>=|!=", | ||
"name": "support.function", | ||
"comment": "A comparison" | ||
}, | ||
|
||
|
||
{ "match": "\\b(type|function|module|match|parser|with|as|case|default|if|then|else|or)\\b", | ||
"name": "keyword.control", | ||
"comment": "A keyword" | ||
}, | ||
|
||
{ "match": "(=|:|<-|[|]|->)", | ||
"name": "keyword.control", | ||
"comment": "A keyword" | ||
}, | ||
|
||
|
||
{ "match": "\\b(client|server|exposed)\\b", | ||
"name": "invalid.illegal", | ||
"comment": "A dangerous directive" | ||
}, | ||
|
||
{ "match": "(@client|@server|@publish)\\b", | ||
"name": "invalid.illegal", | ||
"comment": "A dangerous directive" | ||
}, | ||
|
||
{ "match": "(\\bprivate|\\bprotected|@private|@server_private|@async)\\b", | ||
"name": "keyword.other", | ||
"comment": "A safe directive" | ||
}, | ||
|
||
|
||
{ "match": "@static_include_directory|@static_resource_directory", | ||
"name": "keyword.other", | ||
"comment": "A directive" | ||
}, | ||
|
||
|
||
{ "match": "@[A-Za-z0-9_]+\\b", | ||
"name": "invalid.deprecated", | ||
"comment": "An exotic directive" | ||
}, | ||
|
||
|
||
|
||
{ "match": "[-+*/]+", | ||
"name": "support.function", | ||
"comment": "An operator" | ||
}, | ||
|
||
{ "match": "[[(){},;]|]", | ||
"name": "delimiter", | ||
"comment" : "delimiter, take something else for name" | ||
}, | ||
|
||
{ "match": "true|false|void|none|empty", | ||
"name": "constant.language", | ||
"comment": "A well known named constant" | ||
} | ||
|
||
] | ||
} |
Empty file.
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,4 @@ | ||
[ | ||
{ "caption": "-"}, | ||
{ "command": "gotoOpaDocCommand", "caption": "Opa Doc" } | ||
] |
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,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
$TM_FILENAME : $TM_FULLNAME | ||
]]></content> | ||
<tabTrigger>MeMyselfAndI</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,9 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
case $1: | ||
$2 | ||
$3 | ||
]]></content> | ||
<tabTrigger>case</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
/* $SELECTION */ | ||
]]></content> | ||
<tabTrigger>COMMENT</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,12 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
/** $1 */ | ||
function $1($2){ | ||
$3 | ||
} | ||
$4 | ||
]]></content> | ||
<tabTrigger>function</tabTrigger> | ||
<scope>source.opa</scope> | ||
<description>function declaration</description> | ||
</snippet> |
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,12 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
if($1){ | ||
$2 | ||
} else { | ||
$3 | ||
} | ||
$4 | ||
]]></content> | ||
<tabTrigger>if</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,13 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
match(){ | ||
case $1: | ||
$2 | ||
case _ : | ||
$3 | ||
} | ||
$4 | ||
]]></content> | ||
<tabTrigger>match</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,12 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
/** $1 */ | ||
module $1 { | ||
$2 | ||
} | ||
$3 | ||
]]></content> | ||
<tabTrigger>module</tabTrigger> | ||
<scope>source.opa</scope> | ||
<description>module declaration</description> | ||
</snippet> |
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,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
parser { | ||
| $1 -> $2 | ||
} | ||
$3 | ||
]]></content> | ||
<tabTrigger>parser</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
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,14 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Server.start( | ||
Server.http, // Server.https | ||
[ | ||
{resources:@static_include("resources")}, | ||
{register:[]}, | ||
$1 // {title:"mypage" page():<div> HELLO </>} / {filter :} // http://doc.opalang.org/#!/type/stdlib.core.web.server/Server/handler | ||
] | ||
) | ||
]]></content> | ||
<tabTrigger>Server.start</tabTrigger> | ||
<scope>source.opa</scope> | ||
</snippet> |
Oops, something went wrong.