From ecc5bc4f5da2106d95871e8a9c5ac5c6e6440a3d Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 23 Jun 2023 14:11:44 +0200 Subject: [PATCH] emacs: Disable prettier-global-mode and enable only for web stuff --- home-manager/modules/emacs/config.org | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/home-manager/modules/emacs/config.org b/home-manager/modules/emacs/config.org index 8d3f894..61c909d 100644 --- a/home-manager/modules/emacs/config.org +++ b/home-manager/modules/emacs/config.org @@ -1090,9 +1090,9 @@ Indent 2 spaces Prettier has my preference for formatting JavaScript and TypeScript #+begin_src emacs-lisp - (use-package prettier - :config - (global-prettier-mode)) + (use-package prettier + :config + (setq prettier-enabled-parsers (css html json markdown scss svelte toml typescript vue))) #+end_src TypeScript stuff @@ -1541,8 +1541,10 @@ Python #+end_src #+begin_src emacs-lisp - (add-hook 'python-mode-hook 'eglot-ensure) - (add-hook 'python-ts-mode-hook 'eglot-ensure) + (use-package python + :ensure nil + :hook (python-base-mode . eglot-ensure) + :init (setq python-indent-guess-indent-offset nil)) #+end_src