fix(lang): ensure golang setup works with goenv

This commit is contained in:
2020-10-09 10:23:27 +01:00
parent 499349cf3a
commit 9d45b1a908
2 changed files with 3 additions and 4 deletions

View File

@@ -12,7 +12,6 @@
(exec-path-from-shell-variables '("PATH"
"MANPATH"
"TMPDIR"
"GOPATH"
"KUBECONFIG"))
(exec-path-from-shell-arguments '("-l"))
(exec-path-from-shell-check-startup-files nil)

View File

@@ -50,10 +50,10 @@
(subword-mode +1))
:config
(message "loading go-mode")
(when (memq window-system '(mac ns))
(when (not (getenv "GOPATH"))
(exec-path-from-shell-copy-env "GOPATH"))
(when (not (getenv "GOENV_GOPATH_PREFIX"))
(exec-path-from-shell-copy-env "GOENV_GOPATH_PREFIX"))
(define-key 'help-command (kbd "G") 'godoc)