summaryrefslogtreecommitdiff
path: root/User/lua-module.sublime-snippet
diff options
context:
space:
mode:
Diffstat (limited to 'User/lua-module.sublime-snippet')
-rw-r--r--User/lua-module.sublime-snippet15
1 files changed, 15 insertions, 0 deletions
diff --git a/User/lua-module.sublime-snippet b/User/lua-module.sublime-snippet
new file mode 100644
index 0000000..9c40cb2
--- /dev/null
+++ b/User/lua-module.sublime-snippet
@@ -0,0 +1,15 @@
+<snippet>
+ <content><![CDATA[
+--- ${2:Description}
+-- @module ${3:${TM_FILEPATH/^(\/(?:home\/\w+\/)?)|(\/)|(\.lua$)/(?2.)/g}}
+local ${1:${TM_FILENAME/\.lua$//}} = {}
+
+${4:}
+
+return ${1:}
+]]></content>
+ <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
+ <tabTrigger>module</tabTrigger>
+ <!-- Optional: Set a scope to limit where the snippet will trigger -->
+ <scope>source.lua</scope>
+</snippet>