mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Gee, what're we gonna do tonight, Brain?
This commit is contained in:
@ -3,30 +3,41 @@
|
||||
(use-package python
|
||||
:mode ("\\.py\\'" . python-mode)
|
||||
:interpreter ("python" . python-mode)
|
||||
:init
|
||||
(setq python-indent-offset 4)
|
||||
:init (setq python-indent-offset 4)
|
||||
:config
|
||||
(progn
|
||||
(use-package jedi)
|
||||
|
||||
(unless (file-directory-p "~/.emacs.d/.python-environments/default/")
|
||||
(jedi:install-server))
|
||||
|
||||
(add-hook 'python-mode-hook 'jedi:ac-setup)
|
||||
(setq python-environment-directory *tmp-dir)
|
||||
(setq python-shell-interpreter "ipython")
|
||||
|
||||
;; Interferes with smartparens
|
||||
(defmap python-mode-map (kbd "DEL") nil)
|
||||
|
||||
(add-hook! 'python-mode-hook
|
||||
(setq my-switch-to-repl-func 'python-shell-switch-to-shell
|
||||
my-send-region-to-repl-func 'python-shell-send-region
|
||||
my-run-code-interpreter "python"))
|
||||
|
||||
;; Interferes with smartparens
|
||||
(bind python-mode-map (kbd "DEL") nil)
|
||||
(bind 'motion python-mode-map "gd" 'jedi:goto-definition)
|
||||
|
||||
(use-package jedi
|
||||
:config
|
||||
(progn
|
||||
(unless (file-directory-p python-environment-directory)
|
||||
(jedi:install-server))
|
||||
(add-hook 'python-mode-hook 'jedi:ac-setup)))
|
||||
|
||||
(use-package nose
|
||||
:commands (nose-mode)
|
||||
:init
|
||||
(progn
|
||||
;; Reset nose keymap, we'll set new ones in my-keymaps.el
|
||||
(defvar nose-mode-map (make-sparse-keymap))
|
||||
(associate-minor-mode "/test_.+\\.py\\'" nose-mode)))))
|
||||
(associate-minor-mode "/test_.+\\.py\\'" nose-mode))
|
||||
:config
|
||||
(bind 'normal nose-mode-map
|
||||
",tr" 'nosetests-again
|
||||
",ta" 'nosetests-all
|
||||
",ts" 'nosetests-one
|
||||
",tv" 'nosetests-module
|
||||
",tA" 'nosetests-pdb-all
|
||||
",tO" 'nosetests-pdb-one
|
||||
",tV" 'nosetests-pdb-module))))
|
||||
|
Reference in New Issue
Block a user