mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
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.
39 lines
866 B
EmacsLisp
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
|