;;; siren-lua.el --- jimeh's Emacs Siren: lua-mode configuration. ;;; Commentary: ;; Basic configuration for lua-mode. ;;; Code: (use-package lua-mode :hook (lua-mode . siren-lua-mode-setup) :preface (defun siren-lua-mode-setup () (setq-local lua-indent-level 2))) (use-package lsp-lua :straight lsp-mode :hook (lua-mode . siren-lsp-lua-mode-setup) :custom (lsp-lua-hint-enable t) (lsp-lua-telemetry-enable nil) :preface (defun siren-lsp-lua-mode-setup () (setq-local tab-width 2) ;; Disable semantic tokens as it typically causes an annoying delay with the ;; syntax highlighting as you type. Essentially all new text is a very faded ;; out grey color for the first 1-2 seconds as you type. (setq-local lsp-semantic-tokens-enable nil) (lsp-format-buffer-on-save-mode t) (lsp-deferred))) (provide 'siren-lua) ;;; siren-lua.el ends here