Browse Source

Python tk export and pyenv-mode for emacs

master
Taylor Bockman 4 years ago
parent
commit
763dbcf7c9
  1. 1
      dotfiles/bash/bash_profile
  2. 19
      dotfiles/emacs.d/init.el
  3. 3
      dotfiles/emacs.d/package.el

1
dotfiles/bash/bash_profile

@ -7,3 +7,4 @@ export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
export PATH="/usr/local/opt/openjdk/bin:$PATH"
export PATH="/usr/local/opt/llvm/bin:$PATH"
export PATH="/usr/local/opt/qt/bin:$PATH"
export PATH="/usr/local/opt/tcl-tk/bin:$PATH"

19
dotfiles/emacs.d/init.el

@ -190,12 +190,31 @@ There are two things you can do about this warning:
:ensure t
:init (elpy-enable))
;; Enable pyenv integration.
(use-package pyenv-mode
:config
(pyenv-mode))
;; Disable elpy default virtualenv (use the pyenv one)
(setq elpy-rpc-virtualenv-path 'current)
;;--------------------------------------------------------------------------------------
;; Save hooks
;;--------------------------------------------------------------------------------------
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; Automagically enable the right pyenv if a .python-version exists
(defun ssbb-pyenv-hook ()
"Automatically activates pyenv version if .python-version file exists."
(f-traverse-upwards
(lambda (path)
(let ((pyenv-version-path (f-expand ".python-version" path)))
(if (f-exists? pyenv-version-path)
(pyenv-mode-set (s-trim (f-read-text pyenv-version-path 'utf-8))))))))
;;--------------------------------------------------------------------------------------
;; Keybinds
;;--------------------------------------------------------------------------------------

3
dotfiles/emacs.d/package.el

@ -79,6 +79,9 @@
rtags
company-rtags
;; Environments
pyenv-mode
;;General
use-package

Loading…
Cancel
Save