-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #756 ### Summary of Changes Various snippets for program elements with lengthy syntax.
- Loading branch information
1 parent
f1a052a
commit fd6f432
Showing
2 changed files
with
89 additions
and
1 deletion.
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
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,82 @@ | ||
{ | ||
"Import": { | ||
"prefix": ["from", "import"], | ||
"body": ["from $1 import $0"], | ||
"description": "Import of declarations from a package." | ||
}, | ||
"Minimal Annotation": { | ||
"prefix": ["minimal-annotation"], | ||
"body": ["annotation ${0:MyAnnotation}"], | ||
"description": "A minimal annotation." | ||
}, | ||
"Annotation": { | ||
"prefix": ["annotation"], | ||
"body": ["annotation ${1:MyAnnotation}${2:($3)} ${4:where {$0\\}}"], | ||
"description": "An annotation." | ||
}, | ||
"Attribute": { | ||
"prefix": ["attribute"], | ||
"body": ["${1|static |}attr ${2:myAttribute}: $0"], | ||
"description": "An attribute." | ||
}, | ||
"Minimal Class": { | ||
"prefix": ["minimal-class"], | ||
"body": ["class ${0:MyClass}"], | ||
"description": "A minimal class." | ||
}, | ||
"Class": { | ||
"prefix": ["class"], | ||
"body": ["class ${1:MyClass}${2:<$3>}${4:($5)} ${6:sub $7} ${8:where {$9\\}} ${10:{$0\\}}"], | ||
"description": "A class." | ||
}, | ||
"Enum": { | ||
"prefix": ["enumeration"], | ||
"body": ["enum ${1:MyEnum} {", " $0", "}"], | ||
"description": "An enumeration." | ||
}, | ||
"Minimal Function": { | ||
"prefix": ["minimal-function"], | ||
"body": ["fun ${1:myFunction}($0)"], | ||
"description": "A minimal function." | ||
}, | ||
"Function": { | ||
"prefix": ["function", "method"], | ||
"body": ["${1|static |}fun ${2:myFunction}${3:<$4>}($5) ${6:-> ($7)} ${8:where {$0\\}}"], | ||
"description": "A function." | ||
}, | ||
"Schema": { | ||
"prefix": ["schema"], | ||
"body": ["schema ${1:MySchema} {", " $0", "}"], | ||
"description": "A schema." | ||
}, | ||
"Pipeline": { | ||
"prefix": ["pipeline"], | ||
"body": ["pipeline ${1:MyPipeline} {", " $0", "}"], | ||
"description": "A pipeline." | ||
}, | ||
"Segment": { | ||
"prefix": ["segment"], | ||
"body": ["${1|internal ,private |}segment ${2:mySegment}($3) ${4:-> ($5)} {", " $0", "}"], | ||
"description": "A segment." | ||
}, | ||
"Block Lambda": { | ||
"prefix": ["block-lambda"], | ||
"body": ["($1) -> {", " $0", "}"], | ||
"description": "A lambda that executes a list of statements." | ||
}, | ||
"Expression Lambda": { | ||
"prefix": ["expression-lambda"], | ||
"body": ["($1) -> $0"], | ||
"description": "A lambda that returns a single expression." | ||
}, | ||
"Block Comment": { | ||
"prefix": ["block-comment"], | ||
"body": ["/*", " * $0", " */"], | ||
"description": "A block comment." | ||
}, | ||
"Documentation Comment": { | ||
"prefix": ["documentation-comment"], | ||
"body": ["/**", " * $0", " */"], | ||
"description": "A documentation comment." | ||
} | ||
} |