 ;;(setq company-auto-complete 'never)
 ;;(company-tng-configure-default)
 
+(use-package go-mode
+  :custom
+  (gofmt-command "goimports")
+  :config
+  (add-hook 'before-save-hook #'gofmt-before-save)
+  (remove-hook 'go-mode 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
+  :bind
+  (:map go-mode-map
+	("M-RET" . compile)
+	("C-M-x" . aim/run-go-buffer)
+	;;("M-." . godef-jump))
+	))
+
 ;; (use-package go-mode
-;;   :mode
-;;   "\\.go\\'"
-;;   :config
+;;   :mode "\\.go\\'"
+;;   :custom (gofmt-command "goimports")
+;;   :bind (:map go-mode-map
+;;	      ("C-c C-n" . go-run)
+;;	      ("C-c ."   . go-test-current-test)
+;;	      ("C-c f"   . go-test-current-file)
+;;	      ("C-c a"   . go-test-current-project))
+;;   :config
+;;   (add-hook 'before-save-hook #'gofmt-before-save)
 ;;   (setq gofmt-command "goimports")
-;;   (remove-hook 'go-mode 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
-;;   :bind
-;;   (:map go-mode-map
-;; 	("C-M-x" . aim/run-go-buffer)
-;; 	("M-." . godef-jump)))
-
-(use-package go-mode
-  :mode "\\.go\\'"
-  :custom (gofmt-command "goimports")
-  :bind (:map go-mode-map
-	      ("C-c C-n" . go-run)
-	      ("C-c ."   . go-test-current-test)
-	      ("C-c f"   . go-test-current-file)
-	      ("C-c a"   . go-test-current-project))
-  :config
-  (add-hook 'before-save-hook #'gofmt-before-save)
-  (setq gofmt-command "goimports")
-  (use-package gotest)
-  (use-package go-tag
-    :config (setq go-tag-args (list "-transform" "camelcase"))))
+;;   (use-package gotest)
+;;   (use-package go-tag
+;;     :config (setq go-tag-args (list "-transform" "camelcase"))))
 
 (use-package flycheck)
 


(use-package lsp-mode
  :commands (lsp lsp-deferred)
  :hook ((before-save . lsp-format-buffer)
         (before-save . lsp-organize-imports))
  :bind (("C-c d" . lsp-describe-thing-at-point)
	 ("C-c e n" . flymake-goto-next-error)
	 ("C-c e p" . flymake-goto-prev-error)

			      (time-subtract after-init-time before-init-time)))
		     gcs-done)
	    (blink-cursor-mode -1)	;indicator that all is good
	    (setq gc-cons-threshold 200000000 ;200MB
		  gc-cons-percentage 0.1
		  file-name-handler-alist default-file-name-handler-alist)))

