aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-02-04 16:46:28 -0800
committerGravatar Tom Willemse2019-02-04 16:46:28 -0800
commitcf5fcd454bec15e042e820bc9b07209a20cffad7 (patch)
tree0bfef5315305eaf945e0fa72e7d1251b5f77cc8e
parent45e234a65a7801cc28aac2878a992c0fc4d61933 (diff)
downloademacs-config-cf5fcd454bec15e042e820bc9b07209a20cffad7.tar.gz
emacs-config-cf5fcd454bec15e042e820bc9b07209a20cffad7.zip
Add traad to Python configuration
traad is a Python refactoring library.
-rw-r--r--oni-python.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/oni-python.el b/oni-python.el
index 1981573..04f03ba 100644
--- a/oni-python.el
+++ b/oni-python.el
@@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 20190201140623
-;; Package-Requires: (company-jedi fill-column-indicator flycheck rainbow-delimiters reformatter)
+;; Version: 20190204164453
+;; Package-Requires: (company-jedi fill-column-indicator flycheck rainbow-delimiters reformatter traad hydra)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -35,6 +35,8 @@
;;; Code:
(require 'company)
+(require 'hydra)
+(require 'python)
(require 'reformatter)
(require 'whitespace)
@@ -62,6 +64,11 @@ for indentation."
:lighter ""
:group 'python-black)
+(defhydra python-refactor-hydra (:color blue)
+ ("r" traad-rename "Rename object"))
+
+(define-key python-mode-map (kbd "C-c r") 'python-refactor-hydra/body)
+
(add-hook 'python-mode-hook 'electric-indent-local-mode)
(add-hook 'python-mode-hook 'electric-pair-local-mode)
(add-hook 'python-mode-hook 'flycheck-mode)