summaryrefslogtreecommitdiffstats
path: root/lua/snippets/openscad.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/snippets/openscad.lua')
-rw-r--r--lua/snippets/openscad.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/lua/snippets/openscad.lua b/lua/snippets/openscad.lua
new file mode 100644
index 0000000..c430f2d
--- /dev/null
+++ b/lua/snippets/openscad.lua
@@ -0,0 +1,40 @@
+require('core.snippets.shorthands')
+
+return {
+ -- translate snippet
+ s("t", {
+ t("translate([ "),
+ i(1, "0"),
+ t(", "),
+ i(2, "0"),
+ t(", "),
+ i(3, "0"),
+ t({ " ]) {", "\t" }),
+ i(0),
+ t({ "", "}" })
+ }),
+
+ -- rotate snippet
+ s("r", {
+ t("rotate([ "),
+ i(1, "0"),
+ t(", "),
+ i(2, "0"),
+ t(", "),
+ i(3, "0"),
+ t({ " ]) {", "\t" }),
+ i(0),
+ t({ "", "}" })
+ }),
+
+ -- cube snippet
+ s("c", {
+ t("cube([ "),
+ i(1, "0"),
+ t(", "),
+ i(2, "0"),
+ t(", "),
+ i(3, "0"),
+ t(" ]);")
+ }),
+}