59 lines
1.1 KiB
Text
59 lines
1.1 KiB
Text
{
|
|
"Function": {
|
|
"prefix": "fun",
|
|
"body": [
|
|
"fun ${1:name}(${2}): ${3:Unit} {",
|
|
" $0",
|
|
"}"
|
|
],
|
|
"description": "Gotlin function"
|
|
},
|
|
"Main Function": {
|
|
"prefix": "main",
|
|
"body": [
|
|
"fun main() {",
|
|
" $0",
|
|
"}"
|
|
],
|
|
"description": "Gotlin main function"
|
|
},
|
|
"Package": {
|
|
"prefix": "package",
|
|
"body": [
|
|
"package ${1:demo}"
|
|
],
|
|
"description": "Gotlin package declaration"
|
|
},
|
|
"Go Import": {
|
|
"prefix": "importgo",
|
|
"body": [
|
|
"import go.${1:fmt}"
|
|
],
|
|
"description": "Import a Go package"
|
|
},
|
|
"If": {
|
|
"prefix": "if",
|
|
"body": [
|
|
"if (${1:condition}) {",
|
|
" $0",
|
|
"}"
|
|
],
|
|
"description": "If statement"
|
|
},
|
|
"Lambda": {
|
|
"prefix": "lambda",
|
|
"body": [
|
|
"{ ${1:it} -> $0 }"
|
|
],
|
|
"description": "Lambda expression"
|
|
},
|
|
"Override Method": {
|
|
"prefix": "override",
|
|
"body": [
|
|
"override fun ${1:name}(${2}): ${3:Unit} {",
|
|
" $0",
|
|
"}"
|
|
],
|
|
"description": "Override a class or interface method"
|
|
}
|
|
}
|