init
This commit is contained in:
commit
8f4f858d86
30 changed files with 9765 additions and 0 deletions
59
tools/vscode-gotlin/snippets/gotlin.code-snippets
Normal file
59
tools/vscode-gotlin/snippets/gotlin.code-snippets
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue