diff options
author | 2011-12-21 14:43:06 -0500 | |
---|---|---|
committer | 2011-12-21 14:43:06 -0500 | |
commit | 441516297cd2a482699daa562e5ad057a46303c9 (patch) | |
tree | 9f69ebeb10b231d0704779b0f6217615d254ca9e /modules/lua | |
parent | ddf1a9d90c44b3fdb5f631a9d801eb7ce191bd16 (diff) | |
download | textadept-441516297cd2a482699daa562e5ad057a46303c9.tar.gz textadept-441516297cd2a482699daa562e5ad057a46303c9.zip |
Updated Lua Adeptsense.
Diffstat (limited to 'modules/lua')
-rw-r--r-- | modules/lua/api | 14 | ||||
-rw-r--r-- | modules/lua/tags | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/modules/lua/api b/modules/lua/api index fe5af81f..50128891 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -1,3 +1,4 @@ += nil _G.= nil [module]\n\n ANNOTATION_BOXED _SCINTILLA.constants.ANNOTATION_BOXED\n2\n ANNOTATION_HIDDEN _SCINTILLA.constants.ANNOTATION_HIDDEN\n0\n ANNOTATION_STANDARD _SCINTILLA.constants.ANNOTATION_STANDARD\n1\n @@ -815,7 +816,7 @@ call_tip_cancel buffer.call_tip_cancel(buffer)\nRemove the call tip from the scr call_tip_fore buffer.call_tip_fore [number]\nThe foreground color for the call tip in `0xBBGGRR` format. (Write-only)\n call_tip_fore_hlt buffer.call_tip_fore_hlt [number]\nThe foreground color for the highlighted part of the call tip in `0xBBGGRR`\nformat. (Write-only)\n call_tip_pos_start buffer.call_tip_pos_start(buffer)\nRetrieve the position where the caret was before displaying the call tip.\n@param buffer The global buffer.\n@return number\n -call_tip_position buffer.call_tip_position [boolean]\nThe position of calltip, above or below text. By default the calltip is\ndisplayed below the text. Setting to `true` will display it above the text.\n +call_tip_position buffer.call_tip_position [boolean]\nThe position of calltip, above or below text. By default the calltip is\ndisplayed below the text. Setting to `true` will display it above the text.\n call_tip_set_hlt buffer.call_tip_set_hlt(buffer, start_pos, end_pos)\nHighlights a segment of a call tip.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n call_tip_show buffer.call_tip_show(buffer, pos, text)\nShow a call tip containing a definition near position pos. The call tip text\nis aligned to start 1 line below this character unless up and/or down arrows\nhave been included in the call tip text in which case the tip is aligned to\nthe right-hand edge of the rightmost arrow. The assumption is that the text\nstarts with something like `"\001 1 of 3 \002"`.\n@param buffer The global buffer.\n@param pos The position.\n@param text The text.\n call_tip_use_style buffer.call_tip_use_style [number]\nEnable use of `_SCINTILLA.constants.STYLE_CALLTIP` and set call tip tab\nsize in pixels. If the tab size is less than `1`, Tab characters are not\ntreated specially.\n @@ -895,6 +896,7 @@ copy_text buffer.copy_text(buffer, text)\nCopy argument text to the clipboard.\n coroutine _G.coroutine [module]\nLua coroutine module.\n cos math.cos(x)\nReturns the cosine of `x` (assumed to be in radians).\n cosh math.cosh(x)\nReturns the hyperbolic cosine of `x`.\n +count_characters buffer.count_characters(buffer, start_pos, end_pos)\nCount characters between two positions.\n@return number\n cpath package.cpath\nThe path used by `require` to search for a C loader. Lua initializes the C path\n`package.cpath` in the same way it initializes the Lua path `package.path`,\nusing the environment variable `LUA_CPATH_5_2` or the environment variable\n`LUA_CPATH` or a default path defined in `luaconf.h`.\n cpp _G.keys.cpp [table]\nContainer for C/C++-specific key commands.\n cpp _G.snippets.cpp [table]\nContainer for C/C++-specific snippets.\n @@ -923,7 +925,7 @@ delete buffer.delete(buffer)\nDeletes the current buffer. WARNING: this function delete_back buffer.delete_back(buffer)\nDelete the selection or if no selection, the character before the caret.\n@param buffer The global buffer.\n delete_back_not_line buffer.delete_back_not_line(buffer)\nDelete the selection or if no selection, the character before the caret. Will\nnot delete the character before at the start of a line.\n delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates an LPeg pattern that matches a range of characters delimitted by a\nspecific character(s). This can be used to match a string, parenthesis, etc.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may be omitted, nil,\nor the empty string.\n@param end_optional Optional flag indicating whether or not an ending delimiter\nis optional or not. If true, the range begun by the start delimiter matches\nuntil an end delimiter or the end of the input is reached.\n@param balanced Optional flag indicating whether or not a balanced range is\nmatched, like `%b` in Lua's `string.find`. This flag only applies if `chars`\nconsists of two different characters (e.g. '()').\n@param forbidden Optional string of characters forbidden in a delimited\nrange. Each character is part of the set.\n@usage local sq_str_noescapes = delimited_range("'")\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\', true)\n@usage local balanced_parens = delimited_range('()', '\\', true, true)\n -dialog gui.dialog()\nDisplays a gcocoadialog of a specified type with the given string\narguments. Each argument is like a string in Lua's `arg` table. Tables of\nstrings are allowed as arguments and are expanded in place. This is useful\nfor filteredlist dialogs with many items.\n@return string gcocoadialog result.\n +dialog gui.dialog(kind, ...)\nDisplays a gcocoadialog of a specified type with the given string\narguments. Each argument is like a string in Lua's `arg` table. Tables of\nstrings are allowed as arguments and are expanded in place. This is useful\nfor filteredlist dialogs with many items.\n@param kind The kind of gcocoadialog.\n@param ... Parameters to the gcocoadialog.\n@return string gcocoadialog result.\n difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX, Windows,\nand some other systems, this value is exactly `t2`*-*`t1`.\n digit lexer.digit\nMatches any digit (`0-9`).\n dir lfs.dir(path)\nLua iterator over the entries of a given directory. Each time the iterator\nis called with dir_obj it returns a directory entry's name as a string,\nor nil if there are no more entries. You can also iterate by calling\ndir_obj:next(), and explicitly close the directory before the iteration\nfinished with dir_obj:close(). Raises an error if path is not a directory.\n @@ -944,7 +946,7 @@ edge_column buffer.edge_column [number]\nThe column number which text should be edge_mode buffer.edge_mode [number]\nThe edge highlight mode.\n * `_SCINTILLA.constants.EDGE_NONE` (0): Long lines are not marked. This\n is the default state.\n * `_SCINTILLA.constants.EDGE_LINE` (1): A vertical line is drawn at the\n column number set by `buffer.edge_column`.\n * `_SCINTILLA.constants.EDGE_BACKGROUND` (2): The background color of\n characters after the column limit is changed to the color set by\n `buffer.edge_colour`.\n\n edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nSwitch from insert to overtype mode or the reverse.\n@param buffer The global buffer.\n editing _m.textadept.editing [module]\nEditing commands for the textadept module.\n -embed_lexer lexer.embed_lexer(parent, child, start_rule, end_rule)\nEmbeds a child lexer language in a parent one.\n@param parent The parent lexer.\n@param child The child lexer.\n@param start_rule The token that signals the beginning of the embedded lexer.\n@param end_rule The token that signals the end of the embedded lexer.\n@usage embed_lexer(_M, css, css_start_rule, css_end_rule)\n@usage embed_lexer(html, _M, php_start_rule, php_end_rule)\n@usage embed_lexer(html, ruby, ruby_start_rule, rule_end_rule)\n +embed_lexer lexer.embed_lexer(parent, child, start_rule, end_rule)\nEmbeds a child lexer language in a parent one.\n@param parent The parent lexer.\n@param child The child lexer.\n@param start_rule The token that signals the beginning of the embedded lexer.\n@param end_rule The token that signals the end of the embedded lexer.\n@usage embed_lexer(M, css, css_start_rule, css_end_rule)\n@usage embed_lexer(html, M, php_start_rule, php_end_rule)\n@usage embed_lexer(html, ruby, ruby_start_rule, rule_end_rule)\n emit events.emit(event, ...)\nCalls all handlers for the given event in sequence (effectively "generating"\nthe event). If `true` or `false` is explicitly returned by any handler,\nthe event is not propagated any further; iteration ceases.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@return `true` or `false` if any handler explicitly returned such; nil\notherwise.\n empty_undo_buffer buffer.empty_undo_buffer(buffer)\nDelete the undo history. It also sets the save point to the start of the\nundo buffer, so the document will appear to be unmodified.\n@param buffer The global buffer.\n enclose _m.textadept.editing.enclose(left, right)\nEncloses text within a given pair of strings. If text is selected, it is\nenclosed. Otherwise, the previous word is enclosed.\n@param left The left part of the enclosure.\n@param right The right part of the enclosure.\n @@ -1008,7 +1010,7 @@ get_apidoc _m.textadept.adeptsense.get_apidoc(sense, symbol)\nReturns a list of get_class _m.textadept.adeptsense.get_class(sense, symbol)\nReturns the class name for a given symbol. If the symbol is `sense.syntax.self`\nand a class definition using the `sense.syntax.class_definition` keyword is\nfound, that class is returned. Otherwise the buffer is searched backwards\nfor a type declaration of the symbol according to the patterns in\n`sense.syntax.type_declarations`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get the class of.\n@return class or `nil`\n@see syntax\n get_completions _m.textadept.adeptsense.get_completions(sense, symbol, only_fields,\nonly_functions)\nReturns a list of completions for the given symbol.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get completions for.\n@param only_fields If `true`, returns list of only fields; defaults to `false`.\n@param only_functions If `true`, returns list of only functions; defaults to\n`false`.\n@return completion_list or `nil`\n get_cur_line buffer.get_cur_line(buffer)\nRetrieve the text of the line containing the caret. Also returns the index\nof the caret on the line.\n@param buffer The global buffer.\n@return string, number\n -get_fold_level lexer.get_fold_level(line, line_number)\nReturns the fold level for a given line. This level already has\n`SC_FOLDLEVELBASE` added to it, so you do not need to add it yourself.\n@param line_number The line number to get the fold level of.\n +get_fold_level lexer.get_fold_level(line_number)\nReturns the fold level for a given line. This level already has\n`SC_FOLDLEVELBASE` added to it, so you do not need to add it yourself.\n@param line_number The line number to get the fold level of.\n get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in 0xBBGGRR format.\n@param buffer The global buffer.\n@return number\n get_hotspot_active_fore buffer.get_hotspot_active_fore(buffer)\nGet the fore color for active hotspots.\n@param buffer The global buffer.\n@return number\n get_indent_amount lexer.get_indent_amount(line)\nReturns the indent amount of text for a given line.\n@param line The line number to get the indent amount of.\n @@ -1161,7 +1163,7 @@ load _G.load(ld [, source [, mode [, env]]])\nLoads a chunk. If `ld` is a strin load _m.textadept.session.load(filename)\nLoads a Textadept session file. Textadept restores split views, opened buffers,\ncursor information, and project manager details.\n@param filename The absolute path to the session file to load. Defaults to\n`DEFAULT_SESSION` if not specified.\n@usage _m.textadept.session.load(filename)\n@return `true` if the session file was opened and read; `false` otherwise.\n load lexer.load(lexer_name)\nInitializes the specified lexer.\n@param lexer_name The name of the lexing language.\n load_ctags _m.textadept.adeptsense.load_ctags(sense, tag_file, nolocations)\nLoads the given ctags file for autocompletion. It is recommended to pass\n`-n` to ctags in order to use line numbers instead of text patterns to locate\ntags. This will greatly reduce memory usage for a large number of symbols if\n`nolocations` is not `true`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param tag_file The path of the ctags file to load.\n@param nolocations If `true`, does not store the locations of the tags for\nuse by `goto_ctag()`. Defaults to `false`.\n -load_project M.load_project(utf8_dir)\nSets keys.al.o to snapopen a Rails project. If not directory is provided,\nthe user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory.\n +load_project _m.rails.load_project(utf8_dir)\nSets keys.al.o to snapopen a Rails project. If not directory is provided,\nthe user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory.\n loaded package.loaded\nA table used by `require` to control which modules are already loaded. When\nyou require a module `modname` and `package.loaded[modname]` is not false,\n`require` simply returns the value stored there. This variable is only a\nreference to the real table; assignments to this variable do not change the\ntable used by `require`.\n loadfile _G.loadfile([filename [, mode [, env]]])\nSimilar to `load`, but gets the chunk from file `filename` or from the\nstandard input, if no file name is given.\n loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`. If `funcname`\nis "`*`", then it only links with the library, making the symbols exported\nby the library available to other dynamically linked libraries. Otherwise, it\nlooks for a function `funcname` inside the library and returns this function\nas a C function. (So, `funcname` must follow the prototype `lua_CFunction`).\nThis is a low-level function. It completely bypasses the package and module\nsystem. Unlike `require`, it does not perform any path searching and does\nnot automatically adds extensions. `libname` must be the complete file name\nof the C library, including if necessary a path and an extension. `funcname`\nmust be the exact name exported by the C library (which may depend on the\nC compiler and linker used). This function is not supported by Standard\nC. As such, it is only available on some platforms (Windows, Linux, Mac OS X,\nSolaris, BSD, plus other Unix systems that support the `dlfcn` standard).\n @@ -1522,7 +1524,7 @@ style_operator lexer.style_operator\nTypically used for operators.\n style_preproc lexer.style_preproc\nTypically used for preprocessor statements.\n style_regex lexer.style_regex\nTypically used for regular expression strings.\n style_reset_default buffer.style_reset_default(buffer)\nReset the default style to its state at startup.\n@param buffer The global buffer.\n -style_size buffer.style_size [table]\nTable of font sizes for styles from `0` to `255`. Font size is a whole\nnumber of points.\n +style_size buffer.style_size [table]\nTable of font sizes for styles from `0` to `255`. Font size is a whole number\nof points.\n style_size_fractional buffer.style_size_fractional [table]\nTable of sizes of characters for styles\n from `0` to `255`. Size is in hundreths of a point and multiplied by 100\n internally. For example, a text size of 9.4 points is set with 940.\n\n style_string lexer.style_string\nTypically used for strings.\n style_tag lexer.style_tag\nTypically used for markup tags.\n diff --git a/modules/lua/tags b/modules/lua/tags index 057b73d9..fd0edf76 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -922,6 +922,7 @@ coroutine _ 0;" m coroutine _ 0;" t cos _ 0;" f class:math cosh _ 0;" f class:math +count_characters _ 0;" f class:buffer cpath _ 0;" F class:package cpp _ 0;" t class:_m cpp _ 0;" t class:keys @@ -1686,4 +1687,4 @@ xpcall _ 0;" f yield _ 0;" f class:coroutine zoom _ 0;" F class:buffer zoom_in _ 0;" f class:buffer -zoom_out _ 0;" f class:buffer
\ No newline at end of file +zoom_out _ 0;" f class:buffer |