Advertisement
abasar

Emacs python config

Sep 4th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.95 KB | None | 0 0
  1. ;; init.el --- Emacs configuration
  2. ;; Write "python -m pip install elpy flycheck py-atuopep8 jedi"
  3. ;; INSTALL PACKAGES
  4. ;; --------------------------------------
  5.  
  6. (require 'package)
  7.  
  8. (add-to-list 'package-archives
  9.        '("melpa" . "http://melpa.org/packages/") t)
  10.  
  11. (package-initialize)
  12. (when (not package-archive-contents)
  13.   (package-refresh-contents))
  14.  
  15. (defvar myPackages
  16.   '(material-theme
  17.     evil
  18.     evil-leader
  19.     helm
  20.     elpy
  21.     flycheck
  22.     py-autopep8
  23.     powerline))
  24.  
  25. (mapc #'(lambda (package)
  26.     (unless (package-installed-p package)
  27.       (package-install package)))
  28.       myPackages)
  29.  
  30. ;; BASIC CUSTOMIZATION
  31. ;; --------------------------------------
  32. (elpy-enable)
  33. (when (require 'flycheck nil t)
  34.   (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
  35.   (add-hook 'elpy-mode-hook 'flycheck-mode))
  36.  
  37. (require 'py-autopep8)
  38. (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
  39.  
  40. (require 'helm-config)
  41.  
  42.  
  43. (require 'evil-leader)
  44. (global-evil-leader-mode)
  45.  
  46. (require 'evil)
  47. (evil-mode 1)
  48.  
  49. (evil-leader/set-leader "<SPC>")
  50.  
  51. (evil-leader/set-key
  52.  "x" 'helm-M-x
  53.  "f f" 'helm-find-files
  54.  "f s" 'save-buffer)
  55.  
  56. (require 'powerline)
  57. (powerline-default-theme)
  58.  
  59. (setq inhibit-startup-message t) ;; hide the startup message
  60. (load-theme 'material t) ;; load material theme
  61. (global-linum-mode t) ;; enable line numbers globally
  62.  
  63. ;; init.el ends here
  64. (custom-set-variables
  65.  ;; custom-set-variables was added by Custom.
  66.  ;; If you edit it by hand, you could mess it up, so be careful.
  67.  ;; Your init file should contain only one such instance.
  68.  ;; If there is more than one, they won't work right.
  69.  '(package-selected-packages (quote (elpy material-theme helm evil-leader))))
  70. (custom-set-faces
  71.  ;; custom-set-faces was added by Custom.
  72.  ;; If you edit it by hand, you could mess it up, so be careful.
  73.  ;; Your init file should contain only one such instance.
  74.  ;; If there is more than one, they won't work right.
  75.  )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement