update injections and snippets

This commit is contained in:
Ivar Fatland
2025-10-20 09:47:20 +02:00
parent 6f3f7e456c
commit f1e3ecfd01
3 changed files with 20 additions and 11 deletions
@@ -6,6 +6,14 @@
(#set! injection.language "sql")
(#offset! @injection.content 0 1 0 0)))
(block_mapping_pair
key: (flow_node) @_run
(#any-of? @_run "query")
value: (flow_node
(double_quote_scalar) @injection.content
(#set! injection.language "sql")
(#offset! @injection.content 0 1 0 0)))
(block_mapping_pair
key: (flow_node (plain_scalar (string_scalar) @injection.language))
value: (block_node
+7 -7
View File
@@ -2,6 +2,12 @@ snippet raylibBuildLinux
cc $1.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -o $1
./$1
snippet window
tmux new-window -t "$SESSION" -c ${1:[path]} -n "${2:[window name]}"
snippet program
tmux send-keys -t "$SESSION":"${1:[window name]}" '${2:[window cmd]}' C-m
snippet session
SESSION="${1:[session name]}"
@@ -15,9 +21,8 @@ snippet session
fi
tmux new-session -d -s "$SESSION" -c ${2:[path]} -n "${3:[main window name]}"
tmux send-keys -t "$SESSION":"$3" '${4:[main window cmd]}' C-m
tmux new-window -t "$SESSION" -c $2
$0
tmux select-window -t "$SESSION":"$3"
if [ -n "$TMUX" ]; then
@@ -25,8 +30,3 @@ snippet session
else
tmux attach -t "$SESSION"
fi
snippet window
tmux new-window -t "$SESSION" -c ${1:[path]} -n "${2:[window name]}"
tmux send-keys -t "$SESSION":"$2" '${3:[cmd]}' C-m
+5 -4
View File
@@ -25,9 +25,10 @@ snippet testCase
- name: ${1:Some sentence describing what you know to be true if the test passes.}
timeout_is: ${2|failure,warning|}
print_output: ${3|on_failure,on_success,always,never|}
disabled: ${4|false,true|}
limit: ${5:null}
source_limit: ${6:null}
output_destination: ${4|stdout,stderr,autopath|}
disabled: ${5|false,true|}
limit: ${6:null}
source_limit: ${7:null}
query: |
${0:SELECT * FROM table WHERE condition;}
expected: {"type": ${7|"exact"\, "n_rows": 0,"minimum"\, "n_rows": 1,"maximum"\, "n_rows": 1,"between"\, "min_rows": 0\, "max_rows": 1|}}
expected: {"type": ${8|"exact"\, "n_rows": 0,"minimum"\, "n_rows": 1,"maximum"\, "n_rows": 1,"between"\, "min_rows": 0\, "max_rows": 1|}}