doomemacs/modules/lang/lua
Henrik Lissner 88844e9cec docs: simplify internal docs links
Fewer links means less confusion.

- Merge doom-issue and doom-commit links into doom-ref (for auto-linking
  Issue/PR/commit references).
- Merge doom-module-source and doom-docs-source links into doom-source.
- Rename doom-report-issue to doom-report.
- Use '!' as the icon for module issues link.
- Remove doom-repo (replaced with "doom:*" in :lang org module).
- Add doomdir and emacsdir links to :lang org module.
2021-11-21 20:04:28 +01:00
..
autoload lang/lua: minor reformatting 2019-10-28 23:23:12 -04:00
config.el feat(lua): improve fennel support 2021-07-28 15:26:43 -04:00
packages.el bump: :lang 2021-09-15 01:22:33 +02:00
README.org docs: simplify internal docs links 2021-11-21 20:04:28 +01:00

:lang lua

Back to module index ! Issues ↖ Github ± Suggest edits ? Help


Description   unfold

This module adds Lua support to Doom Emacs.

  • REPL
  • Love2D specific functions
  • Moonscript support
  • Fennel support

Module flags

+fennel
Enable support for the Fennel language.
+lsp
Enable LSP support for lua-mode. Requires :tools lsp and a langserver (supports EmmyLua, lua-language-server, and lua-lsp).
+moonscript
Enable support for the Moonscript language.

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires Lua 5.1+ for most of its capabilities and, optionally, the fennel and moonscript transpilers. An LSP server is also required for LSP support.

Language Server Protocol servers

LSP server support depends on which flavor of the :tools lsp module you have installed (eglot or lsp-mode).

LSP-mode

Three servers are supported, ordered from highest to lowest priority:

EmmyLua-LanguageServer
Must be in $EMACSDIR/.local/etc/lsp/EmmyLua-LS-all.jar. See lsp-clients-emmy-lua-jar-path variable to change this.
Sumneko language server (lua-language-server)
Must be in $EMACSDIR/.local/etc/lsp/lua-language-server/. See lsp-clients-lua-language-server-bin variable to change this.
lua-lsp
Must be available in ~/.luarocks/bin/lua-lsp. See lsp-clients-lua-lsp-server-install-dir variable to change this.

LSP-mode documentation has more information about setting up the server and the configuration variables correctly.

Eglot

Eglot currently only supports one of the above servers out of the box:

Sumneko language server (lua-language-server)
Must be in $EMACSDIR/.local/etc/lsp/lua-language-server/. See +lua-lsp-dir variable to change this.

TODO Usage

🔨 This module has no usage documentation yet. Write some?

TODO Configuration

🔨 This module's configuration documentation is incomplete. Complete it?

lua-lsp-dir
This must be set when using +lsp and using lua-language-server. This controls where the repository has been cloned and built to finish the configuration of the server.

Troubleshooting

Report an issue?

Install lua-language-server

A catch-all issue has been created to gather help for installing lua-language-server on non-VSCode platforms.

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

🔨 This module has no appendix yet. Write one?