diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 22f81f2..13fe99c 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -58,7 +58,7 @@ '(org-odd-levels-only t) '(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))) '(package-selected-packages - '(color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky)) + '(python-mode color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky)) '(reb-re-syntax 'string) '(rmail-mail-new-frame t) '(safe-local-variable-values diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b36b952..8b363ec 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -702,12 +702,6 @@ ;; ================================================================= ;; Python Support ;; ================================================================= -(autoload 'python-mode "python-mode" "Python editing mode." t) -(autoload 'blacken-mode "blacken" "Automatically run black before saving." t) - -(add-to-list 'auto-mode-alist '("\\.py$" . python-mode)) -(add-to-list 'interpreter-mode-alist '("python" . python-mode)) - (defun my-python-mode-hook () "My hook for `python-mode`." (when is-fb-environment @@ -716,9 +710,15 @@ (string-match-p "TARGETS" (buffer-file-name))) (blacken-mode))) -(add-hook 'python-mode-hook 'my-python-mode-hook) +(use-package python-mode :ensure + :mode "\\.py\\'" + :config + (add-to-list 'interpreter-mode-alist '("python" . python-mode)) + (add-hook 'python-mode-hook 'my-python-mode-hook)) +(autoload 'blacken-mode "blacken" "Automatically run black before saving." t) + ;; ================================================================= ;; JavaScript Support