 	("C-c P" . my-godoc-package)
 	("{" . my-go-electric-brace))
   :hook ((go-mode . lsp)
-	 (go-mode . smartparens-mode)))
+	 (go-mode . smartparens-mode)
+	 (go-mode . gofmt-before-save)))
 
 (defun aim/setup-ac-complete nil
   (interactive)

  (interactive)
  (let ((frame-name (get-frame-name (selected-frame))))
    (call-process-shell-command (concat "xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT \"dark\" -name \"" frame-name "\""))))

;; (defun hrs/apply-theme ()
;;   (interactive)

  (add-hook 'before-save-hook #'lsp-format-buffer t t)
  (add-hook 'before-save-hook #'lsp-organize-imports t t))

;;(remove-hook 'go-mode-hook #'lsp-go-install-save-hooks)

;;Optional - provides fancier overlays.
;; (use-package lsp-ui)
