mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Since we enable global-company-mode, explicitly enabling it in the setup for various major modes does nothing. But it does tie the code to company mode, making it harder to try alternatives like corfu.
38 lines
824 B
EmacsLisp
38 lines
824 B
EmacsLisp
;;; siren-terraform.el --- jimeh's Emacs Siren: terraform-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for terraform-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-reformatter)
|
|
(require 'siren-lsp)
|
|
|
|
(use-package terraform-mode
|
|
:hook
|
|
(terraform-mode . siren-terraform-mode-setup)
|
|
|
|
:custom
|
|
(terraform-indent-level 2)
|
|
|
|
:init
|
|
(defun siren-terraform-mode-setup ()
|
|
(setq-local tab-width 2)
|
|
(terraform-format-on-save-mode 1)
|
|
(lsp-deferred))
|
|
|
|
: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
|