diff --git a/init.el b/init.el index d579f87..30805e1 100644 --- a/init.el +++ b/init.el @@ -31,6 +31,7 @@ ;; Load runtime specific setup files (load-file (get-config-path "runtimes/ruby.el")) (load-file (get-config-path "runtimes/nodejs.el")) +(load-file (get-config-path "runtimes/golang.el")) ;; Custom variables file (setq custom-file (get-config-path "custom-variables.el")) diff --git a/runtimes/golang.el b/runtimes/golang.el new file mode 100644 index 0000000..1201217 --- /dev/null +++ b/runtimes/golang.el @@ -0,0 +1,10 @@ +;; +;; Go setup +;; + +(setq my-gopath (file-truename "~/.go")) +(setq my-gopath-bin (concat my-gopath "/bin")) + +(setenv "GOPATH" my-gopath) +(setenv "PATH" (concat my-gopath-bin ":" (getenv "PATH"))) +(setq exec-path (cons my-gopath-bin exec-path))