General cleanup
This commit is contained in:
parent
7bf28b5ad5
commit
ca9f76bfa6
6 changed files with 49 additions and 50 deletions
|
@ -8,36 +8,17 @@
|
|||
(define-docset! python-mode "py,py3,python")
|
||||
(add-hook! python-mode '(emr-initialize narf|flycheck-enable-maybe))
|
||||
(setq-default
|
||||
python-indent-offset 4
|
||||
python-environment-directory narf-temp-dir
|
||||
python-shell-interpreter "ipython")
|
||||
:config
|
||||
(define-env-command! python-mode "python --version 2>&1 | cut -d' ' -f2")
|
||||
(define-repl! python-mode narf-inf-python)
|
||||
|
||||
(defun narf-inf-python ()
|
||||
(run-python python-shell-interpreter t t))
|
||||
(define-repl! python-mode narf/inf-python)
|
||||
|
||||
;; interferes with smartparens
|
||||
(define-key python-mode-map (kbd "DEL") nil)
|
||||
|
||||
(use-package nose
|
||||
:commands nose-mode
|
||||
:preface (defvar nose-mode-map (make-sparse-keymap))
|
||||
:init
|
||||
(associate! nose-mode :match "/test_.+\\.py\\'")
|
||||
:config
|
||||
(map! :map nose-mode-map
|
||||
(:localleader
|
||||
:n "tr" 'nosetests-again
|
||||
:n "ta" 'nosetests-all
|
||||
:n "ts" 'nosetests-one
|
||||
:n "tv" 'nosetests-module
|
||||
:n "tA" 'nosetests-pdb-all
|
||||
:n "tO" 'nosetests-pdb-one
|
||||
:n "tV" 'nosetests-pdb-module)))
|
||||
|
||||
(use-package anaconda-mode
|
||||
:defer t
|
||||
:defines (anaconda-mode-map anaconda-nav-mode-map)
|
||||
:functions (anaconda-mode-running-p)
|
||||
:init
|
||||
|
@ -63,12 +44,28 @@
|
|||
(not (use-region-p))
|
||||
(not (sp-point-in-string-or-comment)))))
|
||||
(emr-declare-command (intern (format "anaconda-mode-%s" (symbol-name command-name)))
|
||||
:title title :modes 'python-mode :predicate predicate)))
|
||||
:title title :modes 'python-mode :predicate predicate)))
|
||||
'((show-doc "view documentation" t)
|
||||
(find-assignments "find assignments" t)
|
||||
(find-definitions "find definitions" t)
|
||||
(find-file "find assignments" t)
|
||||
(find-references "show usages" nil))))))
|
||||
|
||||
(use-package nose
|
||||
:commands nose-mode
|
||||
:preface (defvar nose-mode-map (make-sparse-keymap))
|
||||
:init
|
||||
(associate! nose-mode :match "/test_.+\\.py\\'")
|
||||
:config
|
||||
(map! :map nose-mode-map
|
||||
(:localleader
|
||||
:n "tr" 'nosetests-again
|
||||
:n "ta" 'nosetests-all
|
||||
:n "ts" 'nosetests-one
|
||||
:n "tv" 'nosetests-module
|
||||
:n "tA" 'nosetests-pdb-all
|
||||
:n "tO" 'nosetests-pdb-one
|
||||
:n "tV" 'nosetests-pdb-module)))
|
||||
|
||||
(provide 'module-python)
|
||||
;;; module-python.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue