diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-04-11 09:34:17 -0400 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-04-11 09:34:17 -0400 |
commit | de3a745e1af2e441de868c2aa4849102d376acb5 (patch) | |
tree | c2d7767600dc519b2613ddecaf7e53fb5e8867a2 /core/._M.luadoc | |
parent | 03fab17277fee7387fd93a9c2774b1ebf3f80fe4 (diff) |
Initial pass reformatting all code.
Use clang-format, LuaFormatter, and 100 character limit on lines.
Diffstat (limited to 'core/._M.luadoc')
-rw-r--r-- | core/._M.luadoc | 92 |
1 files changed, 41 insertions, 51 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc index 8f94a93d..b720d336 100644 --- a/core/._M.luadoc +++ b/core/._M.luadoc @@ -1,19 +1,16 @@ -- Copyright 2007-2020 Mitchell. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global _M table. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the global _M table. ---[[ This comment is for LuaDoc. --- -- A table of loaded Textadept language modules. -- --- Language modules are a special kind of module that Textadept automatically --- loads when editing source code in a particular programming language. The only --- thing "special" about them is they are named after a lexer. Otherwise they --- are plain Lua modules. The *~/.textadept/modules/* directory houses language --- modules (along with other modules). +-- Language modules are a special kind of module that Textadept automatically loads when editing +-- source code in a particular programming language. The only thing "special" about them is they +-- are named after a lexer. Otherwise they are plain Lua modules. The *~/.textadept/modules/* +-- directory houses language modules (along with other modules). -- --- A language module is designed to provide extra functionality for a single --- programming language. Some examples of what language modules can do: +-- A language module is designed to provide extra functionality for a single programming +-- language. Some examples of what language modules can do: -- -- * Specify block comment syntax for lines of code -- * Define compile and run commands for source files @@ -27,31 +24,27 @@ -- -- ### Block Comment -- --- Many languages have different syntaxes for single line comments and --- multi-line comments in source code. Textadept's block comment feature only --- uses one of those syntaxes for a given language. If you prefer the other --- syntax, or if Textadept does not support block comments for a particular --- language, modify the [`textadept.editing.comment_string`]() table. For --- example: +-- Many languages have different syntaxes for single line comments and multi-line comments in +-- source code. Textadept's block comment feature only uses one of those syntaxes for a given +-- language. If you prefer the other syntax, or if Textadept does not support block comments +-- for a particular language, modify the [`textadept.editing.comment_string`]() table. For example: -- -- textadept.editing.comment_string.ansi_c = '//' -- change from /* ... */ -- -- ### Compile and Run -- --- Textadept knows most of the commands that compile and/or run code in source --- files. However, it does not know all of them, and the ones that it does know --- may not be completely accurate in all cases. Compile and run commands are --- read from the [`textadept.run.compile_commands`]() and --- [`textadept.run.run_commands`]() tables using the appropriate lexer name key, --- and thus can be defined or modified. For Lua, it would look like: +-- Textadept knows most of the commands that compile and/or run code in source files. However, +-- it does not know all of them, and the ones that it does know may not be completely accurate +-- in all cases. Compile and run commands are read from the [`textadept.run.compile_commands`]() +-- and [`textadept.run.run_commands`]() tables using the appropriate lexer name key, and thus +-- can be defined or modified. For Lua, it would look like: -- -- textadept.run.compile_commands.lua = 'luac "%f"' -- textadept.run.run_commands.lua = 'lua "%f"' -- --- Double-clicking on compile or runtime errors jumps to the error's location. --- If Textadept does not recognize your language's errors properly, add an error --- pattern to [`textadept.run.error_patterns`](). The Lua error pattern looks --- like: +-- Double-clicking on compile or runtime errors jumps to the error's location. If +-- Textadept does not recognize your language's errors properly, add an error pattern to +-- [`textadept.run.error_patterns`](). The Lua error pattern looks like: -- -- local patterns = textadept.run.error_patterns -- if not patterns.lua then patterns.lua = {} end @@ -59,31 +52,30 @@ -- -- ### Buffer Properties -- --- By default, Textadept uses 2 spaces for indentation. Some languages have --- different indentation guidelines, however. As described in the manual, use --- `events.LEXER_LOADED` to change this and any other language-specific editor --- properties. For example: +-- By default, Textadept uses 2 spaces for indentation. Some languages have different indentation +-- guidelines, however. As described in the manual, use `events.LEXER_LOADED` to change this +-- and any other language-specific editor properties. For example: -- -- events.connect(events.LEXER_LOADED, function(name) -- if name ~= 'python' then return end -- buffer.tab_width = 4 -- buffer.use_tabs = false -- view.view_ws = view.WS_VISIBLEALWAYS --- end +-- end) -- -- ### Autocompletion and Documentation -- -- Textadept has the capability to autocomplete symbols for programming -- languages and display API documentation. In order for these to work for a --- given language, an [autocompleter](#textadept.editing.autocompleters) and --- [API file(s)](#textadept.editing.api_files) must exist. All of Textadept's --- included language modules have examples of autocompleters and API --- documentation, as well as most of its officially supported language modules. +-- given language, an [autocompleter](#textadept.editing.autocompleters) and [API +-- file(s)](#textadept.editing.api_files) must exist. All of Textadept's included language +-- modules have examples of autocompleters and API documentation, as well as most of its +-- officially supported language modules. -- -- ### Snippets -- --- [Snippets](#textadept.snippets) for common language constructs are useful. --- Some snippets for common Lua control structures look like this: +-- [Snippets](#textadept.snippets) for common language constructs are useful. Some snippets +-- for common Lua control structures look like this: -- -- snippets.lua = { -- f = "function %1(name)(%2(args))\n\t%0\nend", @@ -94,10 +86,10 @@ -- -- ### Commands -- --- Additional editing features for the language can be useful. For example, a --- C++ module might have a feature to add a ';' to the end of the current line --- and insert a new line. This command could be bound to the `Shift+Enter` (`⇧↩` --- on macOS | `S-Enter` in the terminal version) key for easy access: +-- Additional editing features for the language can be useful. For example, a C++ module might +-- have a feature to add a ';' to the end of the current line and insert a new line. This command +-- could be bound to the `Shift+Enter` (`⇧↩` on macOS | `S-Enter` in the terminal version) +-- key for easy access: -- -- keys.cpp['shift+\n'] = function() -- buffer:line_end() @@ -105,12 +97,11 @@ -- buffer:new_line() -- end -- --- When defining key bindings for other commands, you may make use of a `Ctrl+L` --- (`⌘L` on macOS | `M-L` in the terminal version) keychain. Traditionally this --- prefix has been reserved for use by language modules (although neither --- Textadept nor its modules utilize it at the moment). Users may define this --- keychain for new or existing modules and it will not conflict with any --- default key bindings. For example: +-- When defining key bindings for other commands, you may make use of a `Ctrl+L` (`⌘L` on +-- macOS | `M-L` in the terminal version) keychain. Traditionally this prefix has been reserved +-- for use by language modules (although neither Textadept nor its modules utilize it at the +-- moment). Users may define this keychain for new or existing modules and it will not conflict +-- with any default key bindings. For example: -- -- keys.lua[CURSES and 'meta+l' or OSX and 'cmd+l' or 'ctrl+l'] = { -- ... @@ -118,9 +109,8 @@ -- -- ### Menus -- --- It may be useful to add language-specific menu options to the top-level menu --- and/or right-click context menu in order to access module features without --- using key bindings. For example: +-- It may be useful to add language-specific menu options to the top-level menu and/or right-click +-- context menu in order to access module features without using key bindings. For example: -- -- local lua_menu = { -- title = 'Lua', @@ -130,4 +120,4 @@ -- local tools = textadept.menu.menubar[_L['Tools']] -- tools[#tools + 1] = lua_menu -- textadept.menu.context_menu[#textadept.menu.context_menu + 1] = lua_menu -module('_M')]] +module('_M') |