Files
.emacs.d/modules/languages/siren-terraform.el
Jim Myhrberg f8ed1029da fix(language/terraform): disable lsp-mode in terraform files
The terraform language server is not very good, very rarely provides any
completions, and when it doesn't it overall is just slow and laggy.

Especially so as lsp-mode is set to syntax highlight with the language
server, causing syntax highlighting to often be about 5 seconds behind
of whatever you're typing.
2022-07-15 22:46:11 +01:00

39 lines
866 B
EmacsLisp

;;; siren-terraform.el --- jimeh's Emacs Siren: terraform-mode configuration.
;;; Commentary:
;; Basic configuration for terraform-mode.
;;; Code:
(require 'siren-lsp)
(require 'siren-reformatter)
(require 'siren-tree-sitter)
(use-package terraform-mode
:hook
(terraform-mode . siren-terraform-mode-setup)
:custom
(terraform-indent-level 2)
:preface
(defun siren-terraform-mode-setup ()
(setq-local tab-width 2)
(tree-sitter-hl-mode +1)
(terraform-format-on-save-mode 1))
:config
;; This does a better job of injecting formatted content than the default
;; formatting commands included with terraform-mode.
(reformatter-define terraform-format
:program "terraform"
:args '("fmt" "-no-color" "-")
:lighter " TF"))
(use-package terraform-doc
:defer t)
(provide 'siren-terraform)
;;; siren-terraform.el ends here