Add some commonly used QL snippets#782
Conversation
aeisenberg
left a comment
There was a problem hiding this comment.
This looks nicely comprehensive. Thanks!
I think in general, any snippet placeholder that must be added should have a default value. If nothing else, this just signifies where a user can edit.
| "/**", | ||
| " * @name $1", | ||
| " * @description $2", | ||
| " * @kind $3", |
There was a problem hiding this comment.
Either add a choice here, or separate this into multiple snippets, one for each metadata kind.
https://code.visualstudio.com/docs/editor/userdefinedsnippets#_choice
| }, | ||
| "From/Where/Select": { | ||
| "prefix": "from", | ||
| "body": ["from $1", "where $2", "select $3"], |
There was a problem hiding this comment.
I find it easier to read if there are default values for each replacement step.
| "body": ["from $1", "where $2", "select $3"], | |
| "body": ["from ${1:params}", "where ${2:clause}", "select ${2:args}"], |
fe07fed to
db33630
Compare
|
@github/docs-content-dsp Is this the kind of thing that should go in the documentation? |
Looks exciting 😄 I've opened an internal docs issue where we can assess if/where we need to document this. |
This PR addresses #392 by introducing some simple snippets for query metadata, classes, from/where/select statements, predicates, dataflow/taint tracking classes, and all the aggregates and quantifiers.