From 2ffa99b85604963541113c896af65aa0870ee5e3 Mon Sep 17 00:00:00 2001 From: Rawley <75388349+rawleyfowler@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:19:02 -0600 Subject: [PATCH] Change emacs auto save dir --- debian/home/.emacs | 51 +++++++--------------------------------------- 1 file changed, 7 insertions(+), 44 deletions(-) diff --git a/debian/home/.emacs b/debian/home/.emacs index 8cfb049..5495c0c 100644 --- a/debian/home/.emacs +++ b/debian/home/.emacs @@ -5,6 +5,13 @@ ;;; Code: (add-to-list 'default-frame-alist '(font . "monospace-14")) +(unless (file-exists-p "~/.auto-save") + (make-directory "~/.auto-save")) +(defvar autosave-dir (concat "~/.auto-save" "/")) ; Auto save path +(make-directory autosave-dir t) +(setq auto-save-file-name-transforms + `(("\\(?:[^/]*/\\)*\\(.*\\)" ,(concat autosave-dir "\\1") t))) + (setq package-enable-at-startup nil) (setq visible-bell nil) (setq ring-bell-function 'ignore) @@ -94,50 +101,6 @@ (use-package flycheck :init (global-flycheck-mode)) -(use-package lsp-mode - ;; Optional - enable lsp-mode automatically in scala files - ;; You could also swap out lsp for lsp-deffered in order to defer loading - :hook (scala-mode . lsp) - (lsp-mode . lsp-lens-mode) - :config - ;; Uncomment following section if you would like to tune lsp-mode performance according to - ;; https://emacs-lsp.github.io/lsp-mode/page/performance/ - ;; (setq gc-cons-threshold 100000000) ;; 100mb - ;; (setq read-process-output-max (* 1024 1024)) ;; 1mb - ;; (setq lsp-idle-delay 0.500) - ;; (setq lsp-log-io nil) - ;; (setq lsp-completion-provider :capf) - (setq lsp-prefer-flymake nil)) - -;; Add metals backend for lsp-mode -(use-package lsp-metals) - -;; Enable nice rendering of documentation on hover -;; Warning: on some systems this package can reduce your emacs responsiveness significally. -;; (See: https://emacs-lsp.github.io/lsp-mode/page/performance/) -;; In that case you have to not only disable this but also remove from the packages since -;; lsp-mode can activate it automatically. -(use-package lsp-ui) - -;; Use company-capf as a completion provider. -;; -;; To Company-lsp users: -;; Company-lsp is no longer maintained and has been removed from MELPA. -;; Please migrate to company-capf. -(use-package company - :hook (scala-mode . company-mode) - :config - (setq lsp-completion-provider :capf)) - -;; Posframe is a pop-up tool that must be manually installed for dap-mode -(use-package posframe) - -;; Use the Debug Adapter Protocol for running tests and debugging -(use-package dap-mode - :hook - (lsp-mode . dap-mode) - (lsp-mode . dap-ui-mode)) - ;;;; OCaml/Reason (use-package tuareg) (use-package utop