diff options
author | Franck Cuny <franck@fcuny.net> | 2021-08-24 17:56:55 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2021-08-24 17:56:55 -0700 |
commit | ab41d9cdcad99b121b206b9aab56e9db387f669a (patch) | |
tree | beea57933fe419a8ac6dfc146d08ce647196690c | |
parent | emacs: fix hook syntax for lsp-mode (diff) | |
download | emacs.d-ab41d9cdcad99b121b206b9aab56e9db387f669a.tar.gz |
emacs: move function for go-mode-compile
The function needs to be defined before we use it in the `use-package` for go-mode.
-rw-r--r-- | emacs/custom/fcuny-prog.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/emacs/custom/fcuny-prog.el b/emacs/custom/fcuny-prog.el index 1c341e1..d291f5d 100644 --- a/emacs/custom/fcuny-prog.el +++ b/emacs/custom/fcuny-prog.el @@ -113,6 +113,12 @@ :config (add-hook 'makefile-mode-hook (lambda () (setq-local tab-width 2)))) + +(defun fcuny/setup-go-mode-compile () + (if (not (string-match "go" compile-command)) + (set (make-local-variable 'compile-command) + "go build -v"))) + (use-package go-mode :ensure t :hook ((before-save . lsp-format-buffer) @@ -137,11 +143,6 @@ :bind (:map puppet-mode-map ("C-c |" . puppet-align-block))) -(defun fcuny/setup-go-mode-compile () - (if (not (string-match "go" compile-command)) - (set (make-local-variable 'compile-command) - "go build -v"))) - (use-package compile :ensure nil :custom |