mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-27 15:01:22 +08:00
Fixup for #1699.
- Remove description fields; just use the keys as the descriptions. - Remove ( ) around conditions. - Add more special commands. - Add "Snippets" as a category of the extension. Also bump extension version - I accidentally published a WIP version as 0.2.1, so bump it to 0.2.2.
This commit is contained in:
parent
30090e4fa2
commit
90187c8d7c
|
@ -2,7 +2,7 @@
|
|||
"name": "elvish",
|
||||
"displayName": "Elvish",
|
||||
"description": "Elvish language support for Visual Studio Code",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.2",
|
||||
"publisher": "elves",
|
||||
"license": "BSD-2-Clause",
|
||||
"icon": "icon.png",
|
||||
|
@ -14,7 +14,8 @@
|
|||
"vscode": "^1.65.0"
|
||||
},
|
||||
"categories": [
|
||||
"Programming Languages"
|
||||
"Programming Languages",
|
||||
"Snippets"
|
||||
],
|
||||
"activationEvents": [],
|
||||
"main": "./dist/extension.js",
|
||||
|
|
|
@ -1,66 +1,74 @@
|
|||
{
|
||||
"lambda": {
|
||||
"lambda (single line)": {
|
||||
"prefix": "lambda",
|
||||
"description": "home",
|
||||
"body": "{|${1:arguments}| ${2:body}}"
|
||||
},
|
||||
"var builtin": {
|
||||
"lambda (multi line)": {
|
||||
"prefix": "lambda",
|
||||
"body": [
|
||||
"{|${1:arguments}|",
|
||||
"\t${2:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"var command": {
|
||||
"prefix": "var",
|
||||
"description": "\"var\" invocation",
|
||||
"body": "var ${1:name} = ${2:value}"
|
||||
"body": "var ${1:names} = ${2:values}"
|
||||
},
|
||||
"if builtin": {
|
||||
"set command": {
|
||||
"prefix": "set",
|
||||
"body": "set ${1:names} = ${2:values}"
|
||||
},
|
||||
"tmp command": {
|
||||
"prefix": "tmp",
|
||||
"body": "tmp ${1:names} = ${2:values}"
|
||||
},
|
||||
"if command": {
|
||||
"prefix": "if",
|
||||
"description": "\"if\" invocation",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"if ${1:condition} {",
|
||||
"\t${2:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"if else builtin": {
|
||||
"if command with else": {
|
||||
"prefix": "if-else",
|
||||
"description": "\"if\" invocation",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"if ${1:condition} {",
|
||||
"\t${2:body}",
|
||||
"} else {",
|
||||
"\t${3:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"while builtin": {
|
||||
"while command": {
|
||||
"prefix": "while",
|
||||
"description": "\"while\" invocation",
|
||||
"body": [
|
||||
"while (${1:condition}) {",
|
||||
"while ${1:condition} {",
|
||||
"\t${2:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"while else builtin": {
|
||||
"while command with else": {
|
||||
"prefix": "while-else",
|
||||
"description": "\"while\" invocation",
|
||||
"body": [
|
||||
"while (${1:condition}) {",
|
||||
"while ${1:condition} {",
|
||||
"\t${2:body}",
|
||||
"} else {",
|
||||
"\t${3:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"for builtin": {
|
||||
"for command": {
|
||||
"prefix": "for",
|
||||
"description": "\"for\" invocation",
|
||||
"body": [
|
||||
"for ${1:variable} ${2:container} {",
|
||||
"\t${3:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"for else builtin": {
|
||||
"for command with else": {
|
||||
"prefix": "for-else",
|
||||
"description": "\"for\" invocation",
|
||||
"body": [
|
||||
"for ${1:variable} ${2:container} {",
|
||||
"\t${3:body}",
|
||||
|
@ -68,5 +76,37 @@
|
|||
"\t${4:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"try command with catch": {
|
||||
"prefix": "try-catch",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t${1:body}",
|
||||
"} catch ${2:name} {",
|
||||
"\t${3:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"try command with finally": {
|
||||
"prefix": "try-finally",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t${1:body}",
|
||||
"} finally {",
|
||||
"\t${2:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"fn command": {
|
||||
"prefix": "fn",
|
||||
"body": [
|
||||
"fn ${1:name} {|${1:arguments}|",
|
||||
"\t${2:body}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"pragma command": {
|
||||
"prefix": "pragma",
|
||||
"body": "pragma ${1:name} = ${2:value}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user