From 11f8eef8a5f13f4ed809ec252c96b4ab0a0abbb5 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Mon, 29 Jul 2024 12:41:05 -0400 Subject: [PATCH] fix emacs config --- emacs.d/init.el | 6 +++++- emacs.d/layers/rust/init.el | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.d/init.el b/emacs.d/init.el index 9c67d9f..4ce04b9 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -301,7 +301,9 @@ ;; (forge--format repo "https://%h/%o/%n/blob/%r/%f%L" ;; `((?r . ,rev) (?f . ,file) (?L . ,highlight)))))) - + (add-hook 'before-save-hook + 'whitespace-cleanup) + (use-package lsp-mode :config (setq lsp-enable-file-watchers nil) @@ -323,7 +325,9 @@ (setq read-process-output-max (* 1024 1024)) ;; 1MB (setq lsp-idle-delay 0.5) :hook ((rust-mode . lsp) + (rust-ts-mode . lsp) (python-mode . lsp) + (python-ts-mode . lsp) (lsp-mode . lsp-enable-which-key-integration)) :commands lsp) diff --git a/emacs.d/layers/rust/init.el b/emacs.d/layers/rust/init.el index 0d00807..75cc3f7 100644 --- a/emacs.d/layers/rust/init.el +++ b/emacs.d/layers/rust/init.el @@ -1,7 +1,5 @@ (use-package rust-mode - :defer t - :diminish rust-mode + :diminish rust-ts-mode :ensure t - :mode (("\\.rs\\'" . rust-mode)) :init (setq rust-format-on-save t))