Refactor lang/python (use :jump instead of keybinds)
This commit is contained in:
parent
5e1ece4291
commit
7409890e78
1 changed files with 5 additions and 3 deletions
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
(set! :repl 'python-mode #'+python/repl)
|
(set! :repl 'python-mode #'+python/repl)
|
||||||
(set! :electric 'python-mode :chars '(?:))
|
(set! :electric 'python-mode :chars '(?:))
|
||||||
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
|
||||||
|
|
||||||
(when (executable-find "ipython")
|
(when (executable-find "ipython")
|
||||||
(setq python-shell-interpreter "ipython"
|
(setq python-shell-interpreter "ipython"
|
||||||
|
@ -25,6 +24,7 @@
|
||||||
python-shell-completion-string-code
|
python-shell-completion-string-code
|
||||||
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
|
"';'.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-with-modes 'python-mode
|
||||||
(sp-local-pair "'" nil :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p))))
|
(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
|
:after anaconda-mode
|
||||||
:config
|
:config
|
||||||
(set! :company-backend 'python-mode '(company-anaconda))
|
(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
|
(map! :map python-mode-map
|
||||||
:m "gd" #'anaconda-mode-find-definitions
|
|
||||||
:m "gD" #'anaconda-mode-find-references
|
|
||||||
:localleader
|
:localleader
|
||||||
:prefix "f"
|
:prefix "f"
|
||||||
:nv "d" #'anaconda-mode-find-definitions
|
:nv "d" #'anaconda-mode-find-definitions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue