]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
remove post and old sql-indent; load sql-indent
[lib.git] / emacs_el / configuration / don-configuration.org
index 50fbec086a22ac157e96757f6998f540e5a2af23..d256be851bae8c4b1327869d9b9560df0d0f1f87 100644 (file)
@@ -79,7 +79,9 @@ load  [[https://github.com/jwiegley/use-package/][use-package]] even faster
   (use-package paradox
     :ensure paradox
     :commands (paradox-upgrade-packages paradox-list-packages)
-    :config (setq paradox-execute-asynchronously t)
+    :config
+    (setq paradox-execute-asynchronously t)
+    (setq paradox-github-token t) ; I don't want to be prompted about this integration
     )
 #+END_SRC
 * Paths
@@ -679,10 +681,12 @@ value, scrolling continues until there is no more output.
 ** SQL mode
 #+BEGIN_SRC emacs-lisp
   ; load sql-indent when sql is loaded
+(use-package sql-indent
+  :hook sql-mode
+  )
 (use-package sql
   :mode (("\\.sql\\'" . sql-mode))
-  :config
-  (require sql-indent))
+  )
 #+END_SRC
 ** Ediff
 #+BEGIN_SRC emacs-lisp
@@ -1392,13 +1396,60 @@ 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
+    :demand t
+    :after python)
+#+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
 #+BEGIN_SRC emacs-lisp
 (use-package go-mode
@@ -1755,7 +1806,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     (interactive)
     (save-excursion
       (org-back-to-heading 'invisible-ok)
-      (hide-other)
+      (outline-hide-other)
       (org-cycle)
       (org-cycle)
       (org-cycle)))
@@ -2564,11 +2615,26 @@ same directory as the org-buffer and insert a link to this file."
   (show-paren-mode 1)
   (setq show-paren-delay 0.2)
 
+#+END_SRC
+** My Username
+#+BEGIN_SRC emacs-lisp
   (setq user-mail-address "don@donarmstrong.com")
 
+#+END_SRC
+** Use primary selection on unix machines
+#+BEGIN_SRC emacs-lisp
   ;; switch back to the old primary selection method
-  (setq x-select-enable-clipboard nil)
-  (setq x-select-enable-primary t)
+  (if (or (string-equal system-type "darwin")
+          (string-equal system-type "windows")
+          )
+      (progn
+        (setq x-select-enable-clipboard t)
+        (setq x-select-enable-primary nil)
+        )
+    (progn
+      (setq x-select-enable-clipboard nil)
+      (setq x-select-enable-primary t)
+      ))
   ; (setq mouse-drag-copy-region t)
 
   (fset 'perl-mode 'cperl-mode)