mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(lang): enable manual formatting of go-mode buffers with golines
This commit is contained in:
@@ -37,6 +37,14 @@
|
||||
company-minimum-prefix-length 1
|
||||
whitespace-style (delete 'indentation whitespace-style))
|
||||
|
||||
;; Enable manually formatting with golines by executing M-x gofmt
|
||||
(let ((golines (executable-find "golines"))
|
||||
(gofumports (executable-find "gofumports")))
|
||||
(when golines
|
||||
(setq gofmt-command golines)
|
||||
(setq gofmt-args '("-t" "4" "-m" "80" "--no-reformat-tags"))
|
||||
(when gofumports
|
||||
(add-to-list 'gofmt-args "--base-formatter=gofumports"))))
|
||||
|
||||
(when (fboundp 'highlight-symbol-mode)
|
||||
(highlight-symbol-mode -1))
|
||||
|
||||
Reference in New Issue
Block a user