From 9d68f4454d410f0a4f0dc3e544e10bde4ae5559b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 9 Dec 2022 21:49:50 +0200 Subject: [PATCH] Update esy.org --- .emacs.d/esy.org | 139 +++++++++++++++++++++++++++++++---------------- 1 file changed, 92 insertions(+), 47 deletions(-) diff --git a/.emacs.d/esy.org b/.emacs.d/esy.org index b60127e..8cc2d56 100644 --- a/.emacs.d/esy.org +++ b/.emacs.d/esy.org @@ -142,9 +142,9 @@ For further information about Elisp headers, see [[info:elisp#Library (setq ef-themes-mixed-fonts t ef-themes-variable-pitch-ui t - ef-themes-to-toggle '(ef-bio ef-summer)) + ef-themes-to-toggle '(ef-day ef-bio)) (mapc #'disable-theme custom-enabled-themes) - (load-theme 'ef-bio :no-confirm) + (load-theme 'ef-day :no-confirm) #+end_src * Package archives @@ -162,16 +162,62 @@ For further information about Elisp headers, see [[info:elisp#Library (setq package-selected-packages - '(academic-phrases avy ace-window alert all-the-icons - all-the-icons-completion all-the-icons-dired all-the-icons-gnus - auctex-latexmk bbdb corfu command-log-mode dabbrev define-word - diff-hl dockerfile-mode elfeed embark-consult git-timemachine - gitconfig-mode gitignore-mode gnu-elpa-keyring-update gnuplot - gnuplot-mode go-mode graphviz-dot-mode haskell-mode htmlize - ialign keycast lin logos magit marginalia markdown-mode - no-littering ob-prolog olivetti orderless org-modern paredit - pdf-tools rainbow-delimiters rg slack smtpmail-multi tramp - typit vterm vundo which-key whitespace-cleanup-mode yaml-mode) + '( + academic-phrases + alert + all-the-icons + all-the-icons-completion + all-the-icons-dired + all-the-icons-gnus + auctex-latexmk + avy + bbdb + command-log-mode + corfu + define-word + diff-hl + dockerfile-mode + elfeed + embark-consult + ;; fancy-dabbrev + git-timemachine + gitconfig-mode + gitignore-mode + gnu-elpa-keyring-update + gnuplot + gnuplot-mode + go-mode + graphviz-dot-mode + haskell-mode + htmlize + ialign + keycast + lin + logos + magit + marginalia + markdown-mode + mastodon + no-littering + ob-prolog + olivetti + orderless + org-modern + paredit + pdf-tools + rainbow-delimiters + rg + slack + smtpmail-multi + swsw + tramp + typit + vterm + vundo + which-key + whitespace-cleanup-mode + yaml-mode + ) package-archive-column-width 12 package-version-column-width 28) @@ -830,6 +876,7 @@ refiling directly into deeper headings as well. (keymap-global-set "C-c f" #'fontaine-set-preset) (keymap-global-set "C-c E" #'elfeed) (keymap-global-set "C-c G" #'gnus) + (keymap-global-set "C-c M" #'mastodon) (keymap-global-set "C-c S" #'esy/vterm-at) (keymap-global-set "C-c V" #'vertalen-at-point) (keymap-global-set "C-c F" #'esy/find-esy-org) @@ -926,11 +973,10 @@ refiling directly into deeper headings as well. (keymap-set ctl-x-map "b" #'consult-buffer) (keymap-set ctl-x-4-map "b" #'consult-buffer-other-window) (keymap-set ctl-x-map "C-b" #'ibuffer) - (keymap-set ctl-x-map "o" #'ace-window) - (keymap-set ctl-x-map "O" #'other-window) (put 'set-goal-column 'disabled nil)) (add-hook 'after-init-hook #'esy/customize-ctl-x-map) + ;; (add-hook 'after-init-hook #'swsw-mode) #+end_src ** =M-s= keybindings @@ -948,23 +994,18 @@ refiling directly into deeper headings as well. (add-hook 'after-init-hook #'esy/customize-search-map) #+end_src -** =ace-window= homerow keys -:PROPERTIES: -:CUSTOM_ID: ace-window -:END: - -#+begin_src emacs-lisp - (with-eval-after-load 'ace-window - (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) - (custom-set-faces - '(aw-leading-char-face ((t (:inherit (bold modus-themes-reset-soft) :height 1)))))) -#+end_src - * Applications :PROPERTIES: :CUSTOM_ID: applications :END: +** Mastodon + +#+begin_src emacs-lisp + (with-eval-after-load 'mastodon + (setq mastodon-instance-url "https://emacs.ch" + mastodon-active-user "eshel")) +#+end_src ** denote :PROPERTIES: :CUSTOM_ID: denote @@ -1022,14 +1063,9 @@ Start =vterm= in a given directory and with a given shell, possibly over ssh for remote connections. #+begin_src emacs-lisp - (setq vterm-shell "/bin/bash") - (setq vterm-use-vterm-prompt-detection-method nil) - (defun esy/vterm-mode-hook-function () - (setq-local term-prompt-regexp "^[^#$%>\n]*[#$%>] *")) - - (add-hook 'vterm-mode-hook #'esy/vterm-mode-hook-function) - + (setq-local term-prompt-regexp "^[^#$%>\n]*[#$%>] *" + global-hl-line-mode nil)) (defun esy/vterm-with (arg shell) (interactive @@ -1048,6 +1084,11 @@ over ssh for remote connections. (require 'vterm) (let ((default-directory dir)) (vterm arg))) + + (with-eval-after-load 'vterm + (setq vterm-shell "/bin/bash") + (setq vterm-use-vterm-prompt-detection-method nil) + (add-hook 'vterm-mode-hook #'esy/vterm-mode-hook-function)) #+end_src ** Elfeed @@ -1358,6 +1399,7 @@ does in the shell. corfu-indexed-start 1) (global-corfu-mode) (corfu-indexed-mode 1) + ;; (global-fancy-dabbrev-mode) (add-to-list 'completion-at-point-functions #'esy/dabbrev-capf) (add-to-list 'completion-at-point-functions #'esy/file-capf)) @@ -1650,9 +1692,22 @@ include =emacs-lisp-mode= and =lisp-interaction-mode=. :END: #+begin_src emacs-lisp - (require 'sweeprolog) - (add-to-list 'auto-mode-alist '("\\.pl\\'" . sweeprolog-mode)) - (add-to-list 'auto-mode-alist '("\\.plt\\'" . sweeprolog-mode)) + (require 'use-package) + + (setq use-package-verbose t) + + (use-package sweeprolog + :mode ("\\.pl\\'" . sweeprolog-mode) + :mode ("\\.plt\\'" . sweeprolog-mode) + :bind-keymap ("C-c p" . sweeprolog-prefix-map) + :config + (add-hook 'sweeprolog-mode-hook #'sweeprolog-electric-layout-mode)) + + ;; (add-to-list 'auto-mode-alist '("\\.pl\\'" . sweeprolog-mode)) + ;; (add-to-list 'auto-mode-alist '("\\.plt\\'" . sweeprolog-mode)) + + ;; (with-eval-after-load 'sweeprolog + ;; (add-hook 'sweeprolog-mode-hook #'sweeprolog-electric-layout-mode)) #+end_src *** Make =rg= regard =.pl= files as Prolog rather than Perl @@ -1665,16 +1720,6 @@ include =emacs-lisp-mode= and =lisp-interaction-mode=. (add-to-list 'rg-custom-type-aliases '("Prolog" . "*.pl *.plt *.pro *.prolog"))) #+end_src -*** Integrate Prolog with =project.el= -:PROPERTIES: -:CUSTOM_ID: prolog-project -:END: - -#+begin_src emacs-lisp - (with-eval-after-load 'project - (add-hook 'project-find-functions #'project-try-iprolog -10)) -#+end_src - * =vc= customizations :PROPERTIES: :CUSTOM_ID: vc-follow-symlinks-t @@ -1982,8 +2027,8 @@ and friends work correctly with ~consult~ enabled completions. "C-t" #'transpose-lines) (put 'transpose-lines 'repeat-map 'transpose-lines-repeat-map) - #+end_src + ** Use =consult= to show =xref= results :PROPERTIES: :CUSTOM_ID: consult-xref -- 2.39.5