summary refs log tree commit diff
path: root/.vim/snippets/zig.lua
diff options
context:
space:
mode:
Diffstat (limited to '.vim/snippets/zig.lua')
-rw-r--r--.vim/snippets/zig.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/.vim/snippets/zig.lua b/.vim/snippets/zig.lua
new file mode 100644
index 0000000..3a7d12f
--- /dev/null
+++ b/.vim/snippets/zig.lua
@@ -0,0 +1,13 @@
+---@diagnostic disable: undefined-global
+return {
+  s('str', t('[]const u8')),
+  s('fn_C', fmt('fn {}({}) callconv(.C) {}', { i(0), i(1), i(2) })),
+  s('debug', {
+    t('std.log.debug("'),
+    i(1, '{any}'),
+    t('", .{'),
+    i(2),
+    t('});'),
+    i(0),
+  }),
+}