#+end_src
* Dutch to English translation with =define-word= and [[https://www.vertalen.nu/][vertalen.nu]]
+:PROPERTIES:
+:CUSTOM_ID: vertalen
+:END:
#+begin_src emacs-lisp
(defun vertalen--parse-vertalen ()
(setq package-selected-packages
'(academic-phrases avy ace-window alert
- all-the-icons all-the-icons-completion anzu
- auctex-latexmk bbdb benchmark-init browse-at-remote
- browse-kill-ring corfu command-log-mode dabbrev define-word
- diff-hl diminish disable-mouse dockerfile-mode elfeed
- embark-consult erlang exec-path-from-shell
- flymake-swi-prolog ggtags git-blamed
+ all-the-icons all-the-icons-completion all-the-icons-dired
+ all-the-icons-gnus anzu auctex-latexmk bbdb benchmark-init
+ browse-at-remote browse-kill-ring corfu command-log-mode
+ dabbrev define-word diff-hl diminish disable-mouse
+ dockerfile-mode elfeed embark-consult erlang
+ exec-path-from-shell flymake-swi-prolog ggtags git-blamed
git-timemachine gitconfig-mode gitignore-mode
gnu-elpa-keyring-update gnuplot gnuplot-mode go-mode
graphviz-dot-mode highlight-escape-sequences htmlize
(require 'gnus)
(require 'gnus-icalendar)
(setq
- gnus-article-treat-types '("text/plain"
- "text/x-verbatim"
- "text/x-patch"
- "text/html"
- "text/calendar")
- gnus-posting-styles `((".*dazz.*"
- (address ,esy/user-mail-address-dazz))
- (".*mail.swi-prolog.com.*"
- (address ,esy/user-mail-address-swipl))
- (".*"
- (address ,esy/user-mail-address-gmail)))
- gnus-icalendar-org-capture-file esy/inbox-path
- gnus-icalendar-org-capture-headline '("Calendar")
- calendar-date-style 'iso)
+ gnus-article-treat-types '("text/plain"
+ "text/x-verbatim"
+ "text/x-patch"
+ "text/html"
+ "text/calendar")
+ gnus-posting-styles `((".*dazz.*"
+ (address ,esy/user-mail-address-dazz))
+ (".*mail.swi-prolog.com.*"
+ (address ,esy/user-mail-address-swipl))
+ (".*"
+ (address ,esy/user-mail-address-gmail)))
+ gnus-icalendar-org-capture-file esy/inbox-path
+ gnus-icalendar-org-capture-headline '("Calendar")
+ calendar-date-style 'iso)
(gnus-icalendar-setup)
(gnus-icalendar-org-setup)
(add-hook 'gnus-group-mode-hook #'gnus-topic-mode))
(add-hook 'gnus-mode-hook #'esy/customize-gnus-mode)
+
+ (with-eval-after-load 'gnus
+ (require 'all-the-icons-gnus)
+ (all-the-icons-gnus-setup))
#+end_src
* Global keybindings :kbd:
:CUSTOM_ID: applications
:END:
+** Dired
+:PROPERTIES:
+:CUSTOM_ID: dired
+:END:
+
+#+begin_src emacs-lisp
+ (add-hook 'dired-mode-hook #'all-the-icons-dired-mode)
+#+end_src
+
** Elfeed
:PROPERTIES:
:CUSTOM_ID: elfeed
#+end_src
** Slack
+:PROPERTIES:
+:CUSTOM_ID: slack
+:END:
#+begin_src emacs-lisp
(defun esy/slack-start ()
(interactive)
:CUSTOM_ID: completions
:END:
+*** Completion at point
+:PROPERTIES:
+:CUSTOM_ID: completion-at-point
+:END:
+
#+begin_src emacs-lisp
(defun esy/dabbrev-capf ()
"Workaround for issue with `dabbrev-capf'."
+ (require 'dabbrev)
(dabbrev--reset-global-variables)
(setq dabbrev-case-fold-search nil)
(dabbrev-capf))
(file (buffer-substring-no-properties start end)))
`(,start ,end completion--file-name-table . (:exclusive no))))))
- (defun esy/setup-completions ()
- "Setup completions related-package."
+ (defun esy/setup-completion-at-point ()
+ "Setup `completion-at-point'."
(require 'corfu)
- (require 'dabbrev)
+ (setq corfu-cycle t)
+ (global-corfu-mode)
+ (add-to-list 'completion-at-point-functions #'esy/dabbrev-capf)
+ (add-to-list 'completion-at-point-functions #'esy/file-capf))
+
+ (add-hook 'after-init-hook #'esy/setup-completion-at-point)
+#+end_src
+
+*** Minibuffer-based completions
+:PROPERTIES:
+:CUSTOM_ID: minibuffer-completion
+:END:
+
+#+begin_src emacs-lisp
+ (defun esy/setup-minibuffer ()
+ "setup minibuffer and completions."
(require 'marginalia)
(require 'orderless)
(require 'all-the-icons)
(require 'all-the-icons-completion)
- (setq corfu-cycle t
- read-extended-command-predicate #'command-completion-default-include-p
+ (setq read-extended-command-predicate #'command-completion-default-include-p
completions-format 'one-column
completion-auto-select nil
completion-styles '(basic orderless)
(define-key minibuffer-local-completion-map
[remap next-line]
#'minibuffer-next-completion)
- (global-corfu-mode)
- (marginalia-mode)
- (add-to-list 'completion-at-point-functions #'esy/dabbrev-capf)
- (add-to-list 'completion-at-point-functions #'esy/file-capf)
(add-hook 'marginalia-mode-hook
#'all-the-icons-completion-marginalia-setup)
+ (marginalia-mode)
(add-to-list 'display-buffer-alist
'("*Completions*"
(display-buffer-reuse-window display-buffer-at-bottom)
(window-parameters . ((mode-line-format . none))))))
- (add-hook 'after-init-hook #'esy/setup-completions)
+ (add-hook 'after-init-hook #'esy/setup-minibuffer)
#+end_src
* Mode-line customizations