Update emacs config.
This commit is contained in:
parent
2b3b9af70b
commit
9d16c7bd7b
@ -14,17 +14,6 @@
|
||||
|
||||
;; Other packages
|
||||
|
||||
(use-package emacs
|
||||
:config
|
||||
(setq enable-recursive-minibuffers t)
|
||||
|
||||
;; Filter the M-x list base on the current mode
|
||||
(setq read-extended-command-predicate #'command-completion-default-include-p)
|
||||
|
||||
;; Enable triggering completion with the tab key.
|
||||
(setq tab-always-indent 'complete)
|
||||
)
|
||||
|
||||
(use-package dashboard
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
@ -24,11 +24,51 @@
|
||||
(setq autoload-directory (concat user-emacs-directory (file-name-as-directory "elisp") (file-name-as-directory "autoload")))
|
||||
(add-to-list 'load-path (assert-directory autoload-directory))
|
||||
|
||||
(use-package emacs
|
||||
:ensure nil
|
||||
:bind
|
||||
(("C-z" . nil)
|
||||
("C-x C-z" . nil)
|
||||
("RET" . newline-and-indent)
|
||||
)
|
||||
:custom
|
||||
;; Replace highlighted text if you start typing.
|
||||
(delete-selection-mode 1)
|
||||
|
||||
(history-length 300)
|
||||
|
||||
;; Enable auto-revert for buffers like dired
|
||||
(global-auto-revert-non-file-buffers t)
|
||||
|
||||
;; If the underlying file changes, reload it automatically. This is useful for moving around in git without confusing language servers.
|
||||
(auto-revert-avoid-polling t)
|
||||
(auto-revert-interval 5)
|
||||
(auto-revert-check-vc-info t)
|
||||
(global-auto-revert-mode t)
|
||||
|
||||
;; Disable backup files and lockfiles
|
||||
(create-lockfiles nil)
|
||||
(make-backup-files nil)
|
||||
(backup-inhibited t)
|
||||
|
||||
;; Do not auto-save files
|
||||
(auto-save-default nil)
|
||||
|
||||
(pixel-scroll-precision-mode t)
|
||||
(pixel-scroll-precision-use-momentum nil)
|
||||
|
||||
:config
|
||||
(setq enable-recursive-minibuffers t)
|
||||
|
||||
;; Filter the M-x list base on the current mode
|
||||
(setq read-extended-command-predicate #'command-completion-default-include-p)
|
||||
|
||||
;; Enable triggering completion with the tab key.
|
||||
(setq tab-always-indent 'complete)
|
||||
|
||||
)
|
||||
|
||||
(setq-default
|
||||
;; Disable backup files and lockfiles
|
||||
make-backup-files nil
|
||||
auto-save-default nil
|
||||
create-lockfiles nil
|
||||
;; Unless otherwise specified, always install packages if they are absent.
|
||||
use-package-always-ensure t
|
||||
;; Point custom-file at /dev/null so emacs does not write any settings to my dotfiles.
|
||||
@ -80,12 +120,6 @@
|
||||
;; Delete trailing whitespace before save
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||
|
||||
;; If the underlying file changes, reload it automatically. This is useful for moving around in git without confusing language servers.
|
||||
(setopt auto-revert-avoid-polling t)
|
||||
(setopt auto-revert-interval 5)
|
||||
(setopt auto-revert-check-vc-info t)
|
||||
(global-auto-revert-mode)
|
||||
|
||||
;;;;; Performance
|
||||
;; Run garbage collect when emacs is idle
|
||||
(run-with-idle-timer 5 t (lambda () (garbage-collect)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user