aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/11_Scripting.md27
-rw-r--r--modules/textadept/adeptsense.lua13
2 files changed, 36 insertions, 4 deletions
diff --git a/doc/11_Scripting.md b/doc/11_Scripting.md
index 86eb1a5a..d7275829 100644
--- a/doc/11_Scripting.md
+++ b/doc/11_Scripting.md
@@ -12,11 +12,30 @@ libraries. See the [`lua` module documentation][] for more information.
## LuaDoc and Examples
-Textadept's API is heavily documented. The [LuaDoc][] is the ultimate resource
-on scripting Textadept. There are of course abundant scripting examples since
-Textadept is mostly written in Lua.
+Textadept's API is heavily documented. The [API docs][] are the ultimate
+resource on scripting Textadept. There are of course abundant scripting examples
+since Textadept is mostly written in Lua.
-[LuaDoc]: api/index.html
+[API docs]: api/index.html
+
+### Generating LuaDoc
+
+You can generate API documentation for your own modules using the
+`doc/markdowndoc.lua` [LuaDoc][] module:
+
+ luadoc -d . --doclet _HOME/doc/markdowndoc [module(s)]
+
+or
+
+ luadoc -d . -t template_dir --doclet _HOME/doc/markdowndoc [module(s)]
+
+where `_HOME` is where Textadept is installed and `template_dir` is an optional
+template directory that contains two Markdown files: `.header.md` and
+`.footer.md`. (See `doc/.header.md` and `doc/.footer.md` for examples.) You must
+have [Discount][] installed.
+
+[LuaDoc]: http://keplerproject.github.com/luadoc/
+[Discount]: http://www.pell.portland.or.us/~orc/Code/discount/
## Lua Configuration
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index a4a0cb2e..b1004fd2 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -331,6 +331,19 @@ module('_M.textadept.adeptsense')]]
-- You will have to do something similar if you are writing an Adeptsense for a
-- child lexer language.
--
+-- ### Generating Lua Adeptsense
+--
+-- You can generate Lua Adeptsense for your own modules using the Lua language
+-- module's `adeptsensedoc.lua` module with [LuaDoc][]:
+--
+-- luadoc -d . --doclet _HOME/modules/lua/adeptsensedoc [module(s)]
+--
+-- where `_HOME` is where Textadept is installed. The `tags` and `api` files are
+-- output to the current directory and can be loaded via
+-- [`load_ctags()`](#load_ctags) and [`api_files`](#api_files) respectively.
+--
+-- [LuaDoc]: http://keplerproject.github.com/luadoc/
+--
-- ### Other Adeptsense Settings
--
-- * `always_show_globals` [bool]