From b3d0b5defde02020ad41225b4b11e82c4ea90af9 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 10 Feb 2012 13:55:34 -0500 Subject: Update LuaDoc with new formatting. --- core/.buffer.luadoc | 1322 ++++++++++++++++++++--------------- core/.view.luadoc | 12 +- core/events.lua | 172 +++-- core/file_io.lua | 20 +- core/gui.lua | 24 +- core/init.lua | 29 +- core/keys.lua | 37 +- core/locale.lua | 4 +- modules/cpp/init.lua | 19 +- modules/lua/init.lua | 21 +- modules/lua/lua.luadoc | 58 +- modules/textadept/adeptsense.lua | 53 +- modules/textadept/bookmarks.lua | 4 +- modules/textadept/command_entry.lua | 3 +- modules/textadept/editing.lua | 36 +- modules/textadept/find.lua | 68 +- modules/textadept/menu.lua | 2 +- modules/textadept/mime_types.lua | 22 +- modules/textadept/run.lua | 14 +- modules/textadept/session.lua | 24 +- modules/textadept/snapopen.lua | 14 +- modules/textadept/snippets.lua | 2 +- scripts/adeptsensedoc.lua | 23 +- scripts/update_doc | 1 + 24 files changed, 1134 insertions(+), 850 deletions(-) diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index f7a6fef5..27f8f27f 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -10,604 +10,779 @@ module('buffer') -- Markdown: -- ## Fields -- --- * `additional_caret_fore` [number]: The foreground color of additional carets --- in `0xBBGGRR` format. --- * `additional_carets_blink` [bool]: Whether additional carets will blink. --- * `additional_carets_visible` [bool]: Whether additional carets are visible. --- * `additional_sel_alpha` [number]: The alpha of additional selections. --- Alpha ranges from `0` (transparent) to `255` (opaque) or `256` for no --- alpha. --- * `additional_sel_back` [number]: The background color of additional --- selections in `0xBBGGRR` format. `buffer:set_sel_back(true, ...)` must have --- been called previously for this to have an effect. --- * `additional_sel_fore` [number]: The foreground color of additional --- selections in `0xBBGGRR` format. `buffer:set_sel_fore(true, ...)` must have --- been called previously for this to have an effect. --- * `additional_selection_typing` [bool]: Whether typing can be performed into --- multiple selections. --- * `anchor` [number]: The position of the opposite end of the selection to the --- caret. --- * `annotation_lines` [table]: Table of the number of annotation lines for --- lines starting from zero. (Read-only) --- * `annotation_style` [table]: Table of style numbers for annotations for --- lines starting at zero. --- * `annotation_style_offset` [number]: The start of the range of style numbers --- used for annotations. Annotation styles may be completely separated from --- standard text styles by setting a style offset. For example, setting this --- to `512` would allow the annotation styles to be numbered from `512` upto --- `767` so they do not overlap styles set by lexers (or margins if margins --- offset is `256`). Each style number set with `buffer.annotation_style` has --- the offset added before looking up the style. --- * `annotation_visible` [number]: The visibility of annotations.
--- * `_SCINTILLA.constants.ANNOTATION_HIDDEN` (0): Annotations are not --- displayed. --- * `_SCINTILLA.constants.ANNOTATION_STANDARD` (1): Annotations are drawn --- left justified with no adornment. --- * `_SCINTILLA.constants.ANNOTATION_BOXED` (2): Annotations are indented --- to match the text and are surrounded by a box. --- * `auto_c_auto_hide` [bool]: Whether or not autocompletion is hidden --- automatically when nothing matches. By default, the list is cancelled if --- there are no viable matches (the user has typed characters that no longer --- match a list entry). --- * `auto_c_cancel_at_start` [bool]: Whether auto-completion is cancelled by --- backspacing to a position before where the box was created. If `false`, the --- list is not cancelled until the caret moves before the first character of --- the word being completed. --- should be cancelled if the user backspaces to a position before where it --- was created. --- * `auto_c_choose_single` [bool]: Whether a single item auto-completion list --- automatically choose the item. The default is to display the list even if --- there is only a single item. --- * `auto_c_drop_rest_of_word` [bool]: Whether or not autocompletion deletes --- any word characters after the inserted text upon completion. The default is --- `false`. --- * `auto_c_fill_ups` [string]: A set of characters that when typed will cause --- the autocompletion to choose the selected item. By default, no fillup --- characters are set. (Write-only) --- * `auto_c_ignore_case` [bool]: Whether case is significant when performing --- auto-completion searches. By default, matching of characters to list --- members is case sensitive. --- * `auto_c_max_height` [number]: The maximum height, in rows, of --- auto-completion and user lists. The default is 5 rows. --- * `auto_c_max_width` [number]: The maximum width, in characters, of --- auto-completion and user lists. Set to `0` to autosize to fit longest item, --- which is the default. --- * `auto_c_separator` [number]: The auto-completion list separator character --- byte. The default is the space character. --- * `auto_c_type_separator` [number]: The auto-completion list type-separator --- character byte. The default is `'?'`. Autocompletion list items may display --- an image as well as text. Each image is first registered with an integer --- type. Then this integer is included in the text of the list separated by a --- `?` from the text. --- * `back_space_un_indents` [bool]: Whether a backspace pressed when caret is --- within indentation unindents. --- * `buffered_draw` [bool]: Whether drawing is buffered. If drawing is buffered --- then each line of text is drawn into a bitmap buffer before drawing it to --- the screen to avoid flicker. The default is for drawing to be buffered. --- first or directly onto the screen. --- * `call_tip_back` [number]: The background color for the call tip in --- `0xBBGGRR` format. (Write-only) --- * `call_tip_fore` [number]: The foreground color for the call tip in --- `0xBBGGRR` format. (Write-only) --- * `call_tip_fore_hlt` [number]: The foreground color for the highlighted part --- of the call tip in `0xBBGGRR` format. (Write-only) --- * `call_tip_position` [boolean]: The position of calltip, above or below --- text. By default the calltip is displayed below the text. Setting to `true` --- will display it above the text. --- * `call_tip_use_style` [number]: Enable use of --- `_SCINTILLA.constants.STYLE_CALLTIP` and set call tip tab size in pixels. +-- * `additional_caret_fore` [number] +-- The foreground color of additional carets in `0xBBGGRR` format. +-- * `additional_carets_blink` [bool] +-- Whether additional carets will blink. +-- * `additional_carets_visible` [bool] +-- Whether additional carets are visible. +-- * `additional_sel_alpha` [number] +-- The alpha of additional selections. Alpha ranges from `0` (transparent) to +-- `255` (opaque) or `256` for no alpha. +-- * `additional_sel_back` [number] +-- The background color of additional selections in `0xBBGGRR` format. +-- `buffer:set_sel_back(true, ...)` must have been called previously for this +-- to have an effect. +-- * `additional_sel_fore` [number] +-- The foreground color of additional selections in `0xBBGGRR` format. +-- `buffer:set_sel_fore(true, ...)` must have been called previously for this +-- to have an effect. +-- * `additional_selection_typing` [bool] +-- Whether typing can be performed into multiple selections. +-- * `anchor` [number] +-- The position of the opposite end of the selection to the caret. +-- * `annotation_lines` [table] (Read-only) +-- Table of the number of annotation lines for lines starting from zero. +-- * `annotation_style` [table] +-- Table of style numbers for annotations for lines starting at zero. +-- * `annotation_style_offset` [number] +-- The start of the range of style numbers used for annotations. +-- Annotation styles may be completely separated from standard text styles by +-- setting a style offset. For example, setting this to `512` would allow the +-- annotation styles to be numbered from `512` upto `767` so they do not +-- overlap styles set by lexers (or margins if margins offset is `256`). Each +-- style number set with `buffer.annotation_style` has the offset added before +-- looking up the style. +-- * `annotation_visible` [number] +-- The visibility of annotations. +-- * `_SCINTILLA.constants.ANNOTATION_HIDDEN` (0) +-- Annotations are not displayed. +-- * `_SCINTILLA.constants.ANNOTATION_STANDARD` (1) +-- Annotations are drawn left justified with no adornment. +-- * `_SCINTILLA.constants.ANNOTATION_BOXED` (2) +-- Annotations are indented to match the text and are surrounded by a +-- box. +-- * `auto_c_auto_hide` [bool] +-- Whether or not autocompletion is hidden automatically when nothing matches. +-- By default, the list is cancelled if there are no viable matches (the user +-- has typed characters that no longer match a list entry). +-- * `auto_c_cancel_at_start` [bool] +-- Whether auto-completion is cancelled by backspacing to a position before +-- where the box was created. +-- If `false`, the list is not cancelled until the caret moves before the +-- first character of the word being completed. If `true`, cancel if the user +-- backspaces to a position before where it was created. +-- * `auto_c_choose_single` [bool] +-- Whether a single item auto-completion list automatically choose the item. +-- The default is to display the list even if there is only a single item. +-- * `auto_c_drop_rest_of_word` [bool] +-- Whether or not autocompletion deletes any word characters after the +-- inserted text upon completion. +-- The default is `false`. +-- * `auto_c_fill_ups` [string] (Write-only) +-- A set of characters that when typed will cause the autocompletion to choose +-- the selected item. +-- By default, no fillup characters are set. +-- * `auto_c_ignore_case` [bool] +-- Whether case is significant when performing auto-completion searches. +-- By default, matching of characters to list members is case sensitive. +-- * `auto_c_max_height` [number] +-- The maximum height, in rows, of auto-completion and user lists. +-- The default is 5 rows. +-- * `auto_c_max_width` [number] +-- The maximum width, in characters, of auto-completion and user lists. +-- Set to `0` to autosize to fit longest item, which is the default. +-- * `auto_c_separator` [number] +-- The auto-completion list separator character byte. +-- The default is the space character. +-- * `auto_c_type_separator` [number] +-- The auto-completion list type-separator character byte. +-- The default is `'?'`. Autocompletion list items may display an image as +-- well as text. Each image is first registered with an integer type. Then +-- this integer is included in the text of the list separated by a `?` from +-- the text. +-- * `back_space_un_indents` [bool] +-- Whether a backspace pressed when caret is within indentation unindents. +-- * `buffered_draw` [bool] +-- Whether drawing is buffered. +-- If drawing is buffered then each line of text is drawn into a bitmap buffer +-- before drawing it to the screen to avoid flicker. The default is for +-- drawing to be buffered. first or directly onto the screen. +-- * `call_tip_back` [number] (Write-only) +-- The background color for the call tip in `0xBBGGRR` format. +-- * `call_tip_fore` [number] (Write-only) +-- The foreground color for the call tip in `0xBBGGRR` format. +-- * `call_tip_fore_hlt` [number] (Write-only) +-- The foreground color for the highlighted part of the call tip in `0xBBGGRR` +-- format. +-- * `call_tip_position` [boolean] +-- The position of calltip, above or below text. +-- By default the calltip is displayed below the text. Setting to `true` will +-- display it above the text. +-- * `call_tip_use_style` [number] +-- Enable use of `_SCINTILLA.constants.STYLE_CALLTIP` and set call tip tab +-- size in pixels. -- If the tab size is less than `1`, Tab characters are not treated specially. --- * `caret_fore` [number]: The foreground color of the caret in `0xBBGGRR` +-- * `caret_fore` [number] +-- The foreground color of the caret in `0xBBGGRR` format. +-- * `caret_line_back` [number] +-- The color of the background of the line containing the caret in `0xBBGGRR` -- format. --- * `caret_line_back` [number]: The color of the background of the line --- containing the caret in `0xBBGGRR` format. --- * `caret_line_back_alpha` [number]: The background alpha of the caret line. +-- * `caret_line_back_alpha` [number] +-- The background alpha of the caret line. -- Alpha ranges from `0` (transparent) to `255` (opaque) or `256` for no -- alpha. --- * `caret_line_visible` [bool]: Whether the background of the line containing --- the caret is in a different color. --- * `caret_period` [number]: The time in milliseconds that the caret is on and --- off. Setting the period to `0` stops the caret blinking. The default value --- is 500 milliseconds. --- * `caret_sticky` [number]: The caret preferred x position changing when the --- user types.
--- * `_SCINTILLA.constants.SC_CARETSTICKY_OFF` (0): All text changes (and --- all caret position changes) will remember the caret's new horizontal --- position when moving to different lines. This is the default. --- * `_SCINTILLA.constants.SC_CARETSTICKY_ON` (1): The only thing which --- will cause the editor to remember the horizontal caret position is --- moving the caret with mouse or keyboard (left/right arrow keys, --- home/end keys, etc). --- * `_SCINTILLA.constants.SC_CARETSTICKY_WHITESPACE` (2): The caret acts --- like sticky off except under one special case; when space or tab --- characters are inserted. (Including pasting *only space/tabs* -- --- undo, redo, etc. do not exhibit this behavior..). --- * `caret_style` [number]: The style of the caret to be drawn.
--- * `_SCINTILLA.constants.CARETSTYLE_INVISIBLE` (0): Not draw the caret --- at all. --- * `_SCINTILLA.constants.CARETSTYLE_LINE` (1): A line caret. This is the --- default value. --- * `_SCINTILLA.constants.CARETSTYLE_BLOCK` (2): A block caret. --- * `caret_width` [number]: The width of the insert mode caret in pixels. Can --- be `0`, `1`, `2` or `3` pixels. The default width is 1 pixel. This setting --- only affects the width of the cursor when the cursor style is set to line --- caret mode, it does not affect the width for a block caret. --- * `char_at` [table]: Table of character bytes at positions in the document --- starting at zero. (Read-only) --- * `code_page` [number]: The code page used to interpret the bytes of the --- document as characters. The `_SCINTILLA.constants.SC_CP_UTF8` value can be --- used to enter Unicode mode. --- * `column` [table]: Table of column numbers, taking tab widths into account, --- for positions starting from zero. (Read-only) --- * `control_char_symbol` [number]: The way control characters are displayed. +-- * `caret_line_visible` [bool] +-- Whether the background of the line containing the caret is in a different +-- color. +-- * `caret_period` [number] +-- The time in milliseconds that the caret is on and off. +-- Setting the period to `0` stops the caret blinking. The default value is +-- 500 milliseconds. +-- * `caret_sticky` [number] +-- The caret preferred x position changing when the user types. +-- * `_SCINTILLA.constants.SC_CARETSTICKY_OFF` (0) +-- All text changes (and all caret position changes) will remember the +-- caret's new horizontal position when moving to different lines. +-- This is the default. +-- * `_SCINTILLA.constants.SC_CARETSTICKY_ON` (1) +-- The only thing which will cause the editor to remember the horizontal +-- caret position is moving the caret with mouse or keyboard (left/right +-- arrow keys, home/end keys, etc). +-- * `_SCINTILLA.constants.SC_CARETSTICKY_WHITESPACE` (2) +-- The caret acts like sticky off except under one special case; when +-- space or tab characters are inserted. (Including pasting +-- *only space/tabs* -- undo, redo, etc. do not exhibit this behavior.) +-- * `caret_style` [number] +-- The style of the caret to be drawn. +-- * `_SCINTILLA.constants.CARETSTYLE_INVISIBLE` (0) +-- Not draw the caret at all. +-- * `_SCINTILLA.constants.CARETSTYLE_LINE` (1) +-- A line caret. This is the default value. +-- * `_SCINTILLA.constants.CARETSTYLE_BLOCK` (2) +-- A block caret. +-- * `caret_width` [number] +-- The width of the insert mode caret in pixels. +-- Can be `0`, `1`, `2` or `3` pixels. The default width is 1 pixel. This +-- setting only affects the width of the cursor when the cursor style is set +-- to line caret mode, it does not affect the width for a block caret. +-- * `char_at` [table] (Read-only) +-- Table of character bytes at positions in the document starting at zero. +-- * `code_page` [number] +-- The code page used to interpret the bytes of the document as characters. +-- The `_SCINTILLA.constants.SC_CP_UTF8` value can be used to enter Unicode +-- mode. +-- * `column` [table] (Read-only) +-- Table of column numbers, taking tab widths into account, for positions +-- starting from zero. +-- * `control_char_symbol` [number] +-- The way control characters are displayed. -- If less than `32`, keep the rounded rectangle as ASCII mnemonics. -- Otherwise, use the given character byte. The default value is `0`. --- * `current_pos` [number]: The position of the caret. When setting, the caret --- is not scrolled into view. --- * `cursor` [number]: The cursor type.
--- * `_SCINTILLA.constants.SC_CURSORNORMAL` (-1): The normal cursor is --- displayed. --- * `_SCINTILLA.constants.SC_CURSORWAIT` (4): The wait cursor is --- displayed when the mouse is over the view. --- * `direct_function` [number]: A pointer to a function that processes messages --- for this view. (Read-only) --- * `direct_pointer` [number]: A pointer value to use as the first argument --- when calling the function returned by direct_function. (Read-only) --- * `dirty` [bool]: Flag indicating whether or not the buffer has been modified --- since it was last saved. --- * `eol_mode` [number]: The current end of line mode.
--- * `_SCINTILLA.constants.SC_EOL_CRLF` (0): `CRLF`. --- * `_SCINTILLA.constants.SC_EOL_CR` (1): `CR`. --- * `_SCINTILLA.constants.SC_EOL_LF` (2): `LF`. --- * `edge_colour` [number]: The color used in edge indication in `0xBBGGRR` --- format. --- * `edge_column` [number]: The column number which text should be kept within. --- * `edge_mode` [number]: The edge highlight mode.
--- * `_SCINTILLA.constants.EDGE_NONE` (0): Long lines are not marked. This --- is the default state. --- * `_SCINTILLA.constants.EDGE_LINE` (1): A vertical line is drawn at the --- column number set by `buffer.edge_column`. --- * `_SCINTILLA.constants.EDGE_BACKGROUND` (2): The background color of --- characters after the column limit is changed to the color set by --- `buffer.edge_colour`. --- * `encoding` [string or nil]: The encoding of the file on the hard disk. It --- will be `nil` if the file is a binary file. --- * `encoding_bom` [string]: The byte-order mark of the file encoding (if any). --- * `end_at_last_line` [bool]: Whether the maximum scroll position has the last --- line at the bottom of the view. If `false`, allows scrolling one page below --- the last line. The default value is `true`. --- * `end_styled` [number]: The position of the last correctly styled character. --- (Read-only) --- * `extra_ascent` [number]: The extra ascent, the maximum that any style --- extends above the baseline, added to each line. --- * `extra_descent` [number]: The extra descent, the maximum that any style --- extends below the baseline, added to each line. --- * `filename` [string]: The absolute path to the file associated with this --- buffer. It is encoded in UTF-8. Use [`string.iconv()`][string_iconv] for --- charset conversions. --- * `first_visible_line` [number]: The display line at the top of the display. --- * `focus` [bool]: The internal focus flag. --- * `fold_expanded` [bool]: Expanded state of a header line. --- * `fold_level` [table]: Table of fold levels for lines starting from zero. +-- * `current_pos` [number] +-- The position of the caret. +-- When setting, the caret is not scrolled into view. +-- * `cursor` [number] +-- The cursor type. +-- * `_SCINTILLA.constants.SC_CURSORNORMAL` (-1) +-- The normal cursor is displayed. +-- * `_SCINTILLA.constants.SC_CURSORWAIT` (4) +-- The wait cursor is displayed when the mouse is over the view. +-- * `direct_function` [number] (Read-only) +-- A pointer to a function that processes messages for this view. +-- * `direct_pointer` [number] (Read-only) +-- A pointer value to use as the first argument when calling the function +-- returned by direct_function. +-- * `dirty` [bool] +-- Flag indicating whether or not the buffer has been modified since it was +-- last saved. +-- * `eol_mode` [number] +-- The current end of line mode. +-- * `_SCINTILLA.constants.SC_EOL_CRLF` (0) +-- `CRLF`. +-- * `_SCINTILLA.constants.SC_EOL_CR` (1) +-- `CR`. +-- * `_SCINTILLA.constants.SC_EOL_LF` (2) +-- `LF`. +-- * `edge_colour` [number] +-- The color used in edge indication in `0xBBGGRR` format. +-- * `edge_column` [number] +-- The column number which text should be kept within. +-- * `edge_mode` [number] +-- The edge highlight mode. +-- * `_SCINTILLA.constants.EDGE_NONE` (0) +-- Long lines are not marked. This is the default state. +-- * `_SCINTILLA.constants.EDGE_LINE` (1) +-- A vertical line is drawn at the column number set by +-- `buffer.edge_column`. +-- * `_SCINTILLA.constants.EDGE_BACKGROUND` (2) +-- The background color of characters after the column limit is changed +-- to the color set by `buffer.edge_colour`. +-- * `encoding` [string or nil] +-- The encoding of the file on the hard disk. +-- It will be `nil` if the file is a binary file. +-- * `encoding_bom` [string] +-- The byte-order mark of the file encoding (if any). +-- * `end_at_last_line` [bool] +-- Whether the maximum scroll position has the last line at the bottom of the +-- view. +-- If `false`, allows scrolling one page below the last line. The default +-- value is `true`. +-- * `end_styled` [number] (Read-only) +-- The position of the last correctly styled character. +-- * `extra_ascent` [number] +-- The extra ascent, the maximum that any style extends above the baseline, +-- added to each line. +-- * `extra_descent` [number] +-- The extra descent, the maximum that any style extends below the baseline, +-- added to each line. +-- * `filename` [string] +-- The absolute path to the file associated with this buffer. +-- It is encoded in UTF-8. Use [`string.iconv()`][string_iconv] for charset +-- conversions. +-- * `first_visible_line` [number] +-- The display line at the top of the display. +-- * `focus` [bool] +-- The internal focus flag. +-- * `fold_expanded` [bool] +-- Expanded state of a header line. +-- * `fold_level` [table] +-- Table of fold levels for lines starting from zero. -- Fold levels encodes an integer level along with flags indicating whether --- the line is a header and whether it is effectively white space.
--- * `_SCINTILLA.constants.SC_FOLDLEVELBASE` (0x400): Initial fold level. --- * `_SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG` (0x1000): Indicates that --- the line is blank. --- * `_SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG` (0x2000): Indicates --- that the line is a header (fold point). --- * `fold_parent` [table]: Table of parent line numbers for child lines --- starting from zero. -1 means no line was found. (Read-only) --- * `font_quality` [number]: The quality level for text. (Windows only)
+-- the line is a header and whether it is effectively white space. +-- * `_SCINTILLA.constants.SC_FOLDLEVELBASE` (0x400) +-- Initial fold level. +-- * `_SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG` (0x1000) +-- Indicates that the line is blank. +-- * `_SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG` (0x2000) +-- Indicates that the line is a header (fold point). +-- * `fold_parent` [table] (Read-only) +-- Table of parent line numbers for child lines starting from zero. +-- `-1` means no line was found. +-- * `font_quality` [number] (Windows only) +-- The quality level for text. -- * `_SCINTILLA.constants.SC_EFF_QUALITY_DEFAULt` (0). -- * `_SCINTILLA.constants.SC_EFF_QUALITY_NON_ANTIALIASED` (1). -- * `_SCINTILLA.constants.SC_EFF_QUALITY_ANTIALIASED` (2). -- * `_SCINTILLA.constants.SC_EFF_QUALITY_LCD_OPTIMIZED` (3). --- * `h_scroll_bar` [bool]: Whether the horizontal scroll bar is visible. Set to --- `false` to never see it and `true` to enable it again. The default state is --- to display it when needed. --- * `highlight_guide` [number]: The highlighted indentation guide column. Set --- to `0` to cancel this highlight. --- * `hotspot_active_underline` [bool]: Whether active hotspots are underlined. --- * `hotspot_single_line` [bool]: Whether hotspots are limited to single line --- so hotspots on two lines do not merge. --- * `indent` [number]: Ihe number of spaces used for one level of indentation. +-- * `h_scroll_bar` [bool] +-- Whether the horizontal scroll bar is visible. +-- Set to `false` to never see it and `true` to enable it again. The default +-- state is to display it when needed. +-- * `highlight_guide` [number] +-- The highlighted indentation guide column. +-- Set to `0` to cancel this highlight. +-- * `hotspot_active_underline` [bool] +-- Whether active hotspots are underlined. +-- * `hotspot_single_line` [bool] +-- Whether hotspots are limited to single line so hotspots on two lines do not +-- merge. +-- * `indent` [number] +-- Ihe number of spaces used for one level of indentation. -- For a width of `0`, the indent size is the same as the tab size. --- * `indentation_guides` [number]: Indentation guides appearance. +-- * `indentation_guides` [number] +-- Indentation guides appearance. -- Indentation guides are dotted vertical lines that appear within indentation -- white space every indent size columns. --- * `_SCINTILLA.constants.SC_IV_NONE` (0): No indentation guides are --- shown. --- * `_SCINTILLA.constants.SC_IV_REAL` (1): Indentation guides are shown --- inside real indentation white space. --- * `_SCINTILLA.constants.SC_IV_LOOKFORWARD` (2): Indentation guides are --- shown beyond the actual indentation up to the level of the next --- non-empty line. If the previous non-empty line was a fold header then --- indentation guides are shown for one more level of indent than that --- line. This setting is good for Python. --- * `_SCINTILLA.constants.SC_IV_LOOKBOTH` (3): Indentation guides are --- shown beyond the actual indentation up to the level of the next --- non-empty line or previous non-empty line whichever is the greater. +-- * `_SCINTILLA.constants.SC_IV_NONE` (0) +-- No indentation guides are shown. +-- * `_SCINTILLA.constants.SC_IV_REAL` (1) +-- Indentation guides are shown inside real indentation white space. +-- * `_SCINTILLA.constants.SC_IV_LOOKFORWARD` (2) +-- Indentation guides are shown beyond the actual indentation up to the +-- level of the next non-empty line. +-- If the previous non-empty line was a fold header then indentation +-- guides are shown for one more level of indent than that line. This +-- setting is good for Python. +-- * `_SCINTILLA.constants.SC_IV_LOOKBOTH` (3) +-- Indentation guides are shown beyond the actual indentation up to the +-- level of the next non-empty line or previous non-empty line whichever +-- is the greater. -- This setting is good for most languages. --- * `indic_alpha` [table]: Table of alpha transparency values ranging from `0` --- (transparent) to `255` (opaque) or `256` (no alpha) for indicators from `0` --- to `31`. Used for drawing the fill color of the `INDIC_ROUNDBOX` and +-- * `indic_alpha` [table] +-- Table of alpha transparency values ranging from `0` (transparent) to `255` +-- (opaque) or `256` (no alpha) for indicators from `0` to `31`. +-- Used for drawing the fill color of the `INDIC_ROUNDBOX` and -- `INDIC_STRAIGHTBOX` rectangle. --- * `indic_fore` [table]: Table of foreground colors in `0xBBGGRR` format for --- indicators from `0` to `31`. --- * `indic_outline_alpha` [table]: Table of alpha transparency values ranging --- from `0` (transparent) to `255` (opaque) or `256` (no alpha) for indicators --- from `0` to `31`. Used for drawing the outline color of the --- `INDIC_ROUNDBOX` and `INDIC_STRAIGHTBOX` rectangle. --- * `indic_style` [table]: Table of styles for indicators from `0` to `31`. ---
--- * `_SCINTILLA.constants.INDIC_PLAIN` (0): Underlined with a single, --- straight line. --- * `_SCINTILLA.constants.INDIC_SQUIGGLE` (1): A squiggly underline. --- Requires 3 pixels of descender space. --- * `_SCINTILLA.constants.INDIC_TT` (2): A line of small T shapes. --- * `_SCINTILLA.constants.INDIC_DIAGONAL` (3): Diagonal hatching. --- * `_SCINTILLA.constants.INDIC_STRIKE` (4): Strike out. --- * `_SCINTILLA.constants.INDIC_HIDDEN` (5): An indicator with no visual --- effect. --- * `_SCINTILLA.constants.INDIC_BOX` (6): A rectangle around the text. --- * `_SCINTILLA.constants.INDIC_ROUNDBOX` (7): A rectangle with rounded --- corners around the text using translucent drawing with the interior --- usually more transparent than the border. Use `buffer.indic_alpha` --- and `buffer.indic_outline_alpha` to control the alpha transparency --- values. The default alpha values are `30` for fill color and `50` for --- outline color. --- * `_SCINTILLA.constants.INDIC_STRAIGHTBOX` (8): A rectangle around the --- text using translucent drawing with the interior usually more --- transparent than the border. You can use `buffer.indic_alpha` and --- `buffer.indic_outline_alpha` to control the alpha transparency --- values. The default alpha values are `30` for fill color and `50` for --- outline color. --- * `_SCINTILLA.constants.INDIC_DASH` (9): A dashed underline. --- * `_SCINTILLA.constants.INDIC_DOTS` (10): A dotted underline. --- * `_SCINTILLA.constants.INDIC_SQUIGGLELOW` (11): Similar to --- `INDIC_SQUIGGLE` but only using 2 vertical pixels so will fit under --- small fonts. --- * `_SCINTILLA.constants.INDIC_DOTBOX` (12): A dotted rectangle around --- the text using translucent drawing. Translucency alternates between --- the alpha and outline alpha settings with the top-left pixel using --- the alpha setting. `buffer.indic_alpha` and --- `buffer.indic_outline_alpha` control the alpha transparency values. --- The default values are `30` for alpha and `50` for outline alpha. To --- avoid excessive memory allocation the maximum width of a dotted box --- is 4000 pixels. +-- * `indic_fore` [table] +-- Table of foreground colors in `0xBBGGRR` format for indicators from `0` to +-- `31`. +-- * `indic_outline_alpha` [table] +-- Table of alpha transparency values ranging from `0` (transparent) to `255` +-- (opaque) or `256` (no alpha) for indicators from `0` to `31`. +-- Used for drawing the outline color of the `INDIC_ROUNDBOX` and +-- `INDIC_STRAIGHTBOX` rectangle. +-- * `indic_style` [table] +-- Table of styles for indicators from `0` to `31`. +-- * `_SCINTILLA.constants.INDIC_PLAIN` (0) +-- Underlined with a single, straight line. +-- * `_SCINTILLA.constants.INDIC_SQUIGGLE` (1) +-- A squiggly underline. Requires 3 pixels of descender space. +-- * `_SCINTILLA.constants.INDIC_TT` (2) +-- A line of small T shapes. +-- * `_SCINTILLA.constants.INDIC_DIAGONAL` (3) +-- Diagonal hatching. +-- * `_SCINTILLA.constants.INDIC_STRIKE` (4) +-- Strike out. +-- * `_SCINTILLA.constants.INDIC_HIDDEN` (5) +-- An indicator with no visual effect. +-- * `_SCINTILLA.constants.INDIC_BOX` (6) +-- A rectangle around the text. +-- * `_SCINTILLA.constants.INDIC_ROUNDBOX` (7) +-- A rectangle with rounded corners around the text using translucent +-- drawing with the interior usually more transparent than the border. +-- Use `buffer.indic_alpha` and `buffer.indic_outline_alpha` to control +-- the alpha transparency values. The default alpha values are `30` for +-- fill color and `50` for outline color. +-- * `_SCINTILLA.constants.INDIC_STRAIGHTBOX` (8) +-- A rectangle around the text using translucent drawing with the +-- interior usually more transparent than the border. +-- You can use `buffer.indic_alpha` and `buffer.indic_outline_alpha` to +-- control the alpha transparency values. The default alpha values are +-- `30` for fill color and `50` for outline color. +-- * `_SCINTILLA.constants.INDIC_DASH` (9) +-- A dashed underline. +-- * `_SCINTILLA.constants.INDIC_DOTS` (10) +-- A dotted underline. +-- * `_SCINTILLA.constants.INDIC_SQUIGGLELOW` (11) +-- Similar to `INDIC_SQUIGGLE` but only using 2 vertical pixels so will +-- fit under small fonts. +-- * `_SCINTILLA.constants.INDIC_DOTBOX` (12) +-- A dotted rectangle around the text using translucent drawing. +-- Translucency alternates between the alpha and outline alpha settings +-- with the top-left pixel using the alpha setting. `buffer.indic_alpha` +-- and `buffer.indic_outline_alpha` control the alpha transparency +-- values. The default values are `30` for alpha and `50` for outline +-- alpha. To avoid excessive memory allocation the maximum width of a +-- dotted box is 4000 pixels. -- * Use `_SCINTILLA.next_indic_number()` for custom indicators. --- * `indic_under` [table]: Table of booleans for drawing under text or over --- (default) for indicators from `0` to `31`. --- * `indicator_current` [number]: The indicator in the range of `0` to `31` --- used for `buffer:indicator_fill_range()` and --- `buffer:indicator_clear_range()`. --- * `indicator_value` [number]: The indicator value used for --- `buffer:indicator_fill_range()`. Currently all values are drawn the same. --- * `keys_unicode` [bool]: Interpret keyboard input as Unicode. --- * `layout_cache` [number]: The degree of caching of layout information.
--- * `_SCINTILLA.constants.SC_CACHE_NONE` (0): No lines are cached. --- * `_SCINTILLA.constants.SC_CACHE_CARET` (1): The line containing the --- text caret. This is the default. --- * `_SCINTILLA.constants.SC_CACHE_PAGE` (2): Visible lines plus the line --- containing the caret. --- * `_SCINTILLA.constants.SC_CACHE_DOCUMENT` (3): All lines in the --- document. --- * `length` [number]: The number of bytes in the document. --- (Read-only) --- * `lexer` [number]: The lexing language of the document. --- * `line_count` [number]: The number of lines in the document. There is always --- at least one. (Read-only) --- * `line_end_position` [table]: Table of positions after the last visible --- characters on a line for lines starting from zero. (Read-only) --- * `line_indent_position` [table]: Table of positions before the first non --- indentation character on a line for lines starting from zero. (Read-only) --- * `line_indentation` [table]: Table of line indentation amounts for lines --- starting from zero. The indentation is measured in character columns, which --- correspond to the width of space characters. --- * `line_state` [table]: Table of extra styling information for lines starting --- from zero. As well as the 8 bits of lexical state stored for each character --- there is also an integer stored for each line. This can be used for longer --- lived parse states. --- * `line_visible` [bool]: Is a line visible? (Read-only) --- * `lines_on_screen` [number]: The number of lines completely visible. --- (Read-only) --- * `lines_visible` [bool]: Are all lines visible? (Read-only) --- * `main_selection` [number]: The main selection. The main selection may be --- displayed in different colors or with a differently styled caret. Only an --- already existing selection can be made main. --- * `margin_cursor_n` [table]: Table of cursors shown for margins from zero to --- four. A reversed arrow cursor is normally shown over all margins. --- * `_SCINTILLA.constants.SC_CURSORARROW`: Normal arrow. --- * `_SCINTILLA.constants.SC_CURSORREVERSEARROW`: Reversed arrow. --- * `margin_left` [number]: The size in pixels of the left margin. The default --- is to one pixel. --- * `margin_mask_n` [table]: Table of marker masks for margins from zero to --- four. A mask determines which markers are displayed in a margin. --- * `margin_options` [number]: A bit mask of margin options.
--- * `_SCINTILLA.constants.SC_MARGINOPTION_NONE` (0): None (default). --- * `_SCINTILLA.constants.SC_MARGINOPTION_SUBLINESELECT` (1): Controls --- how wrapped lines are selected when clicking on margin in front of --- them. If set, only sub line of wrapped line is selected, otherwise --- whole wrapped line is selected. --- * `margin_right` [number]: The size in pixels of the right margin. The --- default is to one pixel. --- * `margin_sensitive_n` [table]: Table of mouse click sensitivity booleans for --- margins from zero to four. A click in a sensitive margin emits a --- `margin_click` event. By default, all margins are insensitive. --- * `margin_style` [table]: Table of style numbers for text margin lines +-- * `indic_under` [table] +-- Table of booleans for drawing under text or over (default) for indicators +-- from `0` to `31`. +-- * `indicator_current` [number] +-- The indicator in the range of `0` to `31` used for +-- `buffer:indicator_fill_range()` and `buffer:indicator_clear_range()`. +-- * `indicator_value` [number] +-- The indicator value used for `buffer:indicator_fill_range()`. +-- Currently all values are drawn the same. +-- * `keys_unicode` [bool] +-- Interpret keyboard input as Unicode. +-- * `layout_cache` [number] +-- The degree of caching of layout information. +-- * `_SCINTILLA.constants.SC_CACHE_NONE` (0) +-- No lines are cached. +-- * `_SCINTILLA.constants.SC_CACHE_CARET` (1) +-- The line containing the text caret. +-- This is the default. +-- * `_SCINTILLA.constants.SC_CACHE_PAGE` (2) +-- Visible lines plus the line containing the caret. +-- * `_SCINTILLA.constants.SC_CACHE_DOCUMENT` (3) +-- All lines in the document. +-- * `length` [number] (Read-only) +-- The number of bytes in the document. +-- * `lexer` [number] +-- The lexing language of the document. +-- * `line_count` [number] (Read-only) +-- The number of lines in the document. +-- There is always at least one. +-- * `line_end_position` [table] (Read-only) +-- Table of positions after the last visible characters on a line for lines -- starting from zero. --- * `margin_style_offset` [number]: The start of the range of style numbers --- used for margin text. Margin styles may be completely separated from --- standard text styles by setting a style offset. For example, setting this --- to `256` would allow the margin styles to be numbered from `256` upto `511` --- so they do not overlap styles set by lexers. Each style number set with --- `buffer.margin_style` has the offset added before looking up the style. --- * `margin_type_n` [table]: Table of margin types for margins from zero to --- four.
--- * `_SCINTILLA.constants.SC_MARGIN_SYMBOL` (0): A symbol margin. --- * `_SCINTILLA.constants.SC_MARGIN_NUMBER` (1): A line number margin. --- * `_SCINTILLA.constants.SC_MARGIN_BACK` (2): A symbol margin that sets --- its background color to match the default text background color. --- * `_SCINTILLA.constants.SC_MARGIN_FORE` (3): A symbol margin that sets --- its background color to match the default text foreground color. --- * `_SCINTILLA.constants.SC_MARGIN_TEXT` (4): A text margin. --- * `_SCINTILLA.constants.SC_MARGIN_RTEXT` (5): A right justified text --- margin. --- * `margin_width_n` [table]: Table of margin widths expressed in pixes for --- margins from zero to four. --- * `max_line_state` [number]: The last line number that has line state. --- (Read-only) --- * `modify` [bool]: Whether the document is different from when it was last --- saved. --- * `mouse_down_captures` [bool]: Whether the mouse is captured when its button --- is pressed. --- * `mouse_dwell_time` [number]: The time the mouse must sit still to generate --- a mouse dwell event. If set to `_SCINTILLA.constants.SC_TIME_FOREVER`, the --- default, no dwell events are generated. --- * `multi_paste` [bool]: The effect of pasting when there are multiple --- selections.
--- * `_SCINTILLA.constants.SC_MULTIPASTE_ONCE` (0): Pasted text can go --- into just the main selection (default). --- * `_SCINTILLA.constants.SC_MULTIPASTE_EACH` (1): Pasted text can go --- into each selection. --- * `multiple_selection` [bool]: Whether multiple selections can be made. When --- multiple selection is disabled, it is not possible to select multiple +-- * `line_indent_position` [table] (Read-only) +-- Table of positions before the first non indentation character on a line for +-- lines starting from zero. +-- * `line_indentation` [table] +-- Table of line indentation amounts for lines starting from zero. +-- The indentation is measured in character columns, which correspond to the +-- width of space characters. +-- * `line_state` [table] +-- Table of extra styling information for lines starting from zero. +-- As well as the 8 bits of lexical state stored for each character there is +-- also an integer stored for each line. This can be used for longer lived +-- parse states. +-- * `line_visible` [bool] (Read-only) +-- Is a line visible? +-- * `lines_on_screen` [number] (Read-only) +-- The number of lines completely visible. +-- * `lines_visible` [bool] (Read-only) +-- Are all lines visible? +-- * `main_selection` [number] +-- The main selection. +-- The main selection may be displayed in different colors or with a +-- differently styled caret. Only an already existing selection can be made +-- main. +-- * `margin_cursor_n` [table] +-- Table of cursors shown for margins from zero to four. +-- A reversed arrow cursor is normally shown over all margins. +-- * `_SCINTILLA.constants.SC_CURSORARROW` +-- Normal arrow. +-- * `_SCINTILLA.constants.SC_CURSORREVERSEARROW` +-- Reversed arrow. +-- * `margin_left` [number] +-- The size in pixels of the left margin. +-- The default is to one pixel. +-- * `margin_mask_n` [table] +-- Table of marker masks for margins from zero to four. +-- A mask determines which markers are displayed in a margin. +-- * `margin_options` [number] +-- A bit mask of margin options. +-- * `_SCINTILLA.constants.SC_MARGINOPTION_NONE` (0) +-- None (default). +-- * `_SCINTILLA.constants.SC_MARGINOPTION_SUBLINESELECT` (1) +-- Controls how wrapped lines are selected when clicking on margin in +-- front of them. +-- If set, only sub line of wrapped line is selected, otherwise whole +-- wrapped line is selected. +-- * `margin_right` [number] +-- The size in pixels of the right margin. +-- The default is to one pixel. +-- * `margin_sensitive_n` [table] +-- Table of mouse click sensitivity booleans for margins from zero to four. +-- A click in a sensitive margin emits a `margin_click` event. By default, all +-- margins are insensitive. +-- * `margin_style` [table] +-- Table of style numbers for text margin lines starting from zero. +-- * `margin_style_offset` [number] +-- The start of the range of style numbers used for margin text. +-- Margin styles may be completely separated from standard text styles by +-- setting a style offset. For example, setting this to `256` would allow the +-- margin styles to be numbered from `256` upto `511` so they do not overlap +-- styles set by lexers. Each style number set with `buffer.margin_style` has +-- the offset added before looking up the style. +-- * `margin_type_n` [table] +-- Table of margin types for margins from zero to four. +-- * `_SCINTILLA.constants.SC_MARGIN_SYMBOL` (0) +-- A symbol margin. +-- * `_SCINTILLA.constants.SC_MARGIN_NUMBER` (1) +-- A line number margin. +-- * `_SCINTILLA.constants.SC_MARGIN_BACK` (2) +-- A symbol margin that sets its background color to match the default +-- text background color. +-- * `_SCINTILLA.constants.SC_MARGIN_FORE` (3) +-- A symbol margin that sets its background color to match the default +-- text foreground color. +-- * `_SCINTILLA.constants.SC_MARGIN_TEXT` (4) +-- A text margin. +-- * `_SCINTILLA.constants.SC_MARGIN_RTEXT` (5) +-- A right justified text margin. +-- * `margin_width_n` [table] +-- Table of margin widths expressed in pixes for margins from zero to four. +-- * `max_line_state` [number] (Read-only) +-- The last line number that has line state. +-- * `modify` [bool] +-- Whether the document is different from when it was last saved. +-- * `mouse_down_captures` [bool] +-- Whether the mouse is captured when its button is pressed. +-- * `mouse_dwell_time` [number] +-- The time the mouse must sit still to generate a mouse dwell event. +-- If set to `_SCINTILLA.constants.SC_TIME_FOREVER`, the default, no dwell +-- events are generated. +-- * `multi_paste` [bool] +-- The effect of pasting when there are multiple selections. +-- * `_SCINTILLA.constants.SC_MULTIPASTE_ONCE` (0) +-- Pasted text can go into just the main selection (default). +-- * `_SCINTILLA.constants.SC_MULTIPASTE_EACH` (1) +-- Pasted text can go into each selection. +-- * `multiple_selection` [bool] +-- Whether multiple selections can be made. +-- When multiple selection is disabled, it is not possible to select multiple -- ranges by holding down the Ctrl key while dragging with the mouse. --- * `overtype` [bool]: Overtype mode. --- * `position_cache` [number]: The number of entries in the position cache. The --- position cache stores position information for short runs of text so that --- their layout can be determined more quickly if the run recurs. --- * `print_colour_mode` [number]: The print color mode.
--- * `_SCINTILLA.constants.SC_PRINT_NORMAL` (0): Print using the current --- screen colors. This is the default. --- * `_SCINTILLA.constants.SC_PRINT_INVERTLIGHT` (1): If you use a dark --- screen background this saves ink by inverting the light value of all --- colors and printing on a white background. --- * `_SCINTILLA.constants.SC_PRINT_BLACKONWHITE` (2): Print all text as --- black on a white background. --- * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITE` (3): Everything prints --- in its own color on a white background. --- * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITEDEFAULTBG` (4): +-- * `overtype` [bool] +-- Overtype mode. +-- * `position_cache` [number] +-- The number of entries in the position cache. +-- The position cache stores position information for short runs of text so +-- that their layout can be determined more quickly if the run recurs. +-- * `print_colour_mode` [number] +-- The print color mode. +-- * `_SCINTILLA.constants.SC_PRINT_NORMAL` (0) +-- Print using the current screen colors. +-- This is the default. +-- * `_SCINTILLA.constants.SC_PRINT_INVERTLIGHT` (1) +-- If you use a dark screen background this saves ink by inverting the +-- light value of all colors and printing on a white background. +-- * `_SCINTILLA.constants.SC_PRINT_BLACKONWHITE` (2) +-- Print all text as black on a white background. +-- * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITE` (3) +-- Everything prints in its own color on a white background. +-- * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITEDEFAULTBG` (4) -- Everything prints in its own color on a white background except that -- line numbers use their own background color. --- * `print_magnification` [number]: The print magnification added to the point --- size of each style for printing. --- * `print_wrap_mode` [number]: Printing line wrap mode.
--- * `_SCINTILLA.constants.SC_WRAP_NONE` (0): Each line of text generates --- one line of output and the line is truncated if it is too long to fit --- into the print area. --- * `_SCINTILLA.constants.SC_WRAP_WORD` (1): Wraps printed output so that --- all characters fit into the print rectangle. Tries to wrap only --- between words as indicated by white space or style changes although --- if a word is longer than a line, it will be wrapped before the line --- end. This is the default. +-- * `print_magnification` [number] +-- The print magnification added to the point size of each style for printing. +-- * `print_wrap_mode` [number] +-- Printing line wrap mode. +-- * `_SCINTILLA.constants.SC_WRAP_NONE` (0) +-- Each line of text generates one line of output and the line is +-- truncated if it is too long to fit into the print area. +-- * `_SCINTILLA.constants.SC_WRAP_WORD` (1) +-- Wraps printed output so that all characters fit into the print +-- rectangle. +-- Tries to wrap only between words as indicated by white space or style +-- changes although if a word is longer than a line, it will be wrapped +-- before the line end. This is the default. -- * `_SCINTILLA.constants.SC_WRAP_CHAR` (2). --- * `property` [table]: Table of keyword:value string pairs used by a lexer for --- some optional features. (Write-only) --- * `property_int` [table]: Interprets `buffer.property[keyword]` as an integer --- if found or returns `0`. (Read-only) --- * `read_only` [bool]: Read-only mode. --- * `rectangular_selection_anchor` [number]: The position of the anchor of the --- rectangular selection. --- * `rectangular_selection_anchor_virtual_space` [number]: The amount of --- virtual space for the anchor of the rectangular selection. --- * `rectangular_selection_caret` [number]: The position of the caret of the --- rectangular selection. --- * `rectangular_selection_caret_virtual_space` [number]: The amount of virtual --- space for the caret of the rectangular selection. --- * `rectangular_selection_modifier` [number]: The modifier key used to --- indicate that a rectangular selection should be created when combined with --- a mouse drag.
--- * `_SCINTILLA.constants.SCMOD_CTRL` (2): Control key (default). --- * `_SCINTILLA.constants.SCMOD_ALT` (4): Alt key. --- * `_SCINTILLA.constants.SCMOD_SUPER` (8): Left Windows key on a Windows --- keyboard or the Command key on a Mac. --- * `rgba_image_height` [number]: The height for future RGBA image data. --- * `rgba_image_width` [number]: The width for future RGBA image data. --- * `scroll_width` [number]: The document width assumed for scrolling. For --- performance, the view does not measure the display width of the document to --- determine the properties of the horizontal scroll bar. Instead, an assumed --- width is used. The default value is `2000`. To ensure the width of the --- currently visible lines can be scrolled use `buffer.scroll_width_tracking`. --- * `scroll_width_tracking` [bool]: Whether the maximum width line displayed is --- used to set scroll width. --- * `search_flags` [number]: The search flags used by --- `buffer:search_in_target()`. --- * `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2): A match only occurs with --- text that matches the case of the search string. --- * `_SCINTILLA.constants.SCFIND_MATCHCASE` (4): A match only occurs if --- the characters before and after are not word characters. --- * `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000): A match only --- occurs if the character before is not a word character. --- * `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000): The search string --- should be interpreted as a regular expression. --- * `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000): Treat regular --- expression in a more POSIX compatible manner by interpreting bare `(` --- and `)` for tagged sections rather than `\(` and `\)`. --- * `sel_alpha` [number]: The alpha of the selection, between `0` (transparent) --- and `255` (opaque), or `256` for no alpha. --- * `sel_eol_filled` [bool]: The selection end of line fill. The selection can --- be drawn up to the right hand border by setting this property. --- * `selection_end` [number]: The position that ends the selection - this --- becomes the current position. This does not make the caret visible. --- * `selection_is_rectangle` [bool]: Is the selection rectangular? The --- alternative is the more common stream selection. (Read-only) --- * `selection_mode` [number]: The mode of the current selection.
--- * `_SCINTILLA.constants.SC_SEL_STREAM` (0): Stream. --- * `_SCINTILLA.constants.SC_SEL_RECTANGLE` (1): Rectangle. --- * `_SCINTILLA.constants.SC_SEL_LINES` (2): Lines. --- * `_SCINTILLA.constants.SC_SEL_THIN` (3): Thin rectangular. --- * `selection_n_anchor` [table]: Table of anchor positions for existing --- selections starting from zero, the main selection. --- * `selection_n_anchor_virtual_space` [table]: Table of the amount of virtual --- space for anchors for existing selections starting from zero, the main --- selection. --- * `selection_n_caret` [table]: Table of caret positions for existing --- selections starting from zero, the main selection. --- * `selection_n_caret_virtual_space` [table]: Table of the amount of virtual --- space for carets for existing selections starting from zero, the main --- selection. --- * `selection_n_end` [table]: Table of positions that end selections for --- existing selections starting from zero, the main selection. --- * `selection_n_start` [table]: Table of positions that start selections for --- existing selections starting from zero, the main selection. --- * `selection_start` [number]: The position that starts the selection - this --- becomes the anchor. This does not make the caret visible. --- * `selections` [number]: The number of selections currently active. --- (Read-only) --- * `status` [number]: The error status.
--- * `_SCINTILLA.constants.SC_STATUS_OK` (0): No failures. --- * `_SCINTILLA.constants.SC_STATUS_FAILURE` (1): Generic failure. --- * `_SCINTILLA.constants.SC_STATUS_BADALLOC` (2): Memory is exhausted. --- * `style_at` [table]: Table of style bytes at positions in the document --- starting at zero. (Read-only) --- * `style_back` [table]: Table of background colors in `0xBBGGRR` format for --- styles from `0` to `255`. --- * `style_bits` [number]: The number of bits in style bytes used to hold the --- lexical state. --- * `style_bits_needed` [number]: The number of bits the current lexer needs --- for styling. (Read-only) --- * `style_bold` [table]: Table of booleans for bold styles from `0` to `255`. --- * `style_case` [table]: Table of cases for styles from `0` to `255`.
--- * `_SCINTILLA.constants.SC_CASE_MIXED` (0): Normal, mixed case. --- * `_SCINTILLA.constants.SC_CASE_UPPER` (1): Upper case. --- * `_SCINTILLA.constants.SC_CASE_LOWER` (2): Lower case. --- * `style_changeable` [table]: Table of booleans for changeable styles from --- `0` to `255`. The default setting is `true`. --- * `style_character_set` [table]: Table of character sets for styles from `0` --- to `255`. --- * `style_eol_filled` [table]: Table of booleans for end of line filled styles --- from `0` to `255`. --- of line is filled. --- * `style_font` [table]: Table of font faces for styles from `0` to `255`. --- * `style_fore` [table]: Table of foreground colors in `0xBBGGRR` format for --- styles from `0` to `255`. --- * `style_hot_spot` [table]: Table of boolean hotspot styles from `0` to +-- * `property` [table] (Write-only) +-- Table of keyword:value string pairs used by a lexer for some optional +-- features. +-- * `property_int` [table] (Read-only) +-- Interprets `buffer.property[keyword]` as an integer if found or returns +-- `0`. +-- * `read_only` [bool] +-- Read-only mode. +-- * `rectangular_selection_anchor` [number] +-- The position of the anchor of the rectangular selection. +-- * `rectangular_selection_anchor_virtual_space` [number] +-- The amount of virtual space for the anchor of the rectangular selection. +-- * `rectangular_selection_caret` [number] +-- The position of the caret of the rectangular selection. +-- * `rectangular_selection_caret_virtual_space` [number] +-- The amount of virtual space for the caret of the rectangular selection. +-- * `rectangular_selection_modifier` [number] +-- The modifier key used to indicate that a rectangular selection should be +-- created when combined with a mouse drag. +-- * `_SCINTILLA.constants.SCMOD_CTRL` (2) +-- Control key (default). +-- * `_SCINTILLA.constants.SCMOD_ALT` (4) +-- Alt key. +-- * `_SCINTILLA.constants.SCMOD_SUPER` (8) +-- Left Windows key on a Windows keyboard or the Command key on a Mac. +-- * `rgba_image_height` [number] +-- The height for future RGBA image data. +-- * `rgba_image_width` [number] +-- The width for future RGBA image data. +-- * `scroll_width` [number] +-- The document width assumed for scrolling. +-- For performance, the view does not measure the display width of the +-- document to determine the properties of the horizontal scroll bar. Instead, +-- an assumed width is used. The default value is `2000`. To ensure the width +-- of the currently visible lines can be scrolled use +-- `buffer.scroll_width_tracking`. +-- * `scroll_width_tracking` [bool] +-- Whether the maximum width line displayed is used to set scroll width. +-- * `search_flags` [number] +-- The search flags used by `buffer:search_in_target()`. +-- * `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2) +-- A match only occurs with text that matches the case of the search +-- string. +-- * `_SCINTILLA.constants.SCFIND_MATCHCASE` (4) +-- A match only occurs if the characters before and after are not word +-- characters. +-- * `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000) +-- A match only occurs if the character before is not a word character. +-- * `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000) +-- The search string should be interpreted as a regular expression. +-- * `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000) +-- Treat regular expression in a more POSIX compatible manner by +-- interpreting bare `(` and `)` for tagged sections rather than `\(` +-- and `\)`. +-- * `sel_alpha` [number] +-- The alpha of the selection, between `0` (transparent) and `255` (opaque), +-- or `256` for no alpha. +-- * `sel_eol_filled` [bool] +-- The selection end of line fill. +-- The selection can be drawn up to the right hand border by setting this +-- property. +-- * `selection_end` [number] +-- The position that ends the selection - this becomes the current position. +-- This does not make the caret visible. +-- * `selection_is_rectangle` [bool] (Read-only) +-- Is the selection rectangular? +-- The alternative is the more common stream selection. +-- * `selection_mode` [number] +-- The mode of the current selection. +-- * `_SCINTILLA.constants.SC_SEL_STREAM` (0) +-- Stream. +-- * `_SCINTILLA.constants.SC_SEL_RECTANGLE` (1) +-- Rectangle. +-- * `_SCINTILLA.constants.SC_SEL_LINES` (2) +-- Lines. +-- * `_SCINTILLA.constants.SC_SEL_THIN` (3) +-- Thin rectangular. +-- * `selection_n_anchor` [table] +-- Table of anchor positions for existing selections starting from zero, the +-- main selection. +-- * `selection_n_anchor_virtual_space` [table] +-- Table of the amount of virtual space for anchors for existing selections +-- starting from zero, the main selection. +-- * `selection_n_caret` [table] +-- Table of caret positions for existing selections starting from zero, the +-- main selection. +-- * `selection_n_caret_virtual_space` [table] +-- Table of the amount of virtual space for carets for existing selections +-- starting from zero, the main selection. +-- * `selection_n_end` [table] +-- Table of positions that end selections for existing selections starting +-- from zero, the main selection. +-- * `selection_n_start` [table] +-- Table of positions that start selections for existing selections starting +-- from zero, the main selection. +-- * `selection_start` [number] +-- The position that starts the selection - this becomes the anchor. +-- This does not make the caret visible. +-- * `selections` [number] (Read-only) +-- The number of selections currently active. +-- * `status` [number] +-- The error status. +-- * `_SCINTILLA.constants.SC_STATUS_OK` (0) +-- No failures. +-- * `_SCINTILLA.constants.SC_STATUS_FAILURE` (1) +-- Generic failure. +-- * `_SCINTILLA.constants.SC_STATUS_BADALLOC` (2) +-- Memory is exhausted. +-- * `style_at` [table] (Read-only) +-- Table of style bytes at positions in the document starting at zero. +-- * `style_back` [table] +-- Table of background colors in `0xBBGGRR` format for styles from `0` to -- `255`. --- * `style_italic` [table]: Table of booleans for italic styles from `0` to +-- * `style_bits` [number] +-- The number of bits in style bytes used to hold the lexical state. +-- * `style_bits_needed` [number] (Read-only) +-- The number of bits the current lexer needs for styling. +-- * `style_bold` [table] +-- Table of booleans for bold styles from `0` to `255`. +-- * `style_case` [table] +-- Table of cases for styles from `0` to `255`. +-- * `_SCINTILLA.constants.SC_CASE_MIXED` (0) +-- Normal, mixed case. +-- * `_SCINTILLA.constants.SC_CASE_UPPER` (1) +-- Upper case. +-- * `_SCINTILLA.constants.SC_CASE_LOWER` (2) +-- Lower case. +-- * `style_changeable` [table] +-- Table of booleans for changeable styles from `0` to `255`. +-- The default setting is `true`. +-- * `style_character_set` [table] +-- Table of character sets for styles from `0` to `255`. +-- * `style_eol_filled` [table] +-- Table of booleans for end of line filled styles from `0` to `255`. +-- * `style_font` [table] +-- Table of font faces for styles from `0` to `255`. +-- * `style_fore` [table] +-- Table of foreground colors in `0xBBGGRR` format for styles from `0` to -- `255`. --- * `style_size` [table]: Table of font sizes for styles from `0` to `255`. +-- * `style_hot_spot` [table] +-- Table of boolean hotspot styles from `0` to `255`. +-- * `style_italic` [table] +-- Table of booleans for italic styles from `0` to `255`. +-- * `style_size` [table] +-- Table of font sizes for styles from `0` to `255`. -- Font size is a whole number of points. --- * `style_size_fractional` [table]: Table of sizes of characters for styles --- from `0` to `255`. Size is in hundreths of a point and multiplied by 100 --- internally. For example, a text size of 9.4 points is set with 940. --- * `style_underline` [table]: Table of booleans for underlined styles from `0` --- to `255`. --- * `style_visible` [table]: Table of booleans for visible styles from `0` to --- `255`. --- * `style_weight` [table]: Table of character weights for styles from `0` to --- `255`. The weight or boldness of a font can be set with a number between 1 --- and 999 with 1 being very light and 999 very heavy. While any value can be --- used, fonts often only support between 2 and 4 weights with three weights --- being common enough to use symbolic names:
--- * `_SCINTILLA.constants.SC_WEIGHT_NORMAL` (400): Normal. --- * `_SCINTILLA.constants.SC_WEIGHT_SEMIBOLD` (600): Semi-bold. --- * `_SCINTILLA.constants.SC_WEIGHT_BOLD` (700): Bold. --- * `tab_indents` [bool]: Whether a tab pressed when caret is within --- indentation indents. --- * `tab_width` [number]: The visible size of a tab as a multiple of the width --- of a space character. The default tab width is 8 characters. --- * `target_end` [number]: The position that ends the target which is used for --- updating the document without affecting the scroll position. The target --- is also set by a successful `buffer:search_in_target()`. --- * `target_start` [number]: The position that starts the target which is used --- for updating the document without affecting the scroll position. The target --- is also set by a successful `buffer:search_in_target()`. --- * `text_length` [number]: The number of characters in the document. --- (Read-only) --- * `two_phase_draw` [bool]: Two phase drawing mode. When `true`, drawing is --- performed in two phases, first the background and then the foreground. This --- avoids chopping off characters that overlap the next run. The default is --- for drawing to be two phase. --- * `undo_collection` [bool]: Whether to collect undo information. When --- stopping collection, use `buffer:empty_undo_buffer()` to avoid the undo --- buffer being unsynchronized with the data in the buffer. --- * `use_tabs` [bool]: Whether tabs will be used in indentation. The default is --- `true`. `false` will only use space characters. --- * `v_scroll_bar` [bool]: Whether the vertical scroll bar is visible. Set to --- `false` to never see it and `true` to enable it again. The default state is --- to display it when required. --- * `view_eol` [bool]: Whether the end of line characters are visible. +-- * `style_size_fractional` [table] +-- Table of sizes of characters for styles from `0` to `255`. +-- Size is in hundreths of a point and multiplied by 100 internally. For +-- example, a text size of 9.4 points is set with 940. +-- * `style_underline` [table] +-- Table of booleans for underlined styles from `0` to `255`. +-- * `style_visible` [table] +-- Table of booleans for visible styles from `0` to `255`. +-- * `style_weight` [table] +-- Table of character weights for styles from `0` to `255`. +-- The weight or boldness of a font can be set with a number between 1 and 999 +-- with 1 being very light and 999 very heavy. While any value can be used, +-- fonts often only support between 2 and 4 weights with three weights being +-- common enough to use symbolic names: +-- * `_SCINTILLA.constants.SC_WEIGHT_NORMAL` (400) +-- Normal. +-- * `_SCINTILLA.constants.SC_WEIGHT_SEMIBOLD` (600) +-- Semi-bold. +-- * `_SCINTILLA.constants.SC_WEIGHT_BOLD` (700) +-- Bold. +-- * `tab_indents` [bool] +-- Whether a tab pressed when caret is within indentation indents. +-- * `tab_width` [number] +-- The visible size of a tab as a multiple of the width of a space character. +-- The default tab width is 8 characters. +-- * `target_end` [number] +-- The position that ends the target which is used for updating the document +-- without affecting the scroll position. +-- The target is also set by a successful `buffer:search_in_target()`. +-- * `target_start` [number] +-- The position that starts the target which is used for updating the document +-- without affecting the scroll position. +-- The target is also set by a successful `buffer:search_in_target()`. +-- * `text_length` [number] (Read-only) +-- The number of characters in the document. +-- * `two_phase_draw` [bool] +-- Two phase drawing mode. +-- When `true`, drawing is performed in two phases, first the background and +-- then the foreground. This avoids chopping off characters that overlap the +-- next run. The default is for drawing to be two phase. +-- * `undo_collection` [bool] +-- Whether to collect undo information. +-- When stopping collection, use `buffer:empty_undo_buffer()` to avoid the +-- undo buffer being unsynchronized with the data in the buffer. +-- * `use_tabs` [bool] +-- Whether tabs will be used in indentation. +-- The default is `true`. `false` will only use space characters. +-- * `v_scroll_bar` [bool] +-- Whether the vertical scroll bar is visible. +-- Set to `false` to never see it and `true` to enable it again. The default +-- state is to display it when required. +-- * `view_eol` [bool] +-- Whether the end of line characters are visible. -- Normally, the end of line characters are hidden. --- * `view_ws` [number]: The visibility of white space characters.
--- * `_SCINTILLA.constants.SCWS_INVISIBLE` (0): The normal display mode --- with white space displayed as an empty background color. --- * `_SCINTILLA.constants.SCWS_VISIBLEALWAYS` (1): White space characters --- are drawn as dots and arrows. --- * `_SCINTILLA.constants.SCWS_VISIBLEAFTERINDENT` (2): White space used --- for indentation is displayed normally but after the first visible --- character, it is shown as dots and arrows. --- * `virtual_space_options` [number]: Virtual space options.
--- * `_SCINTILLA.constants.SCVS_NONE` (0): Disables all use of virtual --- space (default). --- * `_SCINTILLA.constants.SCVS_RECTANGULARSELECTION` (1): Enabled only --- for rectangular selections. --- * `_SCINTILLA.constants.SCVS_USERACCESSIBLE` (2): Enabled. --- * `whitespace_chars` [string]: The set of characters making up whitespace for --- when moving or selecting by word. Use after setting `buffer.word_chars`. --- (Write-only) --- * `wrap_indent_mode` [number]: How wrapped sublines are placed. Default is --- fixed.
--- * `_SCINTILLA.constants.SC_WRAP_INDENT_FIXED` (0): Wrapped sublines --- aligned to left of window plus amount set by +-- * `view_ws` [number] +-- The visibility of white space characters. +-- * `_SCINTILLA.constants.SCWS_INVISIBLE` (0) +-- The normal display mode with white space displayed as an empty +-- background color. +-- * `_SCINTILLA.constants.SCWS_VISIBLEALWAYS` (1) +-- White space characters are drawn as dots and arrows. +-- * `_SCINTILLA.constants.SCWS_VISIBLEAFTERINDENT` (2) +-- White space used for indentation is displayed normally but after the +-- first visible character, it is shown as dots and arrows. +-- * `virtual_space_options` [number] +-- Virtual space options. +-- * `_SCINTILLA.constants.SCVS_NONE` (0) +-- Disables all use of virtual space (default). +-- * `_SCINTILLA.constants.SCVS_RECTANGULARSELECTION` (1) +-- Enabled only for rectangular selections. +-- * `_SCINTILLA.constants.SCVS_USERACCESSIBLE` (2) +-- Enabled. +-- * `whitespace_chars` [string] (Write-only) +-- The set of characters making up whitespace for when moving or selecting by +-- word. +-- Use after setting `buffer.word_chars`. +-- * `wrap_indent_mode` [number] +-- How wrapped sublines are placed. +-- Default is fixed. +-- * `_SCINTILLA.constants.SC_WRAP_INDENT_FIXED` (0) +-- Wrapped sublines aligned to left of window plus amount set by -- `buffer.wrap_start_indent`. --- * `_SCINTILLA.constants.SC_WRAP_INDENT_SAME` (1): Wrapped sublines are --- aligned to first subline indent. --- * `_SCINTILLA.constants.SC_WRAP_INDENT_INDENT` (2): Wrapped sublines --- are aligned to first subline indent plus one more level of --- indentation. --- * `whitespace_size` [number]: The size of the dots used to mark space --- characters. --- * `word_chars` [string]: The set of characters making up words when moving or --- selecting by word. (Write-only) --- * `wrap_mode` [number]: Text word wrap mode.
--- * `_SCINTILLA.constants.SC_WRAP_NONE` (0): Disable line wrapping. --- * `_SCINTILLA.constants.SC_WRAP_WORD` (1): Enable wrapping on word --- boundaries. --- * `_SCINTILLA.constants.SC_WRAP_CHAR` (2): Enable wrapping between any --- characters. --- * `wrap_start_indent` [number]: The start indent for wrapped lines. --- * `wrap_visual_flags` [number]: The display mode of visual flags for wrapped --- lines.
--- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_NONE` (0): No visual flags. --- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_END` (1): Visual flag at end --- of subline of a wrapped line. --- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_START` (2): Visual flag at --- begin of subline of a wrapped line. Subline is indented by at least 1 --- to make room for the flag. --- * `wrap_visual_flags_location` [number]: The location of visual flags for --- wrapped lines.
--- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_DEFAULT` (0): Visual flags --- drawn near border. --- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_END_BY_TEXT` (1): Visual --- flag at end of subline drawn near text. --- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_START_BY_TEXT` (2): Visual --- flag at beginning of subline drawn near text. --- * `x_offset` [number]: The horizontal scroll position. A value of `0` is the --- normal position with the first text column visible at the left of the view. --- * `zoom` [number]: The number of points added to the size of all fonts. It --- may be positive to magnify or negative to reduce. +-- * `_SCINTILLA.constants.SC_WRAP_INDENT_SAME` (1) +-- Wrapped sublines are aligned to first subline indent. +-- * `_SCINTILLA.constants.SC_WRAP_INDENT_INDENT` (2) +-- Wrapped sublines are aligned to first subline indent plus one more +-- level of indentation. +-- * `whitespace_size` [number] +-- The size of the dots used to mark space characters. +-- * `word_chars` [string] +-- The set of characters making up words when moving or selecting by word. +-- * `wrap_mode` [number] +-- Text word wrap mode. +-- * `_SCINTILLA.constants.SC_WRAP_NONE` (0) +-- Disable line wrapping. +-- * `_SCINTILLA.constants.SC_WRAP_WORD` (1) +-- Enable wrapping on word boundaries. +-- * `_SCINTILLA.constants.SC_WRAP_CHAR` (2) +-- Enable wrapping between any characters. +-- * `wrap_start_indent` [number] +-- The start indent for wrapped lines. +-- * `wrap_visual_flags` [number] +-- The display mode of visual flags for wrapped lines. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_NONE` (0) +-- No visual flags. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_END` (1) +-- Visual flag at end of subline of a wrapped line. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAG_START` (2) +-- Visual flag at begin of subline of a wrapped line. +-- Subline is indented by at least 1 to make room for the flag. +-- * `wrap_visual_flags_location` [number] +-- The location of visual flags for wrapped lines. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_DEFAULT` (0) +-- Visual flags drawn near border. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_END_BY_TEXT` (1) +-- Visual flag at end of subline drawn near text. +-- * `_SCINTILLA.constants.SC_WRAPVISUALFLAGLOC_START_BY_TEXT` (2) +-- Visual flag at beginning of subline drawn near text. +-- * `x_offset` [number] +-- The horizontal scroll position. +-- A value of `0` is the normal position with the first text column visible at +-- the left of the view. +-- * `zoom` [number] +-- The number of points added to the size of all fonts. +-- It may be positive to magnify or negative to reduce. -- -- [string_iconv]: ../modules/string.html#iconv @@ -2410,7 +2585,7 @@ function buffer.reload(buffer) end -- @param encoding The encoding to set. Valid encodings are ones that GTK's -- `g_convert()` function accepts (typically GNU iconv's encodings). -- @usage buffer.set_encoding(buffer, 'ASCII') -function buffer.set_encoding(buffer) end +function buffer.set_encoding(buffer, encoding) end --- -- Saves the current buffer to a file. @@ -2422,7 +2597,7 @@ function buffer.save(buffer) end -- @param buffer The global buffer. -- @param utf8_filename The new filepath to save the buffer to. Must be UTF-8 -- encoded. -function buffer.save_as(buffer) end +function buffer.save_as(buffer, utf8_filename) end --- -- Closes the current buffer. @@ -2437,6 +2612,7 @@ function buffer.close(buffer) end -- mime-types tables. Also if the user manually sets the lexer, it should be -- restored. -- Loads the language-specific module if it exists. +-- This function is added by `_M.textadept.mime_types`. -- @param buffer The global buffer. -- @param lang The string language to set. -- @usage buffer.set_lexer(buffer, 'language_name') diff --git a/core/.view.luadoc b/core/.view.luadoc index bf2ed6ee..254390f2 100644 --- a/core/.view.luadoc +++ b/core/.view.luadoc @@ -10,8 +10,8 @@ module('view') -- Markdown: -- ## Fields -- --- * `size` [number]: The position of the split resizer (if this view is part of --- a split view). +-- * `size` [number] +-- The position of the split resizer (if this view is part of a split view). --- -- The buffer this view contains. (Read-only) @@ -21,8 +21,8 @@ local buffer --- -- Splits the indexed view vertically or horizontally and focuses the new view. --- @param vertical Flag indicating a vertical split. Defaults to `false` for --- horizontal. +-- @param vertical Flag indicating a vertical split. The default value is +-- `false` for horizontal. -- @return old view and new view tables. function view:split(vertical) end @@ -36,6 +36,6 @@ function view:unsplit() end -- Generates `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events. -- @param n A relative or absolute buffer index. An absolute index of `-1` goes -- to the last buffer. --- @param relative Flag indicating if `n` is a relative index or not. Defaults --- to `false`. +-- @param relative Flag indicating if `n` is a relative index or not. The +-- default value is `false`. function view:goto_buffer(n, relative) end diff --git a/core/events.lua b/core/events.lua index 0568a86c..7c3c34f1 100644 --- a/core/events.lua +++ b/core/events.lua @@ -34,41 +34,53 @@ module('events')]] -- they pass. Events that modules emit are listed on their respective LuaDoc -- pages. -- --- * `APPLEEVENT_ODOC`: Called when Mac OSX tells Textadept to open a document. ---
+-- * `APPLEEVENT_ODOC` +-- Called when Mac OSX tells Textadept to open a document. -- * `uri`: The URI to open. --- * `AUTO_C_CHAR_DELETED`: Called when the user deleted a character while the --- autocompletion list was active. --- * `AUTO_C_RELEASE`: Called when the user has cancelled the autocompletion --- list. --- * `AUTO_C_SELECTION`: Called when the user has selected an item in an --- autocompletion list and before the selection is inserted. Automatic --- insertion can be cancelled by calling `buffer:auto_c_cancel()` before --- returning from the event handler.
+-- * `AUTO_C_CHAR_DELETED` +-- Called when the user deleted a character while the autocompletion list was +-- active. +-- * `AUTO_C_RELEASE` +-- Called when the user has cancelled the autocompletion list. +-- * `AUTO_C_SELECTION` +-- Called when the user has selected an item in an autocompletion list and +-- before the selection is inserted. +-- Automatic insertion can be cancelled by calling `buffer:auto_c_cancel()` +-- before returning from the event handler. Arguments: -- * `text`: The text of the selection. -- * `position`: The start position of the word being completed. --- * `BUFFER_AFTER_SWITCH`: Called right after a buffer is switched to. --- * `BUFFER_BEFORE_SWITCH`: Called right before another buffer is switched to. --- * `BUFFER_DELETED`: Called after a buffer was deleted. --- * `BUFFER_NEW`: Called when a new buffer is created. --- * `CALL_TIP_CLICK`: Called when the user clicks on a calltip. ---
+-- * `BUFFER_AFTER_SWITCH` +-- Called right after a buffer is switched to. +-- * `BUFFER_BEFORE_SWITCH` +-- Called right before another buffer is switched to. +-- * `BUFFER_DELETED` +-- Called after a buffer was deleted. +-- * `BUFFER_NEW` +-- Called when a new buffer is created. +-- * `CALL_TIP_CLICK` +-- Called when the user clicks on a calltip. +-- Arguments: -- * `position`: Set to 1 if the click is in an up arrow, 2 if in a down -- arrow, and 0 if elsewhere. --- * `CHAR_ADDED`: Called when an ordinary text character is added to the --- buffer.
+-- * `CHAR_ADDED` +-- Called when an ordinary text character is added to the buffer. +-- Arguments: -- * `ch`: The text character byte. --- * `COMMAND_ENTRY_COMMAND`: Called when a command is entered into the Command --- Entry.
+-- * `COMMAND_ENTRY_COMMAND` +-- Called when a command is entered into the Command Entry. +-- Arguments: -- * `command`: The command text. --- * `COMMAND_ENTRY_KEYPRESS`: Called when a key is pressed in the Command --- Entry.
+-- * `COMMAND_ENTRY_KEYPRESS` +-- Called when a key is pressed in the Command Entry. +-- Arguments: -- * `code`: The key code. -- * `shift`: The Shift key is held down. -- * `ctrl`: The Control/Command key is held down. -- * `alt`: The Alt/option key is held down. -- * `meta`: The Control key on Mac OSX is held down. --- * `DOUBLE_CLICK`: Called when the mouse button is double-clicked.
+-- * `DOUBLE_CLICK` +-- Called when the mouse button is double-clicked. +-- Arguments: -- * `position`: The text position of the double click. -- * `line`: The line of the double click. -- * `modifiers`: The key modifiers held down. It is a combination of zero @@ -76,60 +88,80 @@ module('events')]] -- `_SCINTILLA.constants.SCMOD_CTRL`, -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. --- * `DWELL_END`: Called after a `DWELL_START` and the mouse is moved or other --- activity such as key press indicates the dwell is over.
+-- * `DWELL_END` +-- Called after a `DWELL_START` and the mouse is moved or other activity such +-- as key press indicates the dwell is over. +-- Arguments: -- * `position`: The nearest position in the document to the position -- where the mouse pointer was lingering. -- * `x`: Where the pointer lingered. -- * `y`: Where the pointer lingered. --- * `DWELL_START`: Called when the user keeps the mouse in one position for the --- dwell period (see `_SCINTILLA.constants.SCI_SETMOUSEDWELLTIME`).
+-- * `DWELL_START` +-- Called when the user keeps the mouse in one position for the dwell period +-- (see `_SCINTILLA.constants.SCI_SETMOUSEDWELLTIME`). +-- Arguments: -- * `position`: The nearest position in the document to the position -- where the mouse pointer was lingering. -- * `x`: Where the pointer lingered. -- * `y`: Where the pointer lingered. --- * `ERROR`: Called when an error occurs.
+-- * `ERROR` +-- Called when an error occurs. +-- Arguments: -- * `text`: The error text. --- * `FIND`: Called when finding text via the Find dialog box.
+-- * `FIND` +-- Called when finding text via the Find dialog box. +-- Arguments: -- * `text`: The text to search for. -- * `next`: Search forward. --- * `HOTSPOT_CLICK`: Called when the user clicks on text that is in a style --- with the hotspot attribute set.
+-- * `HOTSPOT_CLICK` +-- Called when the user clicks on text that is in a style with the hotspot +-- attribute set. +-- Arguments: -- * `position`: The text position of the click. -- * `modifiers`: The key modifiers held down. It is a combination of zero -- or more of `_SCINTILLA.constants.SCMOD_ALT`, -- `_SCINTILLA.constants.SCMOD_CTRL`, -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. --- * `HOTSPOT_DOUBLE_CLICK`: Called when the user double clicks on text that is --- in a style with the hotspot attribute set.
+-- * `HOTSPOT_DOUBLE_CLICK` +-- Called when the user double clicks on text that is in a style with the +-- hotspot attribute set. +-- Arguments: -- * `position`: The text position of the double click. -- * `modifiers`: The key modifiers held down. It is a combination of zero -- or more of `_SCINTILLA.constants.SCMOD_ALT`, -- `_SCINTILLA.constants.SCMOD_CTRL`, -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. --- * `HOTSPOT_RELEASE_CLICK`: Called when the user releases the mouse on text --- that is in a style with the hotspot attribute set.
+-- * `HOTSPOT_RELEASE_CLICK` +-- Called when the user releases the mouse on text that is in a style with the +-- hotspot attribute set. +-- Arguments: -- * `position`: The text position of the release. --- * `INDICATOR_CLICK`: Called when the user clicks the mouse on text that has --- an indicator.
+-- * `INDICATOR_CLICK` +-- Called when the user clicks the mouse on text that has an indicator. +-- Arguments: -- * `position`: The text position of the click. -- * `modifiers`: The key modifiers held down. It is a combination of zero -- or more of `_SCINTILLA.constants.SCMOD_ALT`, -- `_SCINTILLA.constants.SCMOD_CTRL`, -- `_SCINTILLA.constants.SCMOD_SHIFT`, and -- `_SCINTILLA.constants.SCMOD_META`. --- * `INDICATOR_RELEASE`: Called when the user releases the mouse on text that --- has an indicator.
+-- * `INDICATOR_RELEASE` +-- Called when the user releases the mouse on text that has an indicator. +-- Arguments: -- * `position`: The text position of the release. --- * `KEYPRESS`: Called when a key is pressed.
+-- * `KEYPRESS` +-- Called when a key is pressed. +-- Arguments: -- * `code`: The key code. -- * `shift`: The Shift key is held down. -- * `ctrl`: The Control/Command key is held down. -- * `alt`: The Alt/option key is held down. -- * `meta`: The Control key on Mac OSX is held down. --- * `MARGIN_CLICK`: Called when the mouse is clicked inside a margin.
+-- * `MARGIN_CLICK` +-- Called when the mouse is clicked inside a margin. +-- Arguments: -- * `margin`: The margin number that was clicked. -- * `position`: The position of the start of the line in the buffer that -- corresponds to the margin click. @@ -137,35 +169,53 @@ module('events')]] -- `_SCINTILLA.constants.SCI_SHIFT`, `_SCINTILLA.constants.SCI_CTRL`, -- and `_SCINTILLA.constants.SCI_ALT` to indicate the keys that were -- held down at the time of the margin click. --- * `MENU_CLICKED`: Called when a menu item is selected.
+-- * `MENU_CLICKED` +-- Called when a menu item is selected. +-- Arguments: -- * `menu_id`: The numeric ID of the menu item set in `gui.gtkmenu()`. --- * `QUIT`: Called when quitting Textadept. When connecting to this event, --- connect with an index of 1 or the handler will be ignored. --- * `REPLACE`: Called to replace selected (found) text.
+-- * `QUIT` +-- Called when quitting Textadept. +-- When connecting to this event, connect with an index of 1 or the handler +-- will be ignored. +-- * `REPLACE` +-- Called to replace selected (found) text. +-- Arguments: -- * `text`: The text to replace selected text with. --- * `REPLACE_ALL`: Called to replace all occurances of found text.
+-- * `REPLACE_ALL` +-- Called to replace all occurances of found text. +-- Arguments: -- * `find_text`: The text to search for. -- * `repl_text`: The text to replace found text with. --- * `RESET_AFTER`: Called after resetting the Lua state. This is triggered by --- `reset()`. --- * `RESET_BEFORE`: Called before resetting the Lua state. This is triggered by --- `reset()`. --- * `SAVE_POINT_LEFT`: Called when a save point is left. --- * `SAVE_POINT_REACHED`: Called when a save point is entered. --- * `UPDATE_UI`: Called when either the text or styling of the buffer has --- changed or the selection range has changed. --- * `URI_DROPPED`: Called when the user has dragged a URI such as a file name --- onto the view.
+-- * `RESET_AFTER` +-- Called after resetting the Lua state. +-- This is triggered by `reset()`. +-- * `RESET_BEFORE` +-- Called before resetting the Lua state. +-- This is triggered by `reset()`. +-- * `SAVE_POINT_LEFT` +-- Called when a save point is left. +-- * `SAVE_POINT_REACHED` +-- Called when a save point is entered. +-- * `UPDATE_UI` +-- Called when either the text or styling of the buffer has changed or the +-- selection range has changed. +-- * `URI_DROPPED` +-- Called when the user has dragged a URI such as a file name onto the view. +-- Arguments: -- * `text`: The URI text. --- * `USER_LIST_SELECTION`: Called when the user has selected an item in a user --- list.
+-- * `USER_LIST_SELECTION` +-- Called when the user has selected an item in a user list. +-- Arguments: -- * `list_type`: This is set to the list_type parameter from the -- `buffer:user_list_show()` call that initiated the list. -- * `text`: The text of the selection. -- * `position`: The position the list was displayed at. --- * `VIEW_NEW`: Called when a new view is created. --- * `VIEW_BEFORE_SWITCH`: Called right before another view is switched to. --- * `VIEW_AFTER_SWITCH`: Called right after another view is switched to. +-- * `VIEW_NEW` +-- Called when a new view is created. +-- * `VIEW_BEFORE_SWITCH` +-- Called right before another view is switched to. +-- * `VIEW_AFTER_SWITCH` +-- Called right after another view is switched to. -- -- ## Example -- diff --git a/core/file_io.lua b/core/file_io.lua index 49d22c9c..8ff6d5be 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -27,17 +27,21 @@ module('io')]] -- -- ## File Events -- --- * `_G.events.FILE_OPENED`: Called when a file is opened in a new buffer. --- Arguments:
+-- * `_G.events.FILE_OPENED` +-- Called when a file is opened in a new buffer. +-- Arguments: -- * `filename`: The filename encoded in UTF-8. --- * `_G.events.FILE_BEFORE_SAVE`: Called right before a file is saved to disk. --- Arguments:
+-- * `_G.events.FILE_BEFORE_SAVE` +-- Called right before a file is saved to disk. +-- Arguments: -- * `filename`: The filename encoded in UTF-8. --- * `_G.events.FILE_AFTER_SAVE`: Called right after a file is saved to disk. --- Arguments:
+-- * `_G.events.FILE_AFTER_SAVE` +-- Called right after a file is saved to disk. +-- Arguments: -- * `filename`: The filename encoded in UTF-8. --- * `_G.events.FILE_SAVED_AS`: Called when a file is saved under a different --- filename. Arguments:
+-- * `_G.events.FILE_SAVED_AS` +-- Called when a file is saved under a different filename. +-- Arguments: -- * `filename`: The filename encoded in UTF-8. -- Events. diff --git a/core/gui.lua b/core/gui.lua index 4413c68e..f8952b60 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -9,12 +9,16 @@ module('gui')]] -- Markdown: -- ## Fields -- --- * `title` [string]: The title of the Textadept window. --- * `context_menu`: A GTK menu defining the editor's context menu. --- * `clipboard_text` [string]: The text on the clipboard. (Read-only) --- * `statusbar_text` [string]: The text displayed by the statusbar. --- * `docstatusbar_text` [string]: The text displayed by the doc statusbar. --- (Write-only) +-- * `title` [string] +-- The title of the Textadept window. +-- * `context_menu` +-- A GTK menu defining the editor's context menu. +-- * `clipboard_text` [string] (Read-only) +-- The text on the clipboard. +-- * `statusbar_text` [string] +-- The text displayed by the statusbar. +-- * `docstatusbar_text` [string] (Write-only) +-- The text displayed by the doc statusbar. local _L = _L @@ -71,8 +75,8 @@ function gui.print(...) gui._print(_L['[Message Buffer]'], ...) end -- @param columns A column name or list of column names. -- @param items An item or list of items. -- @param int_return If `true`, returns the integer index of the selected item --- in the filteredlist. Defaults to `false`, which returns the string item. --- Not compatible with a `'--select-multiple'` filteredlist. +-- in the filteredlist. The default value is `false`, which returns the string +-- item. Not compatible with a `'--select-multiple'` filteredlist. -- @param ... Additional parameters to pass to `gui.dialog()`. -- @return Either a string or integer on success; `nil` otherwise. -- @usage gui.filteredlist('Title', 'Foo', { 'Bar', 'Baz' }) @@ -449,8 +453,8 @@ local get_split_table -- Goes to the specified view. -- Generates `VIEW_BEFORE_SWITCH` and `VIEW_AFTER_SWITCH` events. -- @param n A relative or absolute view index. --- @param relative Flag indicating if n is a relative index or not. Defaults to --- false. +-- @param relative Flag indicating if n is a relative index or not. The default +-- value is `false`. -- @class function -- @name goto_view local goto_view diff --git a/core/init.lua b/core/init.lua index 3a332fc8..b2fa5663 100644 --- a/core/init.lua +++ b/core/init.lua @@ -27,17 +27,24 @@ module('_G')]] -- Markdown: -- ## Fields -- --- * `_HOME` [string]: Path to the directory containing Textadept. --- * `_LEXERPATH` [string]: Paths to lexers, formatted like --- [`package.path`][package_path]. --- * `_RELEASE` [string]: The Textadept release version. --- * `_USERHOME` [string]: Path to the user's `~/.textadept/`. --- * `_CHARSET` [string]: The character set encoding of the filesystem. This is --- used in [File I/O](../modules/io.html). --- * `RESETTING` [bool]: If [`reset()`](../modules/_G.html#reset) has been --- called, this flag is `true` while the Lua state is being re-initialized. --- * `WIN32` [bool]: If Textadept is running on Windows, this flag is `true`. --- * `OSX` [bool]: If Textadept is running on Mac OSX, this flag is `true`. +-- * `_HOME` [string] +-- Path to the directory containing Textadept. +-- * `_LEXERPATH` [string] +-- Paths to lexers, formatted like [`package.path`][package_path]. +-- * `_RELEASE` [string] +-- The Textadept release version. +-- * `_USERHOME` [string] +-- Path to the user's `~/.textadept/`. +-- * `_CHARSET` [string] +-- The character set encoding of the filesystem. +-- This is used in [File I/O](../modules/io.html). +-- * `RESETTING` [bool] +-- If [`reset()`](../modules/_G.html#reset) has been called, this flag is +-- `true` while the Lua state is being re-initialized. +-- * `WIN32` [bool] +-- If Textadept is running on Windows, this flag is `true`. +-- * `OSX` [bool] +-- If Textadept is running on Mac OSX, this flag is `true`. -- -- [package_path]: http://www.lua.org/manual/5.1/manual.html#pdf-package.path diff --git a/core/keys.lua b/core/keys.lua index e16d55ac..28beb536 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -53,20 +53,29 @@ module('keys')]] -- -- ## Settings -- --- + `CTRL` [string]: The string representing the Control key. The default is --- 'c'. --- + `ALT` [string]: The string representing the Alt/option key. The default is --- 'a' --- + `META` [string]: The string representing the Command key on Mac OSX. The --- default is 'm'. --- + `SHIFT` [string]: The string representing the Shift key. The default is --- 's'. --- + `ADD` [string]: The string representing used to join together a sequence of --- Control, Alt, Meta, or Shift modifier keys. The default is ''. --- * `CLEAR` [string]: The string representing the key sequence that clears the --- current keychain. The default is 'esc' (Escape). --- * `LANGUAGE_MODULE_PREFIX` [string]: The starting key command of the keychain --- reserved for language-specific modules. Defaults to Ctrl/Cmd+L. +-- + `CTRL` [string] +-- The string representing the Control key. +-- The default value is 'c'. +-- + `ALT` [string] +-- The string representing the Alt/option key. +-- The default value is 'a' +-- + `META` [string] +-- The string representing the Command key on Mac OSX. +-- The default value is 'm'. +-- + `SHIFT` [string] +-- The string representing the Shift key. +-- The default value is 's'. +-- + `ADD` [string] +-- The string representing used to join together a sequence of Control, Alt, +-- Meta, or Shift modifier keys. +-- The default value is ''. +-- * `CLEAR` [string] +-- The string representing the key sequence that clears the current keychain. +-- The default value is 'esc' (Escape). +-- * `LANGUAGE_MODULE_PREFIX` [string] +-- The starting key command of the keychain reserved for language-specific +-- modules. +-- The default value is Ctrl/Cmd+L. -- -- ## Key Command Precedence -- diff --git a/core/locale.lua b/core/locale.lua index b59141f5..5448cdc4 100644 --- a/core/locale.lua +++ b/core/locale.lua @@ -10,8 +10,8 @@ module('_L')]] -- Markdown: -- # Settings -- --- * `_NIL` [string]: String returned when no localization for a given message --- exists. +-- * `_NIL` [string] +-- String returned when no localization for a given message exists. M._NIL = 'No Localization' 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)
--- Replacement for [`buffer:set_lexer_language()`][buffer_set_lexer_language]. ---
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.
--- 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:
+-- * `_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.
+-- 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.
+-- 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 diff --git a/scripts/adeptsensedoc.lua b/scripts/adeptsensedoc.lua index e68731de..1f8cdcc3 100644 --- a/scripts/adeptsensedoc.lua +++ b/scripts/adeptsensedoc.lua @@ -37,13 +37,13 @@ local function write_apidoc(file, m, b) local name = b.name if not name:find('[%.:]') then name = m.name..'.'..name end -- Block documentation for the function or field. - local doc = { 'fmt -s -w 80 <<"EOF"' } + local doc = {} -- Function arguments or field type. local header = name if b.class == 'function' then header = header..(b.param and '('..table.concat(b.param, ', ')..')' or '') end - if b.modifier then header = header..' '..b.modifier end + if b.modifier and b.modifier ~= '' then header = header..' '..b.modifier end doc[#doc + 1] = header -- Function or field description. doc[#doc + 1] = b.description:gsub('\\n', '\\\\n') @@ -74,10 +74,7 @@ local function write_apidoc(file, m, b) end end -- Format the block documentation. - doc[#doc + 1] = 'EOF' - local p = io.popen(table.concat(doc, '\n')) - doc = p:read('*all'):gsub('\n', '\\n') - p:close() + doc = table.concat(doc, '\n'):gsub('\n', '\\n') file[#file + 1] = name:match('[^%.:]+$')..' '..doc end @@ -115,8 +112,7 @@ function start(doc) local module, field, docs -- Adds the field to its module's LuaDoc. local function add_field() - local doc = table.concat(docs, ' ') - doc = doc:gsub('\n ', '\n'):gsub('
', '') + local doc = table.concat(docs, '\n') doc = doc:gsub('%[([^%]]+)%]%b[]', '%1'):gsub('%[([^%]]+)%]%b()', '%1') field.description = doc local m = modules[field.module] @@ -149,16 +145,9 @@ function start(doc) if doc ~= '' then field.modifier, doc = doc:match('^%s*([^:]*):?%s*(.*)$') end - docs[#docs + 1] = doc + if doc ~= '' then docs[#docs + 1] = doc end elseif field and line:find('^%-%-%s+[^\r\n]+') then - -- Add this additional documentation to the current field being - -- parsed. If the doc is indented more than usual, preserve the - -- formatting by adding a newline to the previous doc line. - local doc, indent = line:match('^%-%-%s%s%s((%s*)[^\r\n]+)') - if #indent > 0 and docs[#docs]:sub(-1) ~= '\n' then - docs[#docs] = docs[#docs]..'\n' - end - docs[#docs + 1] = #indent > 0 and doc..'\n' or doc + docs[#docs + 1] = line:match('^%-%-%s%s%s(%s*[^\r\n]+)') elseif field and (line:find('^%-%-[\r\n]*$') or line:find('^[\r\n]*$')) then -- End of field documentation. Add it to its module's LuaDoc. diff --git a/scripts/update_doc b/scripts/update_doc index c728b338..74d1dd72 100755 --- a/scripts/update_doc +++ b/scripts/update_doc @@ -37,6 +37,7 @@ if luadoc then for line in f:lines() do if flag and line:match('^%-%-') then local match = line:match('^%-%- ([^\n]+)') + if match and match:find('^%s*[*+] ') then match = match..'
' end markdown[#markdown + 1] = match or '' elseif flag then -- markdown ended break -- cgit v1.2.3