mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Use exec-path-from-shell package to setup exec-path and PATH
This commit is contained in:
1
init.el
1
init.el
@@ -31,7 +31,6 @@
|
||||
;; 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"))
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
dash-at-point
|
||||
dired+
|
||||
ecb
|
||||
exec-path-from-shell
|
||||
expand-region
|
||||
feature-mode
|
||||
fill-column-indicator
|
||||
@@ -170,6 +171,10 @@
|
||||
(setq stack-trace-on-error t) ;; hack to fix a load-error
|
||||
(if window-system (ecb-activate)))
|
||||
|
||||
(when (require 'exec-path-from-shell)
|
||||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-initialize)))
|
||||
|
||||
;; Load Auto-Complete
|
||||
(when (require 'auto-complete nil 'noerror)
|
||||
(require 'auto-complete-config)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
;;
|
||||
;; 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))
|
||||
@@ -2,9 +2,6 @@
|
||||
;; Node.js setup
|
||||
;;
|
||||
|
||||
(setq exec-path (cons "~/.nvm/v0.10.24/bin" exec-path))
|
||||
;; (setenv "PATH" (concat "~/.nvm/v0.10.24/bin:" (getenv "PATH")))
|
||||
|
||||
|
||||
;; nvm
|
||||
(when (require 'nvm nil 'noerror)
|
||||
(nvm-use "v0.10.24"))
|
||||
|
||||
@@ -3,11 +3,5 @@
|
||||
;;
|
||||
|
||||
;; rbenv
|
||||
(setq exec-path (cons "~/.rbenv/bin" exec-path))
|
||||
(setq exec-path (cons "~/.rbenv/shims" exec-path))
|
||||
|
||||
(setenv "PATH" (concat "~/.rbenv/bin:" (getenv "PATH")))
|
||||
(setenv "PATH" (concat "~/.rbenv/shims:" (getenv "PATH")))
|
||||
|
||||
;; (when (require 'rbenv nil 'noerror)
|
||||
;; (global-rbenv-mode))
|
||||
|
||||
Reference in New Issue
Block a user