diff options
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r-- | .emacs.d/lisp/init-dired.el | 2 | ||||
-rw-r--r-- | .emacs.d/lisp/init-editor.el | 28 | ||||
-rw-r--r-- | .emacs.d/lisp/init-emacs-lisp.el | 4 | ||||
-rw-r--r-- | .emacs.d/lisp/init-kill.el | 1 | ||||
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 2 | ||||
-rw-r--r-- | .emacs.d/lisp/init-search.el | 1 | ||||
-rw-r--r-- | .emacs.d/lisp/init-ui.el | 19 |
7 files changed, 45 insertions, 12 deletions
diff --git a/.emacs.d/lisp/init-dired.el b/.emacs.d/lisp/init-dired.el index 5ec6531..6a6f821 100644 --- a/.emacs.d/lisp/init-dired.el +++ b/.emacs.d/lisp/init-dired.el @@ -13,6 +13,8 @@ (dired-kill-when-opening-new-dired-buffer t) (wdired-use-dired-vertical-movement 'sometimes) (dired-vc-rename-file t) + (dired-clean-confirm-killing-deleted-buffers nil) + (dired-create-destination-dirs 'ask) :bind (:map dired-mode-map ("M-o" . dired-omit-mode) ("E" . wdired-change-to-wdired-mode))) diff --git a/.emacs.d/lisp/init-editor.el b/.emacs.d/lisp/init-editor.el index 4f5a437..4d4c9b3 100644 --- a/.emacs.d/lisp/init-editor.el +++ b/.emacs.d/lisp/init-editor.el @@ -33,14 +33,24 @@ (setq comment-auto-fill-only-comments t) (setq large-file-warning-threshold 100000000) (setq create-lockfiles nil) - (setq global-auto-revert-non-file-buffers t) - (setq backup-by-copying t) + (setq global-auto-revert-non-file-buffers t + revert-without-query (list ".") + auto-revert-stop-on-user-input nil) + (setq backup-by-copying t + delete-old-versions t + version-control t + kept-new-versions 5 + kept-old-versions 5) (setq backup-directory-alist `((".*" . ,temporary-file-directory)) auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) + `((".*" ,temporary-file-directory t)) + auto-save-include-big-deletions t) + (setq comment-multi-line t + comment-empty-lines t) - (setq save-place-file (expand-file-name "saveplace" save-dir)) + (setq save-place-file (expand-file-name "saveplace" save-dir) + save-place-limit 800) ;; https://git.sr.ht/~technomancy/better-defaults/tree/master/item/better-defaults.el (setq save-interprogram-paste-before-kill t apropos-do-all t @@ -50,11 +60,12 @@ (setq ffap-machine-p-local 'accept ffap-machine-p-known 'reject ffap-machine-p-unkown 'reject) - ;; https://github.com/natecox/dotfiles/blob/master/workspaces/shared/symlinks/emacs/.emacs.d/nathancox.org + (setq sentence-end-double-space nil) - (set-charset-priority 'unicode) - (setq locale-coding-system 'utf-8) - (setq default-process-coding-system '(utf-8-unix . utf-8-unix)) + (set-language-environment "UTF-8") + ;; TODO is this needed? (See https://github.com/jamescherti/minimal-emacs.d) + ;; (setq default-input-method nil) + (set-default 'imenu-auto-rescan t)) (use-package move-text @@ -72,6 +83,7 @@ (savehist-additional-variables '(search-ring regexp-search-ring)) (savehist-autosave-interval 60) (savehist-file (expand-file-name "savehist" save-dir)) + (history-length 300) :hook (elpaca-after-init . savehist-mode)) (use-package super-save diff --git a/.emacs.d/lisp/init-emacs-lisp.el b/.emacs.d/lisp/init-emacs-lisp.el index 4ca010a..e32ee31 100644 --- a/.emacs.d/lisp/init-emacs-lisp.el +++ b/.emacs.d/lisp/init-emacs-lisp.el @@ -10,6 +10,10 @@ :diminish) (use-feature emacs + :custom + ;; These don't really belong here, but do affect ielm + (comint-prompt-read-only t) + (comint-buffer-maximum-size 2048) :config ;; Based on prelude-emacs-lisp.el (defun recompile-init-lisp () diff --git a/.emacs.d/lisp/init-kill.el b/.emacs.d/lisp/init-kill.el index 37103e3..d72f776 100644 --- a/.emacs.d/lisp/init-kill.el +++ b/.emacs.d/lisp/init-kill.el @@ -16,6 +16,7 @@ (:map easy-kill-base-map ("C-=" . easy-kill-expand))) (use-feature emacs + :custom (kill-do-not-save-duplicates t) :hook (elpaca-after-init . (lambda () ;; Based on code in prelude-editor.el diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index 3094654..2ae4944 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -12,7 +12,7 @@ :config ;; Do not allow the cursor in the minibuffer prompt (setq minibuffer-prompt-properties - '(read-only t cursor-intangible t face minibuffer-prompt)) + '(read-only t cursor-intangible t intangible t face minibuffer-prompt)) (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) (setq enable-recursive-minibuffers t) (minibuffer-depth-indicate-mode t) diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el index f471d0e..b42e49f 100644 --- a/.emacs.d/lisp/init-search.el +++ b/.emacs.d/lisp/init-search.el @@ -112,6 +112,7 @@ (isearch-lazy-count t) (lazy-count-prefix-format nil) (lazy-count-suffix-format " (%s/%s)") + (lazy-highlight-initial-delay 0) (isearch-message-properties '(read-only t cursor-intangible t face isearch-prompt)) :bind-keymap ("C-c s" . search-map) ;; M-s clashes with paredit/smartparens bindings :bind diff --git a/.emacs.d/lisp/init-ui.el b/.emacs.d/lisp/init-ui.el index 1cfde4f..e3b94fd 100644 --- a/.emacs.d/lisp/init-ui.el +++ b/.emacs.d/lisp/init-ui.el @@ -47,6 +47,7 @@ (define-key view-mode-map (kbd "p") 'scroll-down-command) (define-key view-mode-map (kbd "n") 'scroll-up-command))))) :config + (setq-default display-line-numbers-widen t) ;; https://github.com/rougier/elegant-emacs/blob/master/sanity.el (setq inhibit-startup-screen t inhibit-startup-echo-area-message t @@ -65,13 +66,22 @@ (run-with-timer 0.05 nil 'invert-face 'mode-line)) visible-bell t) - ;; TODO do we want these? (copied from prelude) + ;; A combination of settings from prelude and minimal-emacs.d, may need tweaking (setq scroll-margin 0 scroll-conservatively 100000 - scroll-preserve-screen-position 1) + scroll-preserve-screen-position 1 + hscroll-margin 2 + hscroll-step 1 + auto-window-vscroll nil) (setq pixel-scroll-precision-mode t) + (setq-default word-wrap t + truncate-lines t + fill-column 80) + ;; If enabled and `truncate-lines' is disabled, soft wrapping will not occur + ;; when the window is narrower than `truncate-partial-width-windows' characters. + (setq truncate-partial-width-windows nil) - (fset 'yes-or-no-p 'y-or-n-p) + (setq use-short-answers t) (setq frame-title-format '("Emacs: " (:eval (if (buffer-file-name) @@ -134,6 +144,9 @@ :hook (prog-mode . idle-highlight-mode)) (use-feature paren + :custom + (show-paren-when-point-inside-paren t) + (show-paren-when-point-in-periphery t) :config (show-paren-mode +1)) |