Skip to content

Commit adf4ec0

Browse files
author
Philip Yang
committed
better solarized mode setup && elpy emacs fix
1 parent 022f010 commit adf4ec0

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

emacs-common.el

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
;; additional .el load path
55
(setq elisp_path "~/CodeBase/emacs_dev")
66
(add-to-list 'load-path elisp_path)
7-
(dolist (pkg_dir '("solarized-emacs"
8-
"use-package"
7+
(dolist (pkg_dir '("use-package"
98
"xterm-color"
109
"emacs-async"
1110
"emacs-sbt-mode"
@@ -133,9 +132,26 @@
133132
;;--------------------------------------------------------------------
134133
;; Python
135134
(elpy-enable)
136-
(setq elpy-rpc-python-command "python3")
135+
(setq elpy-rpc-python-command "python3") ;; use a default python
137136
(setq elpy-rpc-backend "jedi")
138-
(setq elpy-interactive-python-command "ipython3 --simple-prompt -i")
137+
(elpy-use-ipython "ipython3")
138+
(setq python-shell-interpreter "ipython3")
139+
(setq python-shell-interpreter-args "--simple-prompt --pprint")
140+
(setq python-shell-prompt-detect-enabled nil)
141+
(setq python-shell-prompt-detect-failure-warning nil)
142+
143+
;; https://github.com/emacs-mirror/emacs/commit/dbb341022870ecad4c9177485a6770a355633cc0
144+
(defun python-shell-completion-native-try ()
145+
"Return non-nil if can trigger native completion."
146+
(let ((python-shell-completion-native-enable t)
147+
(python-shell-completion-native-output-timeout
148+
python-shell-completion-native-try-output-timeout))
149+
(python-shell-completion-native-get-completions
150+
(get-buffer-process (current-buffer))
151+
nil "_")))
152+
153+
154+
;;(setq elpy-interactive-python-command "ipython3 --simple-prompt -i")
139155
;; (use-package python
140156
;; :mode ("\\.py\\'" . python-mode)
141157
;; :init
@@ -234,9 +250,6 @@
234250
;; with unicode
235251
(load "emacs-rc-pretty-lambda.el")
236252

237-
;; New in Emacs 24, color theme, loaded at last
238-
(load-theme 'solarized-dark "NO-CONFIRM")
239-
240253
;; global variables
241254
(setq
242255
inhibit-startup-screen t
@@ -274,3 +287,5 @@
274287
word-wrap t
275288
ns-pop-up-frames nil)
276289

290+
;; set themes at last
291+
(load-theme 'solarized t)

0 commit comments

Comments
 (0)