doomemacs/modules/lang/lua
Henrik Lissner d58d084774
tweak(:lang,:tools): start eglot/lsp-mode later
To ensure lsp/eglot settings have precedence over local servers (e.g.
cider and lookup handlers).

Ref: clojure-emacs/cider#3170
2022-03-30 17:32:47 +02:00
..
autoload lang/lua: minor reformatting 2019-10-28 23:23:12 -04:00
config.el tweak(:lang,:tools): start eglot/lsp-mode later 2022-03-30 17:32:47 +02:00
packages.el bump: :lang 2021-09-15 01:22:33 +02:00
README.org lang/lua: document fennel support in readme 2021-06-21 12:27:57 +03:00

lang/lua

Description

Adds Lua support to Doom Emacs

  • REPL
  • Love2D specific functions
  • Moonscript support

Maintainers

This module has no dedicated maintainers.

Module Flags

  • +moonscript Moonscript language support
  • +fennel Fennel language support
  • +lsp Language Server Protocol support

Plugins

Prerequisites

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 ~/.emacs.d/.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 ~/.config/emacs/.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 ~/.config/emacs/.local/etc/lsp/lua-language-server/. See +lua-lsp-dir variable to change this.

TODO Features

Configuration

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

Install lua-language-server

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