("nongnu" . "https://elpa.nongnu.org/nongnu-devel/"))
;; select some packages to install
package-selected-packages '(
- all-the-icons
- all-the-icons-completion
- all-the-icons-dired
- all-the-icons-gnus
- ;; auctex
avy
bbdb
corfu
sweeprolog
terraform-mode
vterm
- vundo
whitespace-cleanup-mode
)
;; configure Org capture templates
gnus-inhibit-startup-message t
;; set Gnus backends
gnus-select-method '(nntp "news.gmane.io")
+ gnus-cite-parse-max-size nil
+ gnus-face-1 'bold
+ gnus-face-2 'gnus-cite-1
+ gnus-face-3 'shadow
+ gnus-summary-line-format "%1{%U%R%z%}%B%2{%f%} %3{(%&user-date;, %k)%}:%* %s\n"
+ gnus-simplify-subject-functions '(gnus-simplify-subject-re)
+ gnus-treat-display-smileys nil
gnus-secondary-select-methods '((nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port "imaps")
(interactive (list user-init-file))
(find-file init))
- (defun esy/eww-target ()
- (require 'eww)
- (if (use-region-p)
- (let ((target (buffer-substring-no-properties (use-region-beginning)
- (use-region-end))))
- (add-to-history 'eww-prompt-history target)
- target)
- (completing-read "Browse or search: "
- eww-prompt-history nil nil nil
- 'eww-prompt-history
- (eww-suggested-uris))))
-
- (defun esy/eww (target)
- "Browse or search for TARGET."
- (interactive (list (esy/eww-target)))
- (eww target))
-
(with-eval-after-load 'shell
(keymap-set shell-mode-map "SPC" #'comint-magic-space))
(esy/init-step bindings
"Bind some keys."
- (keymap-global-set "C-c w" #'esy/eww)
(keymap-global-set "C-c c" #'org-capture)
(keymap-global-set "C-c l" #'org-store-link)
(keymap-global-set "C-c a" #'org-agenda)
(keymap-global-set "C-;" #'avy-goto-char-timer)
(keymap-global-set "C-s-f" #'toggle-frame-fullscreen)
(keymap-global-set "C-s-l" #'esy/pulse-line)
+ (keymap-global-set "\"" #'insert-pair)
(keymap-set ctl-x-map "b" #'consult-buffer)
(keymap-set ctl-x-4-map "b" #'consult-buffer-other-window)
nil
(mapcar (lambda (dir)
(when-let ((proj (project-current nil dir)))
- (cons (project-name proj) dir)))
+ (cons (project-name proj) dir)))
(project-known-project-roots))))
(current (project-current))
(default (and current (project-name current)))
(add-hook 'gnus-group-mode-hook #'gnus-topic-mode)
(gnus-icalendar-setup)
(gnus-icalendar-org-setup)
- (all-the-icons-gnus-setup)
(bbdb-initialize 'gnus 'mail 'message)))
(esy/init-step dired
"Configure `dired'."
- (defun esy/local-all-the-icons-dired-mode ()
- (unless (file-remote-p default-directory)
- (all-the-icons-dired-mode)))
-
(with-eval-after-load 'dired
- (put 'dired-find-alternate-file 'disabled nil)
- (add-hook 'dired-mode-hook #'esy/local-all-the-icons-dired-mode)))
+ (put 'dired-find-alternate-file 'disabled nil)))
(esy/init-step tramp
"Configure remote access via `tramp'."
(car key-binding)
(cdr key-binding)))
- (with-eval-after-load 'marginalia
- (add-hook 'marginalia-mode-hook
- #'all-the-icons-completion-marginalia-setup))
-
(with-eval-after-load 'consult
(with-eval-after-load 'embark
(require 'embark-consult))))
(require 'dabbrev)
(dabbrev--reset-global-variables)
(setq dabbrev-case-fold-search nil)
- (dabbrev-capf))
+ (pcase (let ((inhibit-message t))
+ (ignore-errors (dabbrev-capf)))
+ (`(,beg ,end ,table . ,_)
+ (list beg end table :exclusive 'no))))
(add-to-list 'completion-at-point-functions #'esy/dabbrev-capf)
(add-to-list 'lin-mode-hooks 'gnus-group-mode-hook)
(add-to-list 'lin-mode-hooks 'gnus-server-mode-hook)))
-(esy/init-step icons
- "Configure icons via `all-the-icons'."
- (with-eval-after-load 'all-the-icons
- (add-to-list 'all-the-icons-extension-icon-alist
- '("pl" all-the-icons-alltheicon "prolog"
- :height 1.1 :face all-the-icons-lmaroon))))
-
(esy/init-step corfu
"Configure `completion-in-region' UI with `corfu'."
(let ((original-completion-in-region-function completion-in-region-function))
(defun esy/margin-formatter (metadata)
"Format METADATA for `corfu-margin-formatters'."
(pcase (cdr (assoc 'category metadata))
- ('file (lambda (string)
- (concat (if (string-suffix-p "/" string)
- (all-the-icons-icon-for-dir string)
- (all-the-icons-icon-for-file string))
- " ")))
('dabbrev (lambda (_) "… "))))
(add-to-list 'corfu-margin-formatters #'esy/margin-formatter)
(corfu-indexed-mode)))
esy/feeds-file))
(setq elfeed-feeds feeds)))
+ (defun esy/update-feeds ()
+ (interactive)
+ (setq elfeed-feeds (esy/feeds)))
+
(with-eval-after-load 'eww
(defun esy/eww-add-feed (url keywords)
(interactive (list (eww-read-alternate-url)