From: Don Armstrong Date: Wed, 17 Nov 2021 20:13:23 +0000 (-0800) Subject: use python-mode and enable all of the submodes, including blacken X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=69c329fb9a4240da72bb3f4527a45b080e1aa385;hp=2d22a843308e6d141adec15ff6516057cdf8102b;p=lib.git use python-mode and enable all of the submodes, including blacken --- diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index a71ad33..a48e0b7 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -1394,12 +1394,40 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori ** Python Programming #+BEGIN_SRC emacs-lisp + (use-package python-mode + :hook + (python-mode . pyenv-mode) + (python-mode . flycheck-mode) + (python-mode . company-mode) + (python-mode . blacken-mode) + (python-mode . yas-minor-mode) + ) + (use-package pyenv + :ensure t + ) + (use-package blacken + :init + (setq-default blacken-fast-unsafe t) + (setq-default blacken-line-length 80) + :ensure t) + + (use-package elpy :ensure t :init (elpy-enable) ) #+END_SRC +*** Jedi +#+BEGIN_SRC emacs-lisp + (use-package company-jedi + :ensure t + :hook (python-mode . (add-to-list 'company-backends 'company-jedi)) + :hook (python-mode . 'jedi:setup) + :config + (setq jedi:complete-on-dot t) + ) +#+END_SRC *** Black #+begin_src emacs-lisp :tangle yes (use-package python-black @@ -1408,10 +1436,16 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori #+end_src *** Sphinx Documentation #+begin_src emacs-lisp :tangle yes + (use-package numpydoc + :ensure t + :after python + :bind (:map python-mode-map + ("C-c C-n" . numpydoc-generate))) (use-package sphinx-doc :ensure t :config (sphinx-doc-mode t) + (setq sphinx-doc-include-types t) :after python) #+end_src ** Go language