Refactor lang/python (use :jump instead of keybinds)

This commit is contained in:
Henrik Lissner 2017-08-08 14:24:48 +02:00
parent 5e1ece4291
commit 7409890e78
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -12,7 +12,6 @@
(set! :repl 'python-mode #'+python/repl)
(set! :electric 'python-mode :chars '(?:))
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
(when (executable-find "ipython")
(setq python-shell-interpreter "ipython"
@ -25,6 +24,7 @@
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
(sp-with-modes 'python-mode
(sp-local-pair "'" nil :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p))))
@ -50,9 +50,11 @@
:after anaconda-mode
:config
(set! :company-backend 'python-mode '(company-anaconda))
(set! :jump 'python-mode
:definition #'anaconda-mode-find-definitions
:references #'anaconda-mode-find-referenences
:documentation #'anaconda-mode-show-doc)
(map! :map python-mode-map
:m "gd" #'anaconda-mode-find-definitions
:m "gD" #'anaconda-mode-find-references
:localleader
:prefix "f"
:nv "d" #'anaconda-mode-find-definitions