-- Copyright 2007-2012 Mitchell mitchell.att.foicica.com. See LICENSE. -- 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 modules. module('_M')]] -- Markdown: -- ## Overview -- -- Note that while language-specific modules can only be used by files of that -- language, they persist in Textadept's Lua state. Because of this, it is not -- recommended to set global functions or variables and depend on them, as they -- may be inadvertantly overwritten. Keep them inside the module. -- -- ## Structure -- -- Each module should have an `init.lua` that `require`s all submodules it -- needs. For an example, see `modules/textadept/init.lua`. -- -- ## Language-Specific Modules -- -- The following is a list of recommended features for Language-Specific -- modules. They are all entirely optional. -- -- ### Snippets -- -- [Snippets][] for common code constructs. -- -- [Snippets]: _M.textadept.snippets.html -- -- ### Commands -- -- #### Run -- -- If the code can be run by an interpreter or other executable, create a [run -- command][] for it as well as an [error format][] for the ability to jump to -- the position in a file where the error occured. -- -- For example: -- -- _M.textadept.run.run_command.lua = 'lua %(filename)' -- -- [run command]: _M.textadept.run.html#run_command -- [error format]: _M.textadept.run.html#error_detail -- -- #### Compile -- -- If the code can be compiled by an executable, create a [compile command][] -- for it. -- -- For example: -- -- _M.textadept.run.compile_command.lua = 'luac %(filename)' -- -- [compile command]: _M.textadept.run.html#compile_command -- -- #### Block Comment -- -- Create a [comment prefix][] for it so code can be easily commented and -- uncommented. -- -- [comment prefix]: _M.textadept.editing.html#comment_string -- -- For example: -- -- _M.textadept.editing.comment_string.lua = '--' -- -- [comment prefix]: _M.textadept.editing.html#comment_string -- -- ### Buffer Properties -- -- Add a `set_buffer_properties` function with default buffer properties for -- code like tab and indentation settings. -- -- For example: -- -- function set_buffer_properties() -- local buffer = buffer -- buffer.use_tabs = false -- buffer.tab_width = 2 -- buffer.indent = 2 -- end -- -- ### Context Menu -- -- Language-specific context menus, accessible by right-clicking inside the -- view, can be defined as: -- -- context_menu = { -- { 'label1', action1 }, -- { 'label2', action2 }, -- ... -- } -- -- See `modules/textadept/menu.lua` for examples on how to define menus.