mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
chore(formatting): expand reformatter macro on first use rather than init
This commit is contained in:
@@ -48,14 +48,17 @@
|
||||
(siren-folding)
|
||||
(subword-mode +1))
|
||||
|
||||
(defun siren-define-golines-format-mode ()
|
||||
;; Setup golines formatter for manual use - on save formatting is handled by
|
||||
;; lsp-mode.
|
||||
(reformatter-define golines-format
|
||||
:program "golines"
|
||||
:args '("-t" "4" "-m" "80" "--no-reformat-tags"
|
||||
"--base-formatter=gofumports")
|
||||
:lighter "GOLINES"))
|
||||
|
||||
:config
|
||||
;; Setup golines formatter for manual use - on save formatting is handled by
|
||||
;; lsp-mode.
|
||||
(reformatter-define golines
|
||||
:program "golines"
|
||||
:args '("-t" "4" "-m" "80" "--no-reformat-tags"
|
||||
"--base-formatter=gofumports")
|
||||
:lighter "GOLINES")
|
||||
(siren-define-golines-format-mode)
|
||||
|
||||
(define-key 'help-command (kbd "G") 'godoc)
|
||||
|
||||
|
||||
@@ -22,14 +22,16 @@
|
||||
(setq-local tab-width 2)
|
||||
(terraform-format-on-save-mode 1))
|
||||
|
||||
(defun siren-define-terraform-format-mode ()
|
||||
;; 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"))
|
||||
|
||||
: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")
|
||||
(siren-define-terraform-format-mode)
|
||||
|
||||
;; When terraform-ls CLI tool is available, setup lsp-mode to use it
|
||||
(when (executable-find "terraform-ls")
|
||||
|
||||
Reference in New Issue
Block a user