parent
d54462fe6d
commit
6f8b83b884
2 changed files with 14 additions and 10 deletions
|
@ -230,7 +230,20 @@
|
||||||
(sp-local-pair "{-@" "@-}" :actions :rem)
|
(sp-local-pair "{-@" "@-}" :actions :rem)
|
||||||
(sp-local-pair "{-" "-")
|
(sp-local-pair "{-" "-")
|
||||||
(sp-local-pair "{-#" "#-")
|
(sp-local-pair "{-#" "#-")
|
||||||
(sp-local-pair "{-@" "@-")))))
|
(sp-local-pair "{-@" "@-")))
|
||||||
|
|
||||||
|
(after! smartparens-python
|
||||||
|
(sp-with-modes 'python-mode
|
||||||
|
;; Automatically close f-strings
|
||||||
|
(sp-local-pair "f\"" "\"")
|
||||||
|
(sp-local-pair "f\"\"\"" "\"\"\"")
|
||||||
|
(sp-local-pair "f'''" "'''")
|
||||||
|
(sp-local-pair "f'" "'"))
|
||||||
|
;; Original keybind interferes with smartparens rules
|
||||||
|
(define-key python-mode-map (kbd "DEL") nil)
|
||||||
|
;; Interferes with the def snippet in doom-snippets
|
||||||
|
;; TODO Fix this upstream, in doom-snippets, instead
|
||||||
|
(setq sp-python-insert-colon-in-function-definitions nil))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -78,15 +78,6 @@
|
||||||
(setq-local flycheck-python-pylint-executable "pylint")
|
(setq-local flycheck-python-pylint-executable "pylint")
|
||||||
(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
|
|
||||||
;; Automatically close f-strings
|
|
||||||
(sp-with-modes 'python-mode
|
|
||||||
(sp-local-pair "f\"" "\"")
|
|
||||||
(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)
|
||||||
(advice-add #'pythonic-activate :after-while #'+modeline-update-env-in-all-windows-h)
|
(advice-add #'pythonic-activate :after-while #'+modeline-update-env-in-all-windows-h)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue