Skip to content

Instantly share code, notes, and snippets.

@gahabeen
Last active April 24, 2020 11:00
Show Gist options
  • Save gahabeen/7d2b2b1226c8052c439fd77bf15f9b75 to your computer and use it in GitHub Desktop.
Save gahabeen/7d2b2b1226c8052c439fd77bf15f9b75 to your computer and use it in GitHub Desktop.

To add the snippets:

  1. Hit > shift + command + p and type snippets (or go look for 2.)
  2. Select Preferences: Open User Snippets
  3. Choose the language type for which you want to add the custom snippet (choosed all, for js/ts/fql files)
  4. Copy/Paste the snippets.json content in there

Currently covered:

  • q.Lambda
  • q.Let
  • q.Var
  • q.Get
{
"q.Lambda([params], expression)": {
"prefix": [
"qla",
"qlambda",
"q.Lambda"
],
"body": [
"q.Lambda(['$1'], $2)"
]
},
"q.Let(bindings, in)": {
"prefix": [
"qle",
"qlet",
"q.Let"
],
"body": [
"q.Let({'$1': $2}, $3)"
]
},
"q.Get(ref, [ts])": {
"prefix": [
"qg",
"qget",
"q.Get"
],
"body": [
"q.Get($1)"
]
},
"q.Var('<name>')": {
"prefix": [
"qv",
"qvar",
"q.Var"
],
"body": [
"q.Var('$1')"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment