Move more packages from core configuration to more specific sections
Also generalize the “dired” section to a more general “file handling section”, as it already contained the configuration of `trashed` anyway.
This commit is contained in:
parent
491bcf5b26
commit
92d43a6306
148
init.el
148
init.el
|
@ -419,10 +419,6 @@
|
||||||
face minibuffer-prompt
|
face minibuffer-prompt
|
||||||
cursor-intangible t))
|
cursor-intangible t))
|
||||||
|
|
||||||
(setq suggest-key-bindings t
|
|
||||||
extended-command-suggest-shorter t
|
|
||||||
completions-detailed t)
|
|
||||||
|
|
||||||
;; Make M-v undo C-v
|
;; Make M-v undo C-v
|
||||||
(setq scroll-preserve-screen-position 'always)
|
(setq scroll-preserve-screen-position 'always)
|
||||||
|
|
||||||
|
@ -511,17 +507,6 @@
|
||||||
diary-show-holidays-flag t
|
diary-show-holidays-flag t
|
||||||
calendar-view-holidays-initially-flag nil))
|
calendar-view-holidays-initially-flag nil))
|
||||||
|
|
||||||
(use-package eww
|
|
||||||
:init (setq eww-bookmarks-directory
|
|
||||||
(expand-file-name "private/" emacs-d)))
|
|
||||||
|
|
||||||
(use-package ffap
|
|
||||||
;; Inhibit Emacs from pinging hostnames; see
|
|
||||||
;; https://www.n16f.net/blog/investigating-a-ffap-issue-in-emacs/
|
|
||||||
:init (setq ffap-machine-p-local 'accept
|
|
||||||
ffap-machine-p-known 'accept
|
|
||||||
ffap-machine-p-unknown 'reject))
|
|
||||||
|
|
||||||
(use-package grep
|
(use-package grep
|
||||||
:commands (rgrep zrgrep)
|
:commands (rgrep zrgrep)
|
||||||
:bind (:map grep-mode-map
|
:bind (:map grep-mode-map
|
||||||
|
@ -534,32 +519,11 @@
|
||||||
;; and replace it with something more straightforward.
|
;; and replace it with something more straightforward.
|
||||||
(advice-add 'grep-read-files :around #'db/grep-read-files)))
|
(advice-add 'grep-read-files :around #'db/grep-read-files)))
|
||||||
|
|
||||||
(use-package image
|
|
||||||
:init (setq image-use-external-converter t))
|
|
||||||
|
|
||||||
(use-package mailcap
|
|
||||||
:config (progn
|
|
||||||
;; Remove doc-view so pdf will open with default viewer
|
|
||||||
(setcdr
|
|
||||||
(assoc "application" mailcap-mime-data)
|
|
||||||
(remove '("pdf"
|
|
||||||
(viewer . doc-view-mode)
|
|
||||||
(type . "application/pdf")
|
|
||||||
(test eq window-system 'x))
|
|
||||||
(cdr (assoc "application" mailcap-mime-data))))))
|
|
||||||
|
|
||||||
(use-package project
|
|
||||||
:init (setq project-switch-commands 'project-dired))
|
|
||||||
|
|
||||||
(use-package quail
|
(use-package quail
|
||||||
:init (setq default-input-method "TeX")
|
:init (setq default-input-method "TeX")
|
||||||
:config (add-hook 'input-method-activate-hook
|
:config (add-hook 'input-method-activate-hook
|
||||||
#'db/add-symbols-to-TeX-input-method))
|
#'db/add-symbols-to-TeX-input-method))
|
||||||
|
|
||||||
(use-package re-builder
|
|
||||||
:commands (re-builder)
|
|
||||||
:init (setq reb-re-syntax 'string))
|
|
||||||
|
|
||||||
(use-package savehist
|
(use-package savehist
|
||||||
:commands (savehist-mode)
|
:commands (savehist-mode)
|
||||||
:init (setq savehist-file (expand-file-name "savehist" emacs-d)))
|
:init (setq savehist-file (expand-file-name "savehist" emacs-d)))
|
||||||
|
@ -568,13 +532,6 @@
|
||||||
:commands (server-running-p server-start)
|
:commands (server-running-p server-start)
|
||||||
:init (setq server-log t))
|
:init (setq server-log t))
|
||||||
|
|
||||||
(use-package shr
|
|
||||||
:init (setq shr-use-fonts nil
|
|
||||||
shr-use-colors nil
|
|
||||||
shr-max-image-proportion 0.7
|
|
||||||
shr-image-animate nil
|
|
||||||
shr-width (current-fill-column)))
|
|
||||||
|
|
||||||
(use-package tab-bar
|
(use-package tab-bar
|
||||||
:init (setq tab-bar-show t
|
:init (setq tab-bar-show t
|
||||||
tab-bar-format '(tab-bar-format-tabs
|
tab-bar-format '(tab-bar-format-tabs
|
||||||
|
@ -585,10 +542,6 @@
|
||||||
:config (progn
|
:config (progn
|
||||||
(tab-bar-history-mode +1)))
|
(tab-bar-history-mode +1)))
|
||||||
|
|
||||||
(use-package tramp
|
|
||||||
:init (setq tramp-default-method (if on-windows "pscp" "scp")
|
|
||||||
tramp-completion-use-auth-sources nil))
|
|
||||||
|
|
||||||
(use-package warnings
|
(use-package warnings
|
||||||
:config (cl-pushnew '(undo discard-info) warning-suppress-types
|
:config (cl-pushnew '(undo discard-info) warning-suppress-types
|
||||||
:test #'equal))
|
:test #'equal))
|
||||||
|
@ -2152,7 +2105,7 @@ The password is assumed to be stored at the PASSWORD property."
|
||||||
:init (setq smiley-style 'emoji))
|
:init (setq smiley-style 'emoji))
|
||||||
|
|
||||||
|
|
||||||
;; * Dired
|
;; * File Handling
|
||||||
|
|
||||||
(use-package dired
|
(use-package dired
|
||||||
:bind (:map dired-mode-map
|
:bind (:map dired-mode-map
|
||||||
|
@ -2267,13 +2220,6 @@ The password is assumed to be stored at the PASSWORD property."
|
||||||
dired-bind-info nil
|
dired-bind-info nil
|
||||||
dired-clean-up-buffers-too t))
|
dired-clean-up-buffers-too t))
|
||||||
|
|
||||||
(use-package dired-subtree
|
|
||||||
:commands (dired-subtree-toggle))
|
|
||||||
|
|
||||||
(use-package find-dired
|
|
||||||
:commands (find-dired)
|
|
||||||
:init (setq find-ls-option '("-print0 | xargs -0 ls -ld" . "-ld")))
|
|
||||||
|
|
||||||
(use-package dired-open
|
(use-package dired-open
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (progn
|
:init (progn
|
||||||
|
@ -2292,9 +2238,38 @@ The password is assumed to be stored at the PASSWORD property."
|
||||||
:commands (dired-recent-mode
|
:commands (dired-recent-mode
|
||||||
dired-recent-open))
|
dired-recent-open))
|
||||||
|
|
||||||
|
(use-package dired-subtree
|
||||||
|
:commands (dired-subtree-toggle))
|
||||||
|
|
||||||
|
(use-package ffap
|
||||||
|
;; Inhibit Emacs from pinging hostnames; see
|
||||||
|
;; https://www.n16f.net/blog/investigating-a-ffap-issue-in-emacs/
|
||||||
|
:init (setq ffap-machine-p-local 'accept
|
||||||
|
ffap-machine-p-known 'accept
|
||||||
|
ffap-machine-p-unknown 'reject))
|
||||||
|
|
||||||
|
(use-package find-dired
|
||||||
|
:commands (find-dired)
|
||||||
|
:init (setq find-ls-option '("-print0 | xargs -0 ls -ld" . "-ld")))
|
||||||
|
|
||||||
|
(use-package mailcap
|
||||||
|
:config (progn
|
||||||
|
;; Remove doc-view so pdf will open with default viewer
|
||||||
|
(setcdr
|
||||||
|
(assoc "application" mailcap-mime-data)
|
||||||
|
(remove '("pdf"
|
||||||
|
(viewer . doc-view-mode)
|
||||||
|
(type . "application/pdf")
|
||||||
|
(test eq window-system 'x))
|
||||||
|
(cdr (assoc "application" mailcap-mime-data))))))
|
||||||
|
|
||||||
(use-package gnus-dired
|
(use-package gnus-dired
|
||||||
:commands (turn-on-gnus-dired-mode))
|
:commands (turn-on-gnus-dired-mode))
|
||||||
|
|
||||||
|
(use-package tramp
|
||||||
|
:init (setq tramp-default-method (if on-windows "pscp" "scp")
|
||||||
|
tramp-completion-use-auth-sources nil))
|
||||||
|
|
||||||
(use-package trashed
|
(use-package trashed
|
||||||
;; A simple dired-like interface to the system trash bin
|
;; A simple dired-like interface to the system trash bin
|
||||||
;; Configuration taken from https://protesilaos.com/dotemacs
|
;; Configuration taken from https://protesilaos.com/dotemacs
|
||||||
|
@ -2306,6 +2281,10 @@ The password is assumed to be stored at the PASSWORD property."
|
||||||
|
|
||||||
;; * Completion
|
;; * Completion
|
||||||
|
|
||||||
|
(setq suggest-key-bindings t
|
||||||
|
extended-command-suggest-shorter t
|
||||||
|
completions-detailed t)
|
||||||
|
|
||||||
(use-package helm
|
(use-package helm
|
||||||
:ensure t
|
:ensure t
|
||||||
:diminish helm-mode
|
:diminish helm-mode
|
||||||
|
@ -2511,6 +2490,17 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
|
|
||||||
;; * Media
|
;; * Media
|
||||||
|
|
||||||
|
(use-package db-music
|
||||||
|
:init (setq db/auto-playlist-file-function
|
||||||
|
#'(lambda ()
|
||||||
|
(db/playlist-files-from-git-annex-find
|
||||||
|
"--metadata db-playlist=include")))
|
||||||
|
:commands (db/play-auto-playlist
|
||||||
|
db/playlist-files-from-git-annex-find
|
||||||
|
db/play-auto-playlist-from-git-annex-find
|
||||||
|
music-control/body
|
||||||
|
db/update-playlist-files))
|
||||||
|
|
||||||
(use-package emms
|
(use-package emms
|
||||||
:pin "melpa-stable"
|
:pin "melpa-stable"
|
||||||
:commands (emms
|
:commands (emms
|
||||||
|
@ -2606,10 +2596,11 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
|
|
||||||
(run-with-timer 0 3600 #'emms-cache-save)))
|
(run-with-timer 0 3600 #'emms-cache-save)))
|
||||||
|
|
||||||
;; Make sure emms is up and running when we call functions such as
|
|
||||||
;; `emms-play-dired’ etc.
|
|
||||||
(use-package emms-source-file
|
(use-package emms-source-file
|
||||||
:config (require 'emms))
|
:config (progn
|
||||||
|
;; Make sure emms is up and running when we call functions such as
|
||||||
|
;; `emms-play-dired’ etc.
|
||||||
|
(require 'emms)))
|
||||||
|
|
||||||
(use-package db-emms
|
(use-package db-emms
|
||||||
:commands (db/emms-source-file-directory-tree-find
|
:commands (db/emms-source-file-directory-tree-find
|
||||||
|
@ -2626,16 +2617,8 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
(require 'emms)
|
(require 'emms)
|
||||||
(require 'helm-adaptive)))
|
(require 'helm-adaptive)))
|
||||||
|
|
||||||
(use-package db-music
|
(use-package image
|
||||||
:init (setq db/auto-playlist-file-function
|
:init (setq image-use-external-converter t))
|
||||||
#'(lambda ()
|
|
||||||
(db/playlist-files-from-git-annex-find
|
|
||||||
"--metadata db-playlist=include")))
|
|
||||||
:commands (db/play-auto-playlist
|
|
||||||
db/playlist-files-from-git-annex-find
|
|
||||||
db/play-auto-playlist-from-git-annex-find
|
|
||||||
music-control/body
|
|
||||||
db/update-playlist-files))
|
|
||||||
|
|
||||||
|
|
||||||
;; * Shells and such
|
;; * Shells and such
|
||||||
|
@ -3061,9 +3044,6 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
|
|
||||||
;; * Other Mode Configurations
|
;; * Other Mode Configurations
|
||||||
|
|
||||||
;; These are external packages that are not essential, but still nice to have.
|
|
||||||
;; They provide optional functionality and may redefine builtin commands.
|
|
||||||
|
|
||||||
(use-package cperl-mode
|
(use-package cperl-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (cperl-mode)
|
:commands (cperl-mode)
|
||||||
|
@ -3111,10 +3091,6 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
(ignore params)
|
(ignore params)
|
||||||
(list start end)))))
|
(list start end)))))
|
||||||
|
|
||||||
(use-package expand-region
|
|
||||||
:ensure t
|
|
||||||
:commands (er/expand-region))
|
|
||||||
|
|
||||||
(use-package eproject
|
(use-package eproject
|
||||||
;; This configuration is only present to inhibit eproject overriding
|
;; This configuration is only present to inhibit eproject overriding
|
||||||
;; keybindings in `message-mode'
|
;; keybindings in `message-mode'
|
||||||
|
@ -3125,6 +3101,14 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
#'(lambda ()
|
#'(lambda ()
|
||||||
(eproject-mode -1))))))
|
(eproject-mode -1))))))
|
||||||
|
|
||||||
|
(use-package expand-region
|
||||||
|
:ensure t
|
||||||
|
:commands (er/expand-region))
|
||||||
|
|
||||||
|
(use-package eww
|
||||||
|
:init (setq eww-bookmarks-directory
|
||||||
|
(expand-file-name "private/" emacs-d)))
|
||||||
|
|
||||||
(use-package haskell-mode
|
(use-package haskell-mode
|
||||||
:config (progn
|
:config (progn
|
||||||
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
|
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
|
||||||
|
@ -3163,6 +3147,9 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
|
plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
|
||||||
plantuml-indent-level 2))
|
plantuml-indent-level 2))
|
||||||
|
|
||||||
|
(use-package project
|
||||||
|
:init (setq project-switch-commands 'project-dired))
|
||||||
|
|
||||||
(use-package python
|
(use-package python
|
||||||
:config (progn
|
:config (progn
|
||||||
(unless (require 'lsp-pyright nil :no-error)
|
(unless (require 'lsp-pyright nil :no-error)
|
||||||
|
@ -3187,9 +3174,20 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
;; `pyvenv-deactivate', though.
|
;; `pyvenv-deactivate', though.
|
||||||
(add-hook 'pyvenv-post-activate-hooks #'pyvenv-restart-python)))
|
(add-hook 'pyvenv-post-activate-hooks #'pyvenv-restart-python)))
|
||||||
|
|
||||||
|
(use-package re-builder
|
||||||
|
:commands (re-builder)
|
||||||
|
:init (setq reb-re-syntax 'string))
|
||||||
|
|
||||||
(use-package sh-script
|
(use-package sh-script
|
||||||
:init (setq sh-basic-offset 2))
|
:init (setq sh-basic-offset 2))
|
||||||
|
|
||||||
|
(use-package shr
|
||||||
|
:init (setq shr-use-fonts nil
|
||||||
|
shr-use-colors nil
|
||||||
|
shr-max-image-proportion 0.7
|
||||||
|
shr-image-animate nil
|
||||||
|
shr-width (current-fill-column)))
|
||||||
|
|
||||||
(use-package textile-mode
|
(use-package textile-mode
|
||||||
:config (progn
|
:config (progn
|
||||||
;; Do not wrap lines automatically in textile mode, as text produced
|
;; Do not wrap lines automatically in textile mode, as text produced
|
||||||
|
|
Loading…
Reference in New Issue
Block a user