From 4c4377908efc3e634f01b4dbd3d22bd03aff2454 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 28 May 2014 22:40:49 -0400 Subject: Updated LuaDoc. --- modules/lua/init.lua | 5 ++++- modules/textadept/menu.lua | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/lua/init.lua b/modules/lua/init.lua index 9c86b8bf..f1b5d834 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -153,7 +153,10 @@ if type(snippets) == 'table' then -- @class table -- @name _G.snippets.lua snippets.lua = { - + f = "function %1(name)(%2(args))\n\t%0\nend", + ['for'] = "for %1(i) = %2(1), %3(10)%4(, %5(-1)) do\n\t%0\nend", + fori = "for %1(i), %2(v) in ipairs(%3(t)) do\n\t%0\nend", + forp = "for %1(k), %2(v) in pairs(%3(t)) do\n\t%0\nend" } end diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index dbb34292..b974c5db 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -6,8 +6,9 @@ local M = {} --[[ This comment is for LuaDoc. --- -- Defines the menus used by Textadept. --- Menus are simply tables and may be edited in place. Use the '#' operator --- (instead of `ipairs()`) for iteration. +-- Menus are simply tables and may be edited in place. Submenus have `title` +-- keys with string text. Use the '#' operator (instead of `ipairs()`) for +-- iteration. -- If applicable, load this module last in your *~/.textadept/init.lua*, after -- `textadept.keys` since it looks up defined key commands to show them in -- menus. -- cgit v1.2.3