From c137dde815956459183eba2b714769c3fab181cc Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 25 Apr 2023 02:03:46 +0100 Subject: [PATCH] feat(language/lua): improve lsp-mode setup and set tab-width to 2 --- modules/languages/siren-lua.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/languages/siren-lua.el b/modules/languages/siren-lua.el index f6fe2c8..7fe8415 100644 --- a/modules/languages/siren-lua.el +++ b/modules/languages/siren-lua.el @@ -26,7 +26,13 @@ :preface (defun siren-lsp-lua-mode-setup () - (setq-local tab-width 4) + (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)