forked from talonhub/community
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic lua snippet support (talonhub#1566)
Not nearly at the level of Python snippet support, but already quite useful. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nicholas Riley <[email protected]>
- Loading branch information
1 parent
d426076
commit 7ef1602
Showing
5 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,9 @@ language: python | |
elif $1: | ||
$0 | ||
--- | ||
|
||
language: lua | ||
- | ||
elseif $1 then | ||
$0 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,9 @@ language: python | |
else: | ||
$0 | ||
--- | ||
|
||
language: lua | ||
- | ||
else | ||
$0 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,10 @@ language: python | |
if $1: | ||
$0 | ||
--- | ||
|
||
language: lua | ||
- | ||
if $1 then | ||
$0 | ||
end | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
language: lua | ||
--- | ||
|
||
name: forInIPairs | ||
phrase: for eye pairs | ||
insertionScope: statement | ||
$1.insertionFormatter: SNAKE_CASE | ||
- | ||
for _, $1 in ipairs($2) do | ||
$0 | ||
end | ||
--- | ||
|
||
name: forInPairs | ||
phrase: for pairs | ||
insertionScope: statement | ||
- | ||
for ${1:k}, ${2:v} in pairs($3) do | ||
$0 | ||
end | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,8 @@ language: python | |
- | ||
$1 if $2 else $0 | ||
--- | ||
|
||
language: lua | ||
- | ||
$1 and $2 or $0 | ||
--- |