# _M.textadept.mime_types

Handles file type detection for Textadept.

- - -

## Fields

- - -

<a id="_G.events.LANGUAGE_MODULE_LOADED"></a>
### `_G.events.LANGUAGE_MODULE_LOADED` (string)

Emitted after loading a language-specific module.
  This is useful for overriding a language-specific module's key bindings
  or other properties since the module is not loaded when Textadept starts.
  Arguments:

  * *`lang`*: The language lexer name.

- - -


## Functions

- - -

<a id="select_lexer"></a>
### `select_lexer`()

Prompts the user to select a lexer for the current buffer.

See also:

* [`buffer.set_lexer`](buffer.html#set_lexer)

- - -


## Tables

- - -

<a id="extensions"></a>
### `extensions`

Map of file extensions (excluding the leading '.') to their associated
lexers.
If the file type is not recognized by shebang words or first-line patterns,
each file extension is matched against the file's extension.

- - -

<a id="lexers"></a>
### `lexers`

List of lexers found in `_LEXERPATH`.

- - -

<a id="patterns"></a>
### `patterns`

Map of first-line patterns to their associated lexers.
If a file type is not recognized by shebang words, each pattern is matched
against the first line in the file.

- - -

<a id="shebangs"></a>
### `shebangs`

Map of shebang words to their associated lexers.
If the file has a shebang line, a line that starts with "#!" and is the first
line in the file, each shebang word is matched against that line.

- - -

