ProofGeneral/PG@e0ec3db200 -> ProofGeneral/PG@85cde55a86 ananthakumaran/exunit.el@ee06b14b61 -> ananthakumaran/exunit.el@8de56e3fd5 emacs-lsp/emacs-ccls@41399b0eba -> emacs-lsp/emacs-ccls@28c7930c89 emacs-php/php-mode@0f756a8c07 -> emacs-php/php-mode@5b6cc1c068 hhvm/hack-mode@343e45f2a6 -> hhvm/hack-mode@0addbff8b6 immerrr/lua-mode@d074e4134b -> immerrr/lua-mode@2f6b8d7a63 jart/disaster@b20f8e1ef9 -> jart/disaster@8b44591322 jwiegley/emacs-async@b99658e831 -> jwiegley/emacs-async@bb3f31966e ocaml/dune@b74586e909 -> ocaml/dune@a46193e167 ocaml/merlin@92c3ba9473 -> ocaml/merlin@2eeb63d002 ocaml/tuareg@1d53723e39 -> ocaml/tuareg@1600fdad28 purescript-emacs/purescript-mode@b076bafe94 -> purescript-emacs/purescript-mode@a3d6ca4ba5 technomancy/fennel-mode@4ccb6d5944 -> technomancy/fennel-mode@811f39de12
:lang lua
Description unfold
This module adds Lua support to Doom Emacs.
- REPL
- Love2D specific functions
- Moonscript support
- Fennel support
Maintainers
Module flags
- +fennel
- Enable support for the Fennel language.
- +lsp
-
Enable LSP support for
lua-mode
. Requires doom-module::tools lsp and a langserver (supports EmmyLua, lua-language-server, and lua-lsp). - +tree-sitter
- Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter. Has support for both Lua and Fennel.
- +moonscript
- Enable support for the Moonscript language.
Packages
- doom-package:company-lua if doom-module::completion company
- doom-package:fennel-mode if doom-module:+fennel
- doom-package:lua-mode
-
- doom-package:flycheck-moonscript if doom-module::checkers syntax
- doom-package:moonscript-mode
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 doom-module::tools lsp module you have installed (doom-package:eglot or doom-package: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
. Seelsp-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/
. Seelsp-clients-lua-language-server-bin
variable to change this. - lua-lsp
- Must be available in
~/.luarocks/bin/lua-lsp
. Seelsp-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.
Formatter
Formatting is handled using the doom-module::editor format module via Stylua.
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 doom-module:+lsp and using lua-language-server. This controls where the repository has been cloned and built to finish the configuration of the server.
Troubleshooting
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?