<commit_before># Scripting

Textadept has superb support for editing Lua code. Syntax autocomplete and
LuaDoc is available for many Textadept objects as well as Lua's standard
libraries. See the [lua module documentation](../modules/_m.lua.commands.html)
for more information.

![Adeptsense ta](images/adeptsense_ta.png)
&nbsp;&nbsp;&nbsp;&nbsp;
![Adeptsense tadoc](images/adeptsense_tadoc.png)

## LuaDoc and Examples

Textadept's API is heavily documented. The [LuaDoc](../index.html) is the
ultimate resource on scripting Textadept. There are of course abundant scripting
examples since Textadept is mostly written in Lua.

## Lua Configuration

[Lua 5.2](http://www.lua.org/manual/5.2/) is built into Textadept. It has the
same configuration (`luaconf.h`) as vanilla Lua with the following exceptions:

* `TA_LUA_PATH` and `TA_LUA_CPATH` are the environment variable used in place of
  the usual `LUA_PATH` and `LUA_CPATH`.
* `LUA_ROOT` is `/usr/` in Linux systems instead of `/usr/local/`.
* The `LUA_COMPAT_COMPAT`, `LUA_COMPAT_LOADERS`, `LUA_COMPAT_LOG10`,
  `LUA_COMPAT_LOADSTRING`, and `LUA_COMPAT_MAXN` compatibility flags for Lua 5.1
  are turned off.

## Scintilla

The editing component used by Textadept is [Scintilla](http://scintilla.org).
The [buffer](../modules/buffer.html) part of Textadept's API is derived from the
[Scintilla API](http://scintilla.org/ScintillaDoc.html) so any C/C++ code using
Scintilla calls can be ported to Lua without too much trouble.

## Textadept Folder Structure

Because Textadept is mostly written in Lua, its Lua scripts have to be stored in
an organized folder structure.
<commit_msg>Updated doc/manual/11_Scripting.md.<commit_after># Scripting

Textadept has superb support for editing Lua code. Syntax autocomplete and
LuaDoc is available for many Textadept objects as well as Lua's standard
libraries. See the [lua module documentation](../modules/_m.lua.commands.html)
for more information.

![Adeptsense ta](images/adeptsense_ta.png)
&nbsp;&nbsp;&nbsp;&nbsp;
![Adeptsense tadoc](images/adeptsense_tadoc.png)

## LuaDoc and Examples

Textadept's API is heavily documented. The [LuaDoc](../index.html) is the
ultimate resource on scripting Textadept. There are of course abundant scripting
examples since Textadept is mostly written in Lua.

## Lua Configuration

[Lua 5.2](http://www.lua.org/manual/5.2/) is built into Textadept. It has the
same configuration (`luaconf.h`) as vanilla Lua with the following exceptions:

* `TA_LUA_PATH` and `TA_LUA_CPATH` are the environment variable used in place of
  the usual `LUA_PATH` and `LUA_CPATH`.
* `LUA_ROOT` is `/usr/` in Linux systems instead of `/usr/local/`.
* All compatibility flags for Lua 5.1 are turned off. (`LUA_COMPAT_UNPACK`,
  `LUA_COMPAT_LOADERS`, `LUA_COMPAT_LOG10`, `LUA_COMPAT_LOADSTRING`,
  `LUA_COMPAT_MAXN`, and `LUA_COMPAT_MODULE`.)

## Scintilla

The editing component used by Textadept is [Scintilla](http://scintilla.org).
The [buffer](../modules/buffer.html) part of Textadept's API is derived from the
[Scintilla API](http://scintilla.org/ScintillaDoc.html) so any C/C++ code using
Scintilla calls can be ported to Lua without too much trouble.

## Textadept Folder Structure

Because Textadept is mostly written in Lua, its Lua scripts have to be stored in
an organized folder structure.

{'fraction_non_alphanumeric': 0.09764918625678119, 'fraction_numerical': 0.0054249547920434, 'mean_word_length': 5.01268115942029, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1973679', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1074, 'n_words': 382}