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:
Josh Bleecher Snyder 2023-07-07 01:09:44 -07:00 committed by GitHub
parent 640abe902b
commit 8f666638bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 0 deletions

View File

@ -47,6 +47,23 @@
}
}
},
{
"scope": {
"langIds": [
"go"
]
},
"body": [
"func $name($parameterList) {",
"\t$body",
"}"
],
"variables": {
"name": {
"formatter": "camelCase"
}
}
},
{
"scope": {
"langIds": [

View File

@ -23,6 +23,20 @@
"}"
]
},
{
"scope": {
"langIds": [
"go"
]
},
"body": [
"if $condition {",
"\t$consequence",
"} else {",
"\t$alternative",
"}"
]
},
{
"scope": {
"langIds": [

View File

@ -21,6 +21,18 @@
"}"
]
},
{
"scope": {
"langIds": [
"go"
]
},
"body": [
"if $condition {",
"\t$consequence",
"}"
]
},
{
"scope": {
"langIds": [