fix(language/terraform): disable lsp-mode and tree-sitter-mode

Both cause annoyances and freezes, to the point they're generally not
worth using right now.
This commit is contained in:
2024-05-12 13:52:32 +01:00
parent 50ef997d41
commit 6faa4d9f65
2 changed files with 11 additions and 5 deletions

View File

@@ -18,7 +18,8 @@
:preface
(defun siren-terraform-mode-setup ()
(setq-local tab-width 2))
(setq-local tab-width 2)
(terraform-format-on-save-mode t))
:config
;; This does a better job of injecting formatted content than the default
@@ -35,13 +36,18 @@
:preface
(defun siren-lsp-terraform-mode-setup ()
;; TODO: Re-evaluate lsp-mode for Terraform at some point in the future.
;; Currently it mostly just gets in the way and causes enough annoyance that
;; it's not worth using by default.
;; 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)
;; (setq-local lsp-semantic-tokens-enable nil)
(lsp-format-buffer-on-save-mode t)
(lsp-deferred)))
;; (lsp-format-buffer-on-save-mode t)
;; (lsp-deferred)
))
(use-package terraform-doc
:defer t)

View File

@@ -19,7 +19,7 @@
python-mode
ruby-mode
rust-mode
terraform-mode
;; terraform-mode ;; Disabled due to frequently locking up Emacs for minutes
typescript-mode
yaml-mode) . siren-tree-sitter-mode-enable)