Skip to content

Commit

Permalink
update go
Browse files Browse the repository at this point in the history
  • Loading branch information
dej4vu committed Aug 5, 2024
1 parent 08d800f commit 240a8df
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lisp/init-go.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
(setq tab-width 4))

;; Set up before-save hooks to format buffer and add/delete imports.
;; Make sure you don't have other gofmt/goimports hooks enabled.
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
;;(add-hook 'before-save-hook #'lsp-organize-imports t t)
)
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks))
;; Make sure you don't have other gofmt/goimports hooks enabled.
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
;;(add-hook 'before-save-hook #'lsp-organize-imports t t)
)
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks))

(use-package go-tag)

(provide 'init-go)

0 comments on commit 240a8df

Please sign in to comment.