-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Expand file tree
/
Copy pathinit.el
More file actions
72 lines (59 loc) · 2.29 KB
/
init.el
File metadata and controls
72 lines (59 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
;; .emacs.d/init.el
;; ===================================
;; MELPA Package Support
;; ===================================
;; Enables packaging support
(require 'package)
;; Adds the Melpa archive to the list of available repositories
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
;; Initializes the package infrastructure
(package-initialize)
;; If there are no archived package contents, refresh them
(when (not package-archive-contents)
(package-refresh-contents))
;; Installs packages
;;
;; myPackages contains a list of package names
(defvar myPackages
'(better-defaults ;; Setup some better Emacs defaults
elpy ;; Emacs Lisp Python Environment
ein ;; Emacs iPython Notebook
flycheck ;; On the fly syntax checking
py-autopep8 ;; Run autopep8 on save
blacken ;; Black formatting on save
magit ;; Git integration
material-theme ;; Theme
)
)
;; Scans the list in myPackages
;; If the package listed is not already installed, install it
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)
;; ====================================
;; Basic Customization
;; ====================================
(setq inhibit-startup-message t) ;; Hide the startup message
(load-theme 'material t) ;; Load material theme
(global-linum-mode t) ;; Enable line numbers globally
;; ====================================
;; DEVELOPMENT SETUP
;; ====================================
;; Enable elpy
(elpy-enable)
;; Use IPython for REPL
;; (setq python-shell-interpreter "jupyter"
;; python-shell-interpreter-args "console --simple-prompt"
;; python-shell-prompt-detect-failure-warning nil)
;; (add-to-list 'python-shell-completion-native-disabled-interpreters
;; "jupyter")
;; Enable Flycheck
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode))
;; Enable Autopep8
;; (require 'py-autopep8)
;; (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
;; User-Defined init.el ends here