summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/init.el b/init.el
index f24b6fe..b81466d 100644
--- a/init.el
+++ b/init.el
@@ -706,11 +706,11 @@
:config
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
(setq elpy-rpc-python-command "python3")
- (setq python-shell-interpreter "ptipython"
+ (setq python-shell-interpreter "python3"
python-shell-interpreter-args "console --simple-prompt"
python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
- "ptipython")
+ "python3")
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
@@ -721,6 +721,15 @@
("C-c ESC t" . python-pytest-popup)
)
+;; need this code to fix escape codes in compilation buffer
+;; (when running elpy test, for example)
+;; from https://stackoverflow.com/questions/3072648/cucumbers-ansi-colors-messing-up-emacs-compilation-buffer
+(set-frame-font)(require 'ansi-color)
+(defun colorize-compilation-buffer ()
+ (let ((inhibit-read-only t))
+ (ansi-color-apply-on-region (point-min) (point-max))))
+(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
+
;; Go programming
(use-package lsp-mode
:hook (go-mode . lsp-deferred)