File: lua-mode.el.html
lua-mode provides support for editing Lua, including automatic
indentation, syntactical font-locking, running interactive shell,
Flymake checks with luacheck, interacting with hs-minor-mode(var)/hs-minor-mode(fun) and
online documentation lookup.
The following variables are available for customization (see more via
`M-x customize-group lua`):
- Var lua-indent-level:
indentation offset in spaces
- Var lua-indent-string-contents:
set to `t` if you like to have contents of multiline strings to be
indented like comments
- Var lua-indent-nested-block-content-align:
set to nil to stop aligning the content of nested blocks with the
open parenthesis
- Var lua-indent-close-paren-align:
set to t to align close parenthesis with the open parenthesis,
rather than with the beginning of the line
- Var lua-mode-hook:
list of functions to execute when lua-mode is initialized
- Var lua-documentation-url:
base URL for documentation lookup
- Var lua-documentation-function: function used to
show documentation (`eww` is a viable alternative for Emacs 25)
These are variables/commands that operate on the Lua process:
- Var lua-default-application:
command to start the Lua process (REPL)
- Var lua-default-command-switches:
arguments to pass to the Lua process on startup (make sure `-i` is
there if you expect working with Lua shell interactively)
- Cmd lua-start-process: start new REPL process, usually happens
automatically
- Cmd lua-kill-process: kill current REPL process
These are variables/commands for interaction with the Lua process:
- Cmd lua-show-process-buffer: switch to REPL buffer
- Cmd lua-hide-process-buffer: hide window showing REPL buffer
- Var lua-always-show: show REPL buffer after sending something
- Cmd lua-send-buffer: send whole buffer
- Cmd lua-send-current-line: send current line
- Cmd lua-send-defun: send current top-level function
- Cmd lua-send-region: send active region
- Cmd lua-restart-with-whole-file: restart REPL and send whole buffer
To enable on-the-fly linting, make sure you have the luacheck program
installed (available from luarocks) and activate flymake-mode(var)/flymake-mode(fun).
See "M-x apropos-command ^lua-" for a list of commands. See "M-x customize-group lua" for a list of customizable variables.
Defined variables (37)
lua--beginning-of-defun-re | Lua top level (matches only at the beginning of line) function header regex. |
lua--builtins | A regexp that matches Lua builtin functions & variables. |
lua--left-shifter-regexp | Regular expression that matches left-shifter expression. |
lua-always-show | Non-nil means display ‘lua-process-buffer’ after sending a command. |
lua-block-token-alist | This is a list of block token information blocks. |
lua-comment-start | Default value of ‘comment-start’. |
lua-comment-start-skip | Default value of ‘comment-start-skip’. |
lua-cont-bol-regexp | Regexp that matches a line that continues previous one. |
lua-cont-eol-regexp | Regexp that matches the ending of a line that needs continuation. |
lua-default-application | Default application to run in Lua process. |
lua-default-command-switches | Command switches for ‘lua-default-application’. |
lua-documentation-function | Function used to fetch the Lua reference manual. |
lua-documentation-url | URL pointing to the Lua reference manual. |
lua-electric-flag | Non-nil means electric actions are enabled. |
lua-font-lock-keywords | Default expressions to highlight in Lua mode. |
lua-imenu-generic-expression | Imenu generic expression for ‘lua-mode’. |
lua-indent-close-paren-align | Controls how closing parenthesis is aligned. |
lua-indent-level | Amount by which Lua subexpressions are indented. |
lua-indent-nested-block-content-align | Controls how the content of nested blocks are indented. |
lua-indent-string-contents | If non-nil, contents of multiline string will be indented. |
lua-jump-on-traceback | Jump to innermost traceback location in *lua* buffer. |
lua-luacheck-program | Name of the luacheck executable. |
lua-mode-abbrev-table | Abbreviation table used in ‘lua-mode’ buffers. |
lua-mode-hook | Hooks called when Lua mode fires up. |
lua-mode-map | Keymap used in ‘lua-mode’ buffers. |
lua-mode-menu | Menu bar entry for ‘lua-mode’. |
lua-mode-syntax-table | ‘lua-mode’ syntax table. |
lua-prefix-key | Prefix for all ‘lua-mode’ commands. |
lua-prefix-mode-map | Keymap that is used to define keys accessible by ‘lua-prefix-key’. |
lua-process | The active Lua process. |
lua-process-buffer | Buffer used for communication with the Lua process. |
lua-process-buffer-name | Name of the inferior Lua buffer. |
lua-process-history-file | File used to save command history of the inferior Lua process. |
lua-process-startfile | Start file to load into the inferior Lua process at startup. |
lua-prompt-regexp | Regexp which matches the Lua program’s prompt. |
lua-region-end | End of special region for Lua communication. |
lua-region-start | Start of special region for Lua communication. |