aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/lua/api14
-rw-r--r--modules/lua/tags4
2 files changed, 13 insertions, 5 deletions
diff --git a/modules/lua/api b/modules/lua/api
index f4a15322..fe21725b 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -348,6 +348,7 @@ _fold lexer.lexer._fold (table)\nIf this function exists in the lexer, it is cal
_foldsymbols lexer.lexer._foldsymbols (table)\nA table of recognized fold points for the lexer.\n Keys are token names with table values defining fold points. Those table\n values have string keys of keywords or characters that indicate a fold\n point whose values are integers. A value of `1` indicates a beginning fold\n point and a value of `-1` indicates an ending fold point. Values can also\n be functions that return `1`, `-1`, or `0` (indicating no fold point) for\n keys which need additional processing.\n There is also a required `_pattern` key whose value is a table containing\n Lua pattern strings that match all fold points (the string keys contained\n in token name table values). When the lexer encounters text that matches\n one of those patterns, the matched text is looked up in its token's table\n to determine whether or not it is a fold point.
_insert textadept.snippets._insert(text)\nInserts snippet text *text* or the snippet assigned to the trigger word\nbehind the caret.\nOtherwise, if a snippet is active, goes to the active snippet's next\nplaceholder. Returns `false` if no action was taken.\n@param text Optional snippet text to insert. If `nil`, attempts to insert a\n new snippet based on the trigger, the word behind caret, and the current\n lexer.\n@return `false` if no action was taken; `nil` otherwise.\n@see buffer.word_chars
_lexer lexer.lexer._lexer (table)\nThe parent lexer object whose rules should be used. This field\n is only necessary to disambiguate a proxy lexer that loaded parent and\n child lexers for embedding and ended up having multiple parents loaded.
+_paths textadept.snippets._paths (table)\nList of paths to search for snippet files in.\nEach file in a snippet path is a snippet whose trigger word is the file's\nname (ignoring an optional extension) and whose snippet text is the file's\ncontent (excluding a trailing newline if it exists). The file name may also\nbe prefixed with a lexer language followed by a '.' in order to designate\nthe snippet as a language-specific snippet.
_previous textadept.snippets._previous()\nJumps back to the previous snippet placeholder, reverting any changes from\nthe current one.\nReturns `false` if no snippet is active.\n@return `false` if no snippet is active; `nil` otherwise.
_print ui._print(buffer_type, ...)\nPrints the given string messages to the buffer of type *buffer_type*.\nOpens a new buffer for printing messages to if necessary. If the message\nbuffer is already open in a view, the message is printed to that view.\nOtherwise the view is split (unless `ui.tabs` is `true`) and the message\nbuffer is displayed before being printed to.\n@param buffer_type String type of message buffer.\n@param ... Message strings.\n@usage ui._print(_L['[Message Buffer]'], message)
_rules lexer.lexer._rules (table)\nAn ordered list of rules for a lexer grammar.\n Each rule is a table containing an arbitrary rule name and the LPeg pattern\n associated with the rule. The order of rules is important as rules are\n matched sequentially.\n Child lexers should not use this table to access and/or modify their\n parent's rules and vice-versa. Use the `_RULES` table instead.
@@ -615,7 +616,7 @@ flush io.flush()\nEquivalent to `io.output():flush()`.
fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that rounds the\nquotient towards zero. (integer/float)
focus ui.command_entry.focus()\nOpens the command entry.
focus ui.find.focus()\nDisplays and focuses the Find & Replace Pane.
-fold lexer.fold(lexer, text, start_pos, start_line, start_level)\nFolds a chunk of text *text* with lexer *lexer*.\nFolds *text* starting at position *start_pos* on line number *start_line*\nwith a beginning fold level of *start_level* in the buffer. If *lexer* has a\na `_fold` function or a `_foldsymbols` table, that field is used to perform\nfolding. Otherwise, if *lexer* has a `_FOLDBYINDENTATION` field set, or if a\n`fold.by.indentation` property is set, folding by indentation is done.\n@param lexer The lexer object to fold with.\n@param text The text in the buffer to fold.\n@param start_pos The position in the buffer *text* starts at.\n@param start_line The line number *text* starts on.\n@param start_level The fold level *text* starts on.\n@return table of fold levels.
+fold lexer.fold(lexer, text, start_pos, start_line, start_level)\nFolds a chunk of text *text* with lexer *lexer*.\nFolds *text* starting at position *start_pos* on line number *start_line*\nwith a beginning fold level of *start_level* in the buffer. If *lexer* has a\na `_fold` function or a `_foldsymbols` table, that field is used to perform\nfolding. Otherwise, if *lexer* has a `_FOLDBYINDENTATION` field set, or if a\n`fold.by.indentation` property is set, folding by indentation is done.\n@param lexer The lexer object to fold with.\n@param text The text in the buffer to fold.\n@param start_pos The position in the buffer *text* starts at, starting at\n zero.\n@param start_line The line number *text* starts on.\n@param start_level The fold level *text* starts on.\n@return table of fold levels.
fold_all buffer.fold_all(buffer, action)\nContracts, expands, or toggles all fold points, depending on *action*.\nWhen toggling, the state of the first fold point determines whether to\nexpand or contract.\n@param buffer A buffer.\n@param action The fold action to perform. Valid values are:\n * `buffer.FOLDACTION_CONTRACT`\n * `buffer.FOLDACTION_EXPAND`\n * `buffer.FOLDACTION_TOGGLE`
fold_children buffer.fold_children(buffer, line, action)\nContracts, expands, or toggles the fold point on line number *line*, as well\nas all of its children, depending on *action*.\n@param buffer A buffer.\n@param line The line number in *buffer* to set the fold states for.\n@param action The fold action to perform. Valid values are:\n * `buffer.FOLDACTION_CONTRACT`\n * `buffer.FOLDACTION_EXPAND`\n * `buffer.FOLDACTION_TOGGLE`
fold_expanded buffer.fold_expanded (table)\nTable of flags that indicate whether or not fold points are expanded for\nline numbers starting from zero.\nSetting expanded fold states does not toggle folds; it only updates fold\nmargin markers. Use `buffer.toggle_fold()` instead.
@@ -681,6 +682,7 @@ html _G.snippets.html (table)\nContainer for HTML-specific snippets.
html _M.html (module)\nThe html module.\nIt provides utilities for editing HTML code.
huge math.huge (number)\nThe float value `HUGE_VAL`, a value larger than any other numerical value.
iconv string.iconv(text, new, old)\nConverts string *text* from encoding *old* to encoding *new* using iconv,\nreturning the string result.\nValid encodings are GNU iconv's encodings and include:\n\n * European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U,\n KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},\n Mac{Roman,CentralEurope,Iceland,Croatian,Romania},\n Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh.\n * Semitic: ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}.\n * Japanese: EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2,\n ISO-2022-JP-1.\n * Chinese: EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950,\n BIG5-HKSCS, BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999,\n ISO-2022-CN, ISO-2022-CN-EXT.\n * Korean: EUC-KR, CP949, ISO-2022-KR, JOHAB.\n * Armenian: ARMSCII-8.\n * Georgian: Georgian-Academy, Georgian-PS.\n * Tajik: KOI8-T.\n * Kazakh: PT154, RK1048.\n * Thai: ISO-8859-11, TIS-620, CP874, MacThai.\n * Laotian: MuleLao-1, CP1133.\n * Vietnamese: VISCII, TCVN, CP1258.\n * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16,\n UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.\n@param text The text to convert.\n@param new The string encoding to convert to.\n@param old The string encoding to convert from.
+idle_styling buffer.idle_styling (number)\nThe idle styling mode.\nThis mode has no effect when `buffer.wrap_mode` is on.\n\n* `buffer.IDLESTYLING_NONE`\n Style all the currently visible text before displaying it.\n* `buffer.IDLESTYLING_TOVISIBLE`\n Style some text before displaying it and then style the rest\n incrementally in the background as an idle-time task.\n* `buffer.IDLESTYLING_AFTERVISIBLE`\n Style text after the currently visible portion in the background.\n* `buffer.IDLESTYLING_ALL`\n Style text both before and after the visible text in the background.\n\nThe default value is `buffer.IDLESTYLING_NONE`.
in_files ui.find.in_files (bool)\nFind search text in a list of files.\nThe default value is `false`.
in_files_label_text ui.find.in_files_label_text (string, Write-only)\nThe text of the "In files" label.\nThis is primarily used for localization.
indent buffer.indent (number)\nThe number of spaces in one level of indentation.\nThe default value is `0`, which uses the value of `buffer.tab_width`.
@@ -714,7 +716,7 @@ keys _G.keys (module)\nManages key bindings in Textadept.
keys _G.keys (table)\nMap of key bindings to commands, with language-specific key tables assigned\nto a lexer name key.
keys textadept.keys (module)\nDefines key commands for Textadept.\nThis set of key commands is pretty standard among other text editors. If\napplicable, load this module second to last in your *~/.textadept/init.lua*,\nbefore `textadept.menu`.
kill spawn_proc:kill(signal)\nKills running process *spawn_proc*, or sends it Unix signal *signal*.\n@param signal Optional Unix signal to send to *spawn_proc*. The default value\n is 9 (`SIGKILL`), which kills the process.
-last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies that string set *s* contains the\nfirst non-whitespace character behind the current match position.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = #P('/') * l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/')\n@return pattern
+last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies that string set *s* contains the\nfirst non-whitespace character behind the current match position.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/')\n@return pattern
ldexp math.ldexp(m, e)\nReturns 'm2^e' (`e` should be an integer).\n\nDeprecated in Lua 5.3.
len string.len(s)\nReceives a string and returns its length. The empty string `""` has\nlength 0. Embedded zeros are counted, so `"a\000bc\000"` has length 5.
len utf8.len(s [, i [, j]])\nReturns the number of UTF-8 characters in string `s` that start between\npositions `i` and `j` (both inclusive). The default for `i` is 1 and for `j`\nis -1. If it finds any invalid byte sequence, returns a false value plus the\nposition of the first invalid byte.\n\nNew in Lua 5.3.
@@ -741,12 +743,14 @@ line_end_rect_extend buffer.line_end_rect_extend(buffer)\nMoves the caret to the
line_end_wrap buffer.line_end_wrap(buffer)\nMoves the caret to the end of the current wrapped line or, if already there,\nto the end of the actual line.\n@param buffer A buffer.
line_end_wrap_extend buffer.line_end_wrap_extend(buffer)\nLike `buffer.line_end_wrap()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
line_from_position buffer.line_from_position(buffer, pos)\nReturns the line number of the line that contains position *pos*.\nReturns `0` if *pos* is less than 0 or `buffer.line_count` if *pos* is\ngreater than `buffer.length`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the line number of.\n@return number
+line_from_position lexer.line_from_position(pos)\nReturns the line number of the line that contains position *pos*, which\nstarts from 1.\n@param pos The position to get the line number of.\n@return number
line_indent_position buffer.line_indent_position (table, Read-only)\nTable of positions at the ends of indentation for line numbers starting\nfrom zero.
line_indentation buffer.line_indentation (table)\nTable of column indentation amounts, for line numbers starting from zero.
line_length buffer.line_length(buffer, line)\nReturns the number of bytes on line number *line*, including end of line\ncharacters.\nTo get line length excluding end of line characters, use\n`buffer.line_end_position[line] - buffer.position_from_line(line)`.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the length of.\n@return number
line_scroll buffer.line_scroll(buffer, columns, lines)\nScrolls the buffer right *columns* columns and down *lines* lines.\nNegative values are allowed.\n@param buffer A buffer.\n@param columns The number of columns to scroll horizontally.\n@param lines The number of lines to scroll vertically.
line_scroll_down buffer.line_scroll_down(buffer)\nScrolls the buffer down one line, keeping the caret visible.\n@param buffer A buffer.
line_scroll_up buffer.line_scroll_up(buffer)\nScrolls the buffer up one line, keeping the caret visible.\n@param buffer A buffer.
+line_state lexer.line_state (table)\nTable of integer line states for line numbers starting from zero.\nLine states can be used by lexers for keeping track of persistent states.
line_transpose buffer.line_transpose(buffer)\nSwaps the current line with the previous one.\n@param buffer A buffer.
line_up buffer.line_up(buffer)\nMoves the caret up one line.\n@param buffer A buffer.
line_up_extend buffer.line_up_extend(buffer)\nMoves the caret up one line, extending the selected text to the new position.\n@param buffer A buffer.
@@ -888,7 +892,7 @@ popen io.popen(prog [, mode])\nStarts program `prog` in a separated process and
position_after buffer.position_after(buffer, pos)\nReturns the position of the character after position *pos* (taking multi-byte\ncharacters into account), or `buffer.length` if there is no character after\n*pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position after from.
position_before buffer.position_before(buffer, pos)\nReturns the position of the character before position *pos* (taking\nmulti-byte characters into account), or `0` if there is no character before\n*pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position before from.\n@return number
position_from_line buffer.position_from_line(buffer, line)\nReturns the position at the beginning of line number *line*.\nReturns `-1` if *line* is greater than `buffer.line_count`.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the beginning position for.\n@return number
-position_relative buffer.position_relative(buffer, pos, n)\nReturns the position *n* characters before or after position *pos* (taking\nmulti-byte characters into account).\nReturns `0` if the position is less than 0 or `buffer.length` if the position\nis greater than `buffer.length`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the relative position from.\n@param n The relative number of characters to get the position for. A\n negative number indicates a position before while a positive number\n indicates a position after.\n@return number
+position_relative buffer.position_relative(buffer, pos, n)\nReturns the position *n* characters before or after position *pos* (taking\nmulti-byte characters into account).\nReturns `0` if the position is less than 0 or greater than `buffer.length`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the relative position from.\n@param n The relative number of characters to get the position for. A\n negative number indicates a position before while a positive number\n indicates a position after.\n@return number
pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to compute this\nvalue.)\n\nDeprecated in Lua 5.3.
preload package.preload (table)\nA table to store loaders for specific modules (see `require`).\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`.
print _G.print(···)\nReceives any number of arguments and prints their values to `stdout`, using\nthe `tostring` function to convert each argument to a string. `print` is not\nintended for formatted output, but only as a quick way to show a value,\nfor instance for debugging. For complete control over the output, use\n`string.format` and `io.write`.
@@ -1075,7 +1079,7 @@ stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nLike `buff
stuttered_page_up buffer.stuttered_page_up(buffer)\nMoves the caret to the top of the page or, if already there, up one page.\n@param buffer A buffer.
stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nLike `buffer.stuttered_page_up()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
style_at buffer.style_at (table, Read-only)\nTable of style numbers at positions starting from zero.
-style_at lexer.style_at (table, Read-only)\nTable of style names at positions in the buffer starting from zero.
+style_at lexer.style_at (table, Read-only)\nTable of style names at positions in the buffer starting from 1.
style_back buffer.style_back (table)\nTable of background colors, in "0xBBGGRR" format, of text for style numbers\nfrom `0` to `255`.
style_bold buffer.style_bold (table)\nTable of flags that indicate whether or not text is bold for style numbers\nfrom `0` to `255`.\nThe default values are `false`.
style_case buffer.style_case (table)\nTable of letter case modes of text for style numbers from `0` to `255`.\n\n* `buffer.CASE_MIXED`\n Display text in normally.\n* `buffer.CASE_UPPER`\n Display text in upper case.\n* `buffer.CASE_LOWER`\n Display text in lower case.\n* `buffer.CASE_CAMEL`\n Display text in camel case.\n\nThe default values are `buffer.CASE_MIXED`.
@@ -1208,7 +1212,7 @@ wrap_visual_flags buffer.wrap_visual_flags (number)\nThe wrapped line visual fla
wrap_visual_flags_location buffer.wrap_visual_flags_location (number)\nThe wrapped line visual flag drawing mode.\n\n* `buffer.WRAPVISUALFLAGLOC_DEFAULT`\n Draw a visual flag near the view's right margin.\n* `buffer.WRAPVISUALFLAGLOC_END_BY_TEXT`\n Draw a visual flag near text at the end of a wrapped line.\n* `buffer.WRAPVISUALFLAGLOC_START_BY_TEXT`\n Draw a visual flag near text at the beginning of a subline.\n\nThe default value is `buffer.WRAPVISUALFLAGLOC_DEFAULT`.
write file:write(···)\nWrites the value of each of its arguments to `file`. The arguments must be\nstrings or numbers.\n\nIn case of success, this function returns `file`. Otherwise it returns nil\nplus a string describing the error.
write io.write(···)\nEquivalent to `io.output():write(···)`.
-write spawn_proc:write(...)\nWrites string input to the stdin of process *spawn_proc*.\n@param ... Standard input for *spawn_proc*.
+write spawn_proc:write(...)\nWrites string input to the stdin of process *spawn_proc*.\nNote: On Linux, if more than 65536 bytes (64K) are to be written, it is\npossible those bytes need to be written in 65536-byte (64K) chunks, or the\nprocess may not receive all input. However, it is also possible that there is\na limit on how many bytes can be written in a short period of time, perhaps\n196608 bytes (192K).\n@param ... Standard input for *spawn_proc*.
x_offset buffer.x_offset (number)\nThe horizontal scroll pixel position.\nA value of `0` is the normal position with the first text column visible at\nthe left of the view.
xdigit lexer.xdigit (pattern)\nA pattern that matches any hexadecimal digit ('0'-'9', 'A'-'F', 'a'-'f').
xor bit32.xor(...)\nReturns the bitwise "exclusive or" of its operands.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
diff --git a/modules/lua/tags b/modules/lua/tags
index e27b0a9a..ddeb2b41 100644
--- a/modules/lua/tags
+++ b/modules/lua/tags
@@ -356,6 +356,7 @@ _fold _ 0;" F class:lexer.lexer
_foldsymbols _ 0;" F class:lexer.lexer
_insert _ 0;" f class:textadept.snippets
_lexer _ 0;" F class:lexer.lexer
+_paths _ 0;" t class:textadept.snippets
_previous _ 0;" f class:textadept.snippets
_print _ 0;" f class:ui
_rules _ 0;" F class:lexer.lexer
@@ -689,6 +690,7 @@ html _ 0;" t class:keys
html _ 0;" t class:snippets
huge _ 0;" F class:math
iconv _ 0;" f class:string
+idle_styling _ 0;" F class:buffer
in_files _ 0;" F class:ui.find
in_files_label_text _ 0;" F class:ui.find
indent _ 0;" F class:buffer
@@ -749,12 +751,14 @@ line_end_rect_extend _ 0;" f class:buffer
line_end_wrap _ 0;" f class:buffer
line_end_wrap_extend _ 0;" f class:buffer
line_from_position _ 0;" f class:buffer
+line_from_position _ 0;" f class:lexer
line_indent_position _ 0;" F class:buffer
line_indentation _ 0;" F class:buffer
line_length _ 0;" f class:buffer
line_scroll _ 0;" f class:buffer
line_scroll_down _ 0;" f class:buffer
line_scroll_up _ 0;" f class:buffer
+line_state _ 0;" F class:lexer
line_transpose _ 0;" f class:buffer
line_up _ 0;" f class:buffer
line_up_extend _ 0;" f class:buffer