diff options
author | 2012-03-15 13:13:24 -0400 | |
---|---|---|
committer | 2012-03-15 13:13:24 -0400 | |
commit | 23d82529b3703ed4d46fc1dd06f4d0e3e9ea2c09 (patch) | |
tree | 42ee5a8fd4a57af4e23a98b7b511d8109a473c78 | |
parent | 3534a4e66eb248f0ba5560014c2e71208a6312cd (diff) | |
download | textadept-23d82529b3703ed4d46fc1dd06f4d0e3e9ea2c09.tar.gz textadept-23d82529b3703ed4d46fc1dd06f4d0e3e9ea2c09.zip |
Added documentation for generating API documentation and Lua Adeptsense.
-rw-r--r-- | doc/11_Scripting.md | 27 | ||||
-rw-r--r-- | modules/textadept/adeptsense.lua | 13 |
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] |