diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 4d6ffe8..7d1dcca 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 - '(nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm 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 color-theme-sanityinc-tomorrow)) + '(lsp-pyright blacken nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm 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 color-theme-sanityinc-tomorrow)) '(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 c2ce388..56c9c76 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -728,7 +728,14 @@ Or, uh, Objective C, I guess." (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) +(use-package blacken :ensure + :commands (blacken-mode) + :hook (python-mode . blacken-mode)) + +(use-package lsp-pyright :ensure + :hook (python-mode . (lambda () + (require 'lsp-pyright) + (lsp)))) ; or lsp-deferred ;; ================================================================= ;; Bazel Support diff --git a/install.sh b/install.sh index a9d6cc5..f3e2acb 100755 --- a/install.sh +++ b/install.sh @@ -24,3 +24,7 @@ sudo chsh -s /usr/bin/fish $USER # Make sure that the gitconfig that's on my computer links to my shared # config. git config --global include.path .gitconfig.shared + +# Install blacken and prettier +pip3 install --index-url=https://pypi.org/simple black +npm install -g prettier