mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-03 20:37:50 +03:00
Add Go support to snippets (#1591)
This brings Go support to all appropriate built-in cursorless snippets. Go is tantalizingly close to typescript, but just different enough to need its own bodies. ## Checklist - [n/a] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [n/a] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [n/a] I have not broken the cheatsheet
This commit is contained in:
parent
640abe902b
commit
8f666638bb
@ -47,6 +47,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
"go"
|
||||
]
|
||||
},
|
||||
"body": [
|
||||
"func $name($parameterList) {",
|
||||
"\t$body",
|
||||
"}"
|
||||
],
|
||||
"variables": {
|
||||
"name": {
|
||||
"formatter": "camelCase"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
|
@ -23,6 +23,20 @@
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
"go"
|
||||
]
|
||||
},
|
||||
"body": [
|
||||
"if $condition {",
|
||||
"\t$consequence",
|
||||
"} else {",
|
||||
"\t$alternative",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
|
@ -21,6 +21,18 @@
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
"go"
|
||||
]
|
||||
},
|
||||
"body": [
|
||||
"if $condition {",
|
||||
"\t$consequence",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scope": {
|
||||
"langIds": [
|
||||
|
Loading…
Reference in New Issue
Block a user