diff options
-rw-r--r-- | core/._M.luadoc | 6 | ||||
-rw-r--r-- | core/keys.lua | 3 | ||||
-rw-r--r-- | core/lfs_ext.lua | 1 | ||||
-rw-r--r-- | modules/lua/init.lua | 5 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 5 |
5 files changed, 12 insertions, 8 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc index 8633050b..18df50d9 100644 --- a/core/._M.luadoc +++ b/core/._M.luadoc @@ -20,8 +20,8 @@ -- -- To fully take advantage of Textadept's features, language modules should have -- at a minimum: run and/or compile commands, an event handler for setting --- buffer properties like indentation, and if possible, an Adeptsense. Optional --- features are extra snippets and commands and a context menu. +-- buffer properties like indentation, and if possible, an autocompleter. +-- Optional features are extra snippets and commands and a context menu. -- -- #### Compile and Run -- @@ -150,5 +150,5 @@ -- {'Autocomplete "end"', M.try_to_autocomplete_end} -- } -- --- [context menus]: textadept.menu.html#set_contextmenu +-- [context menus]: textadept.menu.html#context_menu module('_M')]] diff --git a/core/keys.lua b/core/keys.lua index 4eb301f4..4c84dbce 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -106,8 +106,7 @@ local M = {} -- @field CLEAR (string) -- The key that clears the current key chain. -- It cannot be part of a key chain. --- The default value is `'esc'` for the `Esc` (`⎋` on Mac OSX | `Esc` in --- curses) key. +-- The default value is `'esc'` for the `Esc` key. -- @field LANGUAGE_MODULE_PREFIX (string) -- The prefix key of the key chain reserved for language modules. -- The default value is `'cl'` on platforms other than Mac OSX, `'ml'` diff --git a/core/lfs_ext.lua b/core/lfs_ext.lua index 25bbeb8d..a1d9c523 100644 --- a/core/lfs_ext.lua +++ b/core/lfs_ext.lua @@ -99,6 +99,7 @@ end -- *prefix* or `lfs.currentdir()` is prepended to a relative filename. The -- returned path is not guaranteed to exist. -- @param filename The relative or absolute path to a file. +-- @param prefix Optional prefix path prepended to a relative filename. -- @return string absolute path -- @name abspath function lfs.abspath(filename, prefix) 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. |