tweak(python): update smartparens config
- Automatically close f-strings - Don't insert trailing colons in function definitions
This commit is contained in:
parent
86901cca7d
commit
41cbb1fe7b
1 changed files with 7 additions and 4 deletions
|
@ -79,10 +79,13 @@
|
||||||
(setq-local flycheck-python-flake8-executable "flake8"))))
|
(setq-local flycheck-python-flake8-executable "flake8"))))
|
||||||
|
|
||||||
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
||||||
(sp-local-pair 'python-mode "'" nil
|
;; Automatically close f-strings
|
||||||
:unless '(sp-point-before-word-p
|
(sp-with-modes 'python-mode
|
||||||
sp-point-after-word-p
|
(sp-local-pair "f\"" "\"")
|
||||||
sp-point-before-same-p))
|
(sp-local-pair "f\"\"\"" "\"\"\"")
|
||||||
|
(sp-local-pair "f'''" "'''")
|
||||||
|
(sp-local-pair "f'" "'"))
|
||||||
|
(setq sp-python-insert-colon-in-function-definitions nil) ; interferes with snippet
|
||||||
|
|
||||||
;; Affects pyenv and conda
|
;; Affects pyenv and conda
|
||||||
(when (featurep! :ui modeline)
|
(when (featurep! :ui modeline)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue