diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cpp/init.lua | 19 | ||||
-rw-r--r-- | modules/lua/init.lua | 21 | ||||
-rw-r--r-- | modules/lua/lua.luadoc | 58 | ||||
-rw-r--r-- | modules/textadept/adeptsense.lua | 53 | ||||
-rw-r--r-- | modules/textadept/bookmarks.lua | 4 | ||||
-rw-r--r-- | modules/textadept/command_entry.lua | 3 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 36 | ||||
-rw-r--r-- | modules/textadept/find.lua | 68 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 2 | ||||
-rw-r--r-- | modules/textadept/mime_types.lua | 22 | ||||
-rw-r--r-- | modules/textadept/run.lua | 14 | ||||
-rw-r--r-- | modules/textadept/session.lua | 24 | ||||
-rw-r--r-- | modules/textadept/snapopen.lua | 14 | ||||
-rw-r--r-- | modules/textadept/snippets.lua | 2 |
14 files changed, 192 insertions, 148 deletions
diff --git a/modules/cpp/init.lua b/modules/cpp/init.lua index 0bcf280f..d8a573a5 100644 --- a/modules/cpp/init.lua +++ b/modules/cpp/init.lua @@ -13,16 +13,21 @@ module('_M.cpp')]] -- Markdown: -- ## Key Commands -- --- + `Ctrl+L, M` (`⌘L, M` on Mac OSX): Open this module for editing. --- + `.`: When to the right of a known symbol, show an autocompletion list of --- fields and functions. --- + `->`: When to the right of a known symbol, show an autocompletion list of --- fields and functions. --- + `Shift+Return` (`⇧↩`): Add ';' to line end and insert newline. +-- + `Ctrl+L, M` (`⌘L, M` on Mac OSX) +-- Open this module for editing. +-- + `.` +-- When to the right of a known symbol, show an autocompletion list of fields +-- and functions. +-- + `->` +-- When to the right of a known symbol, show an autocompletion list of fields +-- and functions. +-- + `Shift+Return` (`⇧↩`) +-- Add ';' to line end and insert newline. -- -- ## Fields -- --- * `sense`: The C/C++ [Adeptsense](_M.textadept.adeptsense.html). +-- * `sense` +-- The C/C++ [Adeptsense](_M.textadept.adeptsense.html). local m_editing, m_run = _M.textadept.editing, _M.textadept.run -- Comment string tables use lexer names. diff --git a/modules/lua/init.lua b/modules/lua/init.lua index c224ea9d..0accbb5c 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -13,18 +13,23 @@ module('_M.lua')]] -- Markdown: -- ## Key Commands -- --- + `Ctrl+L, M` (`⌘L, M` on Mac OSX): Open this module for editing. --- + `Ctrl+L, G` (`⌘L, G`): Goto file being 'require'd on the current line. --- + `Shift+Return` (`⇧↩`): Try to autocomplete an `if`, `for`, etc. statement --- with `end`. --- + `.`: When to the right of a known symbol, show an autocompletion list of --- fields and functions. --- + `:`: When to the right of a known symbol, show an autocompletion list of +-- + `Ctrl+L, M` (`⌘L, M` on Mac OSX) +-- Open this module for editing. +-- + `Ctrl+L, G` (`⌘L, G`) +-- Goto file being 'require'd on the current line. +-- + `Shift+Return` (`⇧↩`) +-- Try to autocomplete an `if`, `for`, etc. statement with `end`. +-- + `.` +-- When to the right of a known symbol, show an autocompletion list of fields +-- and functions. +-- + `:` +-- When to the right of a known symbol, show an autocompletion list of -- functions only. -- -- ## Fields -- --- * `sense`: The Lua [Adeptsense](_M.textadept.adeptsense.html). +-- * `sense` +-- The Lua [Adeptsense](_M.textadept.adeptsense.html). local m_editing, m_run = _M.textadept.editing, _M.textadept.run -- Comment string tables use lexer names. diff --git a/modules/lua/lua.luadoc b/modules/lua/lua.luadoc index dbb21f25..22551dfb 100644 --- a/modules/lua/lua.luadoc +++ b/modules/lua/lua.luadoc @@ -59,9 +59,10 @@ function dofile([filename]) end -- message. function error(message [, level]) end --- * `_G._G`: A global variable (not a function) that holds the global --- environment (see §2.2). Lua itself does not use this variable; changing its --- value does not affect any environment, nor vice-versa. +-- * `_G._G` +-- A global variable (not a function) that holds the global environment +-- (see §2.2). Lua itself does not use this variable; changing its value does +-- not affect any environment, nor vice-versa. --- -- If `object` does not have a metatable, returns nil. Otherwise, if the @@ -234,9 +235,10 @@ function tostring(v) end -- "`table`", "`function`", "`thread`", and "`userdata`". function type(v) end --- * `_G._VERSION` [string]: A global variable (not a function) that holds a --- string containing the current interpreter version. The current contents of --- this variable is "`Lua 5.2`". +-- * `_G._VERSION` [string] +-- A global variable (not a function) that holds a string containing the +-- current interpreter version. The current contents of this variable is +-- "`Lua 5.2`". --- -- This function is similar to `pcall`, except that it sets a new message @@ -320,8 +322,9 @@ function coroutine.yield(···) end -- any loader for the module, then `require` raises an error. function require(modname) end --- * `package.config`: A string describing some compile-time configurations for --- packages. This string is a sequence of lines: +-- * `package.config` +-- A string describing some compile-time configurations for packages. This +-- string is a sequence of lines: -- The first line is the directory separator string. Default is '`\`' for -- Windows and '`/`' for all other systems. -- The second line is the character that separates templates in a path. @@ -333,16 +336,17 @@ function require(modname) end -- The fifth line is a mark to ignore all text before it when building the -- `luaopen_` function name. Default is '`-`'. --- * `package.cpath`: The path used by `require` to search for a C loader. +-- * `package.cpath` +-- The path used by `require` to search for a C loader. -- Lua initializes the C path `package.cpath` in the same way it initializes -- the Lua path `package.path`, using the environment variable `LUA_CPATH_5_2` -- or the environment variable `LUA_CPATH` or a default path defined in -- `luaconf.h`. --- * `package.loaded`: A table used by `require` to control which modules are --- already loaded. When you require a module `modname` and --- `package.loaded[modname]` is not false, `require` simply returns the value --- stored there. +-- * `package.loaded` +-- A table used by `require` to control which modules are already loaded. When +-- you require a module `modname` and `package.loaded[modname]` is not false, +-- `require` simply returns the value stored there. -- This variable is only a reference to the real table; assignments to this -- variable do not change the table used by `require`. @@ -367,20 +371,21 @@ function require(modname) end -- systems that support the `dlfcn` standard). function package.loadlib(libname, funcname) end --- * `package.path`: The path used by `require` to search for a Lua loader. +-- * `package.path` +-- The path used by `require` to search for a Lua loader. -- At start-up, Lua initializes this variable with the value of the -- environment variable `LUA_PATH_5_2` or the environment variable `LUA_PATH` -- or with a default path defined in `luaconf.h`, if those environment -- variables are not defined. Any "`;;`" in the value of the environment -- variable is replaced by the default path. --- * `package.preload`: A table to store loaders for specific modules (see --- `require`). +-- * `package.preload` +-- A table to store loaders for specific modules (see `require`). -- This variable is only a reference to the real table; assignments to this -- variable do not change the table used by `require`. --- * `package.searchers`: A table used by `require` to control how to load --- modules. +-- * `package.searchers` +-- A table used by `require` to control how to load modules. -- Each entry in this table is a *searcher function*. When looking for a -- module, `require` calls each of these searchers in ascending order, with -- the module name (the argument given to `require`) as its sole parameter. @@ -720,8 +725,9 @@ function math.fmod(x, y) end -- absolute value of `m` is in the range *[0.5, 1)* (or zero when `x` is zero). function math.frexp(x) end --- * `math.huge`: The value `HUGE_VAL`, a value larger than or equal to any --- other numerical value. +-- * `math.huge` +-- The value `HUGE_VAL`, a value larger than or equal to any other numerical +-- value. --- -- Returns 'm2^e' (`e` should be an integer). @@ -745,7 +751,8 @@ function math.min(x, ···) end -- `x`. function math.modf(x) end --- * `math.pi`: The value of 'π'. +-- * `math.pi` +-- The value of 'π'. --- -- Returns *x^y*. (You can also use the expression `x^y` to compute this @@ -956,9 +963,12 @@ function io.popen(prog [, mode]) end -- Equivalent to `io.input():read(···)`. function io.read(···) end --- * `io.stderr`: Standard error. --- * `io.stdin`: Standard in. --- * `io.stdout`: Standard out. +-- * `io.stderr` +-- Standard error. +-- * `io.stdin` +-- Standard in. +-- * `io.stdout` +-- Standard out. --- -- Returns a handle for a temporary file. This file is opened in update diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua index cdc6c126..d168c5a6 100644 --- a/modules/textadept/adeptsense.lua +++ b/modules/textadept/adeptsense.lua @@ -314,16 +314,19 @@ module('_M.textadept.adeptsense')]] -- -- #### Other Adeptsense Settings -- --- * `always_show_globals` [bool]: Include globals in the list of completions --- offered. Globals are classes, functions, and fields that do not belong to --- another class. They are contained in `completions['']`. The default value --- is `true`. +-- * `always_show_globals` [bool] +-- Include globals in the list of completions offered. +-- Globals are classes, functions, and fields that do not belong to another +-- class. They are contained in `completions['']`. The default value is +-- `true`. -- -- ## Settings -- --- * `FUNCTIONS` [string]: XPM image for Adeptsense functions. --- * `FIELDS` [string]: XPM image for Adeptsense fields. +-- * `FUNCTIONS` [string] +-- XPM image for Adeptsense functions. +-- * `FIELDS` [string] +-- XPM image for Adeptsense fields. local senses = {} @@ -415,10 +418,10 @@ end -- Adds an inherited class's completions to the given completion list. -- @param sense The Adeptsense returned by `adeptsense.new()`. -- @param class The name of the class to add inherited completions from. --- @param only_fields If `true`, adds only fields to the completion list; --- defaults to `false`. --- @param only_funcs If `true`, adds only functions to the completion list; --- defaults to `false`. +-- @param only_fields If `true`, adds only fields to the completion list. The +-- default value is `false`. +-- @param only_funcs If `true`, adds only functions to the completion list. The +-- default value is `false`. -- @param c The completion list to add completions to. -- @param added Table that keeps track of what inherited classes have been -- added. This prevents stack overflow errors. Should be `{}` on the initial @@ -446,10 +449,10 @@ end -- Returns a list of completions for the given symbol. -- @param sense The Adeptsense returned by `adeptsense.new()`. -- @param symbol The symbol to get completions for. --- @param only_fields If `true`, returns list of only fields; defaults to --- `false`. --- @param only_functions If `true`, returns list of only functions; defaults to --- `false`. +-- @param only_fields If `true`, returns list of only fields. The default value +-- is `false`. +-- @param only_functions If `true`, returns list of only functions. The default +-- value is `false`. -- @return completion_list or `nil` -- @name get_completions function M.get_completions(sense, symbol, only_fields, only_functions) @@ -501,10 +504,10 @@ end --- -- Shows an autocompletion list for the symbol behind the caret. -- @param sense The Adeptsense returned by `adeptsense.new()`. --- @param only_fields If `true`, returns list of only fields; defaults to --- `false`. --- @param only_functions If `true`, returns list of only functions; defaults to --- `false1. +-- @param only_fields If `true`, returns list of only fields. The default value +-- is `false`. +-- @param only_functions If `true`, returns list of only functions. The default +-- value is `false`. -- @return `true` on success or `false`. -- @see get_symbol -- @see get_completions @@ -532,10 +535,10 @@ end -- @param sense The Adeptsense returned by `adeptsense.new()`. -- @param c The character(s) that triggers the autocompletion. You can have up -- to two characters. --- @param only_fields If `true`, this trigger only completes fields. Defaults to --- `false`. +-- @param only_fields If `true`, this trigger only completes fields. The default +-- value is `false`. -- @param only_functions If `true`, this trigger only completes functions. --- Defaults to `false`. +-- The default value is `false`. -- @usage sense:add_trigger('.') -- @usage sense:add_trigger(':', false, true) -- only functions -- @usage sense:add_trigger('->') @@ -645,7 +648,7 @@ end -- @param sense The Adeptsense returned by `adeptsense.new()`. -- @param tag_file The path of the ctags file to load. -- @param nolocations If `true`, does not store the locations of the tags for --- use by `goto_ctag()`. Defaults to `false`. +-- use by `goto_ctag()`. The default value is `false`. -- @name load_ctags function M.load_ctags(sense, tag_file, nolocations) local ctags_kinds = sense.ctags_kinds @@ -876,7 +879,7 @@ api_files = {}, -- are shown (if any). Completions will not be shown for both a class and -- superclass unless defined in a previously loaded ctags file. Also, multiple -- superclasses cannot be recognized by this pattern; use a ctags file --- instead. Defaults to `'class%s+([%w_]+)'`. +-- instead. The default value is `'class%s+([%w_]+)'`. -- @field word_chars A Lua pattern of characters allowed in a word. The default -- is `'%w_'`. -- @field symbol_chars A Lua pattern of characters allowed in a symbol, @@ -884,11 +887,11 @@ api_files = {}, -- default is `'[%w_%.]'`. -- @field type_declarations A list of Lua patterns used for determining the -- class type of a symbol. The first capture returned must be the class name. --- Use `%_` to match the symbol. The default is `'(%u[%w_%.]+)%s+%_'`. +-- Use `%_` to match the symbol. The default value is `'(%u[%w_%.]+)%s+%_'`. -- @field type_declarations_exclude A table of types to exclude, even if they -- match a type_declaration pattern. Each excluded type is a table key and has -- a `true` boolean value. For example, `{ Foo = true }` excludes any type --- whose name is `Foo`. Defaults to being empty. +-- whose name is `Foo`. The default value is `{}`. -- @field type_assignments A map of Lua patterns to class types for variable -- assignments. This is typically used for dynamically typed languages. For -- example, `sense.type_assignments['^"'] = 'string'` would recognize string diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index 04170902..77f3194b 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -10,8 +10,8 @@ module('_M.textadept.bookmarks')]] -- Markdown: -- ## Settings -- --- * `MARK_BOOKMARK_COLOR` [number]: The color used for a bookmarked line in --- `0xBBGGRR` format. +-- * `MARK_BOOKMARK_COLOR` [number] +-- The color used for a bookmarked line in `0xBBGGRR` format. M.MARK_BOOKMARK_COLOR = 0xB3661A diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index 92490ddc..adccc7b9 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -9,7 +9,8 @@ module('gui.command_entry')]] -- Markdown: -- ## Fields -- --- * `entry_text` [string]: The text in the entry. +-- * `entry_text` [string] +-- The text in the entry. -- Environment for abbreviated commands. -- @class table diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index c8850662..aafc358c 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -10,21 +10,29 @@ module('_M.textadept.editing')]] -- Markdown: -- ## Settings -- --- * `AUTOPAIR` [bool]: Opening `(`, `[`, `[`, `"`, or `'` characters are --- automatically closed. The default value is `true`. --- * `HIGHLIGHT_BRACES` [bool]: Highlight matching `()[]{}<>` characters. The --- default value is `true`. --- * `AUTOINDENT` [bool]: Match the indentation level of the previous line when --- pressing the Enter key. The default value is `true`. --- * `STRIP_WHITESPACE_ON_SAVE` [bool]: Strip trailing whitespace on file save. +-- * `AUTOPAIR` [bool] +-- Opening `(`, `[`, `[`, `"`, or `'` characters are automatically closed. -- The default value is `true`. --- * `MARK_HIGHLIGHT_BACK` [number]: The background color used for a line --- containing a highlighted word in `0xBBGGRR` format. --- * `INDIC_HIGHLIGHT_BACK` [number]: The color used for an indicator for a --- highlighted word in `0xBBGGRR` format. --- * `INDIC_HIGHLIGHT_ALPHA` [number]: The alpha transparency value between `0` --- (transparent) and `255` (opaque) used for an indicator for a highlighted --- word. The default value is `100`. +-- * `HIGHLIGHT_BRACES` [bool] +-- Highlight matching `()[]{}<>` characters. +-- The default value is `true`. +-- * `AUTOINDENT` [bool] +-- Match the indentation level of the previous line when pressing the Enter +-- key. +-- The default value is `true`. +-- * `STRIP_WHITESPACE_ON_SAVE` [bool] +-- Strip trailing whitespace on file save. +-- The default value is `true`. +-- * `MARK_HIGHLIGHT_BACK` [number] +-- The background color used for a line containing a highlighted word in +-- `0xBBGGRR` format. +-- * `INDIC_HIGHLIGHT_BACK` [number] +-- The color used for an indicator for a highlighted word in `0xBBGGRR` +-- format. +-- * `INDIC_HIGHLIGHT_ALPHA` [number] +-- The alpha transparency value between `0` (transparent) and `255` (opaque) +-- used for an indicator for a highlighted word. +-- The default value is `100`. M.AUTOPAIR = true M.HIGHLIGHT_BRACES = true diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 31ec6d31..1062e60b 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -10,32 +10,48 @@ module('gui.find')]] -- Markdown: -- ## Fields -- --- * `find_entry_text` [string]: The text in the find entry. --- * `replace_entry_text` [string]: The text in the replace entry. --- * `match_case` [bool]: Searches are case-sensitive. --- * `whole_word` [bool]: Only whole-word matches are allowed in searches. --- * `lua` [bool]: The search text is interpreted as a Lua pattern. --- * `in_files` [bool]: Search for the text in a list of files. --- * `find_label_text` [string]: The text of the 'Find' label. This is primarily --- used for localization. (Write-only) --- * `replace_label_text` [string]: The text of the 'Replace' label. This is --- primarily used for localization. (Write-only) --- * `find_next_button_text` [string]: The text of the 'Find Next' button. This --- is primarily used for localization. (Write-only) --- * `find_prev_button_text` [string]: The text of the 'Find Prev' button. This --- is primarily used for localization. (Write-only) --- * `replace_button_text` [string]: The text of the 'Replace' button. This is --- primarily used for localization. (Write-only) --- * `replace_all_button_text` [string]: The text of the 'Replace All' button. --- This is primarily used for localization. (Write-only) --- * `match_case_label_text` [string]: The text of the 'Match case' label. This --- is primarily used for localization. (Write-only) --- * `whole_word_label_text` [string]: The text of the 'Whole word' label. This --- is primarily used for localization. (Write-only) --- * `lua_pattern_label_text` [string]: The text of the 'Lua pattern' label. --- This is primarily used for localization. (Write-only) --- * `in_files_label_text` [string]: The text of the 'In files' label. This is --- primarily used for localization. (Write-only) +-- * `find_entry_text` [string] +-- The text in the find entry. +-- * `replace_entry_text` [string] +-- The text in the replace entry. +-- * `match_case` [bool] +-- Searches are case-sensitive. +-- * `whole_word` [bool] +-- Only whole-word matches are allowed in searches. +-- * `lua` [bool] +-- The search text is interpreted as a Lua pattern. +-- * `in_files` [bool] +-- Search for the text in a list of files. +-- * `find_label_text` [string] (Write-only) +-- The text of the 'Find' label. +-- This is primarily used for localization. +-- * `replace_label_text` [string] (Write-only) +-- The text of the 'Replace' label. +-- This is primarily used for localization. +-- * `find_next_button_text` [string] (Write-only) +-- The text of the 'Find Next' button. +-- This is primarily used for localization. +-- * `find_prev_button_text` [string] (Write-only) +-- The text of the 'Find Prev' button. +-- This is primarily used for localization. +-- * `replace_button_text` [string] (Write-only) +-- The text of the 'Replace' button. +-- This is primarily used for localization. +-- * `replace_all_button_text` [string] (Write-only) +-- The text of the 'Replace All' button. +-- This is primarily used for localization. +-- * `match_case_label_text` [string] (Write-only) +-- The text of the 'Match case' label. +-- This is primarily used for localization. +-- * `whole_word_label_text` [string] (Write-only) +-- The text of the 'Whole word' label. +-- This is primarily used for localization. +-- * `lua_pattern_label_text` [string] (Write-only) +-- The text of the 'Lua pattern' label. +-- This is primarily used for localization. +-- * `in_files_label_text` [string] (Write-only) +-- The text of the 'In files' label. +-- This is primarily used for localization. local _L = _L find.find_label_text = _L['Find:'] diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index cb59d663..40a71d70 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -244,7 +244,7 @@ local menu_actions, contextmenu_actions = {}, {} -- Also assigns key commands. -- @param menu The menu to create a gtkmenu from. -- @param contextmenu Flag indicating whether or not the menu is a context menu. --- If so, menu_id offset is 1000. Defaults to `false`. +-- If so, menu_id offset is 1000. The default value is `false`. -- @return gtkmenu that can be passed to `gui.gtkmenu()`. -- @see gui.gtkmenu local function read_menu_table(menu, contextmenu) diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua index 27d08de5..7869ea17 100644 --- a/modules/textadept/mime_types.lua +++ b/modules/textadept/mime_types.lua @@ -8,25 +8,13 @@ local M = {} module('_M.textadept.mime_types')]] -- Markdown: --- ## Overview --- --- This module adds an extra function to `buffer`: --- --- * **buffer:set\_lexer** (language)<br /> --- Replacement for [`buffer:set_lexer_language()`][buffer_set_lexer_language]. --- <br /> Sets a `buffer._lexer` field so it can be restored without querying --- the mime-types tables. Also if the user manually sets the lexer, it should --- be restored.<br /> --- Loads the language-specific module if it exists. --- - lang: The string language to set. --- --- [buffer_set_lexer_language]: buffer.html#buffer:set_lexer_language --- -- ## Mime-type Events -- --- * `_G.events.LANGUAGE_MODULE_LOADED`: Called when loading a language-specific --- module. This is useful for overriding its key commands since they are not --- available when Textadept starts. Arguments:<br /> +-- * `_G.events.LANGUAGE_MODULE_LOADED` +-- Called when loading a language-specific module. +-- This is useful for overriding its key commands since they are not available +-- when Textadept starts. +-- Arguments: -- * `lang`: The language lexer name. -- Events. diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index f200bd83..4f1aea0c 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -13,18 +13,22 @@ module('_M.textadept.run')]] -- Markdown: -- ## Run Events -- --- * `_G.events.COMPILE_OUTPUT`: Called after a compile command is executed. +-- * `_G.events.COMPILE_OUTPUT` +-- Called after a compile command is executed. -- When connecting to this event (typically from a language-specific module), -- connect with an index of `1` and return `true` if the event was handled and -- you want to override the default handler that prints the output to a new --- view.<br /> +-- view. +-- Arguments: -- * `lexer`: The lexer language. -- * `output`: The output from the command. --- * `_G.events.RUN_OUTPUT`: Called after a run command is executed. When --- connecting to this event (typically from a language-specific module), +-- * `_G.events.RUN_OUTPUT` +-- Called after a run command is executed. +-- When connecting to this event (typically from a language-specific module), -- connect with an index of `1` and return `true` if the event was handled and -- you want to override the default handler that prints the output to a new --- view.<br /> +-- view. +-- Arguments: -- * `lexer`: The lexer language. -- * `output`: The output from the command. diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index 59d0814b..b835c49a 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -10,12 +10,16 @@ module('_M.textadept.session')]] -- Markdown: -- ## Settings -- --- * `DEFAULT_SESSION` [string]: The path to the default session file. --- * `SAVE_ON_QUIT` [bool]: Save the session when quitting. The default value is --- `true` and can be disabled by passing the command line switch `-n` or --- `--nosession` to Textadept. --- * `MAX_RECENT_FILES` [number]: The maximum number of files from the recent --- files list to save to the session. The default is `10`. +-- * `DEFAULT_SESSION` [string] +-- The path to the default session file. +-- * `SAVE_ON_QUIT` [bool] +-- Save the session when quitting. +-- The default value is `true` and can be disabled by passing the command line +-- switch `-n` or `--nosession` to Textadept. +-- * `MAX_RECENT_FILES` [number] +-- The maximum number of files from the recent files list to save to the +-- session. +-- The default value is `10`. M.DEFAULT_SESSION = _USERHOME..'/session' M.SAVE_ON_QUIT = true @@ -25,8 +29,8 @@ M.MAX_RECENT_FILES = 10 -- Loads a Textadept session file. -- Textadept restores split views, opened buffers, cursor information, and -- project manager details. --- @param filename The absolute path to the session file to load. Defaults to --- `DEFAULT_SESSION` if not specified. +-- @param filename The absolute path to the session file to load. The default +-- value is `DEFAULT_SESSION`. -- @return `true` if the session file was opened and read; `false` otherwise. -- @usage _M.textadept.session.load(filename) -- @name load @@ -105,8 +109,8 @@ events.connect('arg_none', function() if M.SAVE_ON_QUIT then M.load() end end) -- Saves a Textadept session to a file. -- Saves split views, opened buffers, cursor information, and project manager -- details. --- @param filename The absolute path to the session file to save. Defaults to --- either the current session file or `DEFAULT_SESSION` if not specified. +-- @param filename The absolute path to the session file to save. The default +-- value is either the current session file or `DEFAULT_SESSION`. -- @usage _M.textadept.session.save(filename) -- @name save function M.save(filename) diff --git a/modules/textadept/snapopen.lua b/modules/textadept/snapopen.lua index ddbb489f..3b9d6622 100644 --- a/modules/textadept/snapopen.lua +++ b/modules/textadept/snapopen.lua @@ -10,10 +10,10 @@ module('_M.textadept.snapopen')]] -- Markdown: -- ## Settings -- --- * `DEFAULT_DEPTH` [number]: Maximum directory depth to search. The default --- value is `4`. --- * `MAX` [number]: Maximum number of files to list. The default value is --- `1000`. +-- * `DEFAULT_DEPTH` [number] +-- Maximum directory depth to search. The default value is `4`. +-- * `MAX` [number] +-- Maximum number of files to list. The default value is `1000`. -- -- ## Examples -- @@ -111,12 +111,12 @@ end -- excluded by adding filters to a table assigned to a `folders` key in the -- filter table. All strings should be UTF-8 encoded. -- @param exclude_PATHS Flag indicating whether or not to exclude `PATHS` in the --- search. Defaults to `false`. +-- search. The default value is `false`. -- @param exclude_FILTER Flag indicating whether or not to exclude `FILTER` from -- `filter` in the search. If false, adds `FILTER` to the given `filter`. --- Defaults to `false`. +-- The default value is `false`. -- @param depth Number of directories to recurse into for finding files. --- Defaults to `DEFAULT_DEPTH`. +-- The default value is `DEFAULT_DEPTH`. -- @usage _M.textadept.snapopen.open() -- @usage _M.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true) -- @usage _M.textadept.snapopen.open(nil, '!%.lua$') diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index bbf53c36..a99a51b8 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -294,7 +294,7 @@ M._snippet_mt = { -- slightly different when `complete` true. -- @param text Text to unescape. -- @param complete Flag indicating whether or not to also remove the extra - -- escape character '%'. Defaults to `false`. + -- escape character '%'. The default value is `false`. unescape_text = function(text, complete) text = text:gsub('\027.', escapes) return complete and text:gsub('%%([%%%(%)>%]])', '%1') or text |