refactoring and updates
This commit is contained in:
parent
ad9acea3b0
commit
59fc2f2d9c
3 changed files with 114 additions and 31 deletions
34
tramp.el
Normal file
34
tramp.el
Normal file
|
@ -0,0 +1,34 @@
|
|||
;;; tramp.el -*- lexical-binding: t; -*-
|
||||
|
||||
|
||||
(use-package! tramp
|
||||
:defer t
|
||||
:config
|
||||
;; To “turn off” the backup feature for remote files and stop TRAMP from saving to the backup directory.
|
||||
;; See https://www.gnu.org/software/tramp/#Auto_002dsave-File-Lock-and-Backup
|
||||
(add-to-list 'backup-directory-alist
|
||||
(cons tramp-file-name-regexp nil))
|
||||
(customize-set-variable 'tramp-backup-directory-alist backup-directory-alist)
|
||||
(setq backup-enable-predicate
|
||||
(lambda (name) nil)))
|
||||
|
||||
|
||||
;;;; TRAMP optimizations
|
||||
(after! tramp
|
||||
(setq tramp-default-method "ssh" ; Use SSH by default
|
||||
tramp-verbose 1 ; Reduce verbosity
|
||||
tramp-use-ssh-controlmaster-options nil ; Don't use control master
|
||||
tramp-chunksize 500 ; Bigger chunks for better performance
|
||||
tramp-connection-timeout 10 ; Shorter timeout
|
||||
;; Use SSH configuration
|
||||
tramp-use-ssh-controlmaster-options nil
|
||||
;; Cache remote files
|
||||
remote-file-name-inhibit-cache nil
|
||||
;; Enable file-name-handler cache
|
||||
tramp-cache-read-persistent-data t))
|
||||
|
||||
;; Additional performance settings
|
||||
(setq vc-ignore-dir-regexp
|
||||
(format "%s\\|%s"
|
||||
vc-ignore-dir-regexp
|
||||
tramp-file-name-regexp))
|
Loading…
Add table
Add a link
Reference in a new issue