spacemacs/init-extension/init-pymacs.el

27 lines
932 B
EmacsLisp
Raw Normal View History

2012-12-27 20:50:48 +00:00
(setq ropemacs-global-prefix "C-x /") ;; avoid conflict with p4 global prefix
(require 'pymacs)
2013-01-06 07:38:25 +00:00
2012-12-27 20:50:48 +00:00
(defun setup-ropemacs ()
(pymacs-load "ropemacs" "rope-")
;; Stops from erroring if there's a syntax err
(setq ropemacs-codeassist-maxfixes 3)
;; Configurations
(setq ropemacs-guess-project t)
(setq ropemacs-enable-autoimport t)
(setq ropemacs-autoimport-modules '("os" "shutil" "sys" "logging"))
;; Adding hook to automatically open a rope project if there is one
;; in the current or in the upper level directory
2013-01-06 07:38:25 +00:00
(add-hook 'python-mode-hook
(lambda ()
(cond ((file-exists-p ".ropeproject")
(rope-open-project default-directory))
((file-exists-p "../.ropeproject")
(rope-open-project (concat default-directory "..")))
))))
2012-12-27 20:50:48 +00:00
2013-01-06 07:38:25 +00:00
;; Ropemacs Configuration
2012-12-27 20:50:48 +00:00
(eval-after-load 'python
'(progn
(setup-ropemacs)
2013-01-06 07:38:25 +00:00
))