summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-06-29 08:39:15 +0100
committerYann Herklotz <git@yannherklotz.com>2023-06-29 08:41:15 +0100
commitc5360b78cd1bc941a3163effdfc16c52dbd3b8fb (patch)
tree09d5cb79811024bb7c5e18235fb14979b401a684
parent5061f629c2b451cc8e6f7acc76d6df9f8b5b64af (diff)
downloadymh-emacs-uni.tar.gz
ymh-emacs-uni.zip
Add docs file and tweaks to init fileuni
-rw-r--r--docs/ymh-emacs.org2
-rw-r--r--init.el68
2 files changed, 27 insertions, 43 deletions
diff --git a/docs/ymh-emacs.org b/docs/ymh-emacs.org
new file mode 100644
index 0000000..2288912
--- /dev/null
+++ b/docs/ymh-emacs.org
@@ -0,0 +1,2 @@
+#+title: YMH Emacs
+#+author: Yann Herklotz
diff --git a/init.el b/init.el
index ea08a60..955115c 100644
--- a/init.el
+++ b/init.el
@@ -11,6 +11,11 @@
(setq user-full-name "Yann Herklotz")
(setq user-mail-address "yann@yannherklotz.com")
+(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
+(unless (file-exists-p custom-file)
+ (with-temp-buffer (write-file custom-file)))
+(load custom-file)
+
(setq gc-cons-threshold (* 1024 1024 1024))
;; Set some global key rebindings, mainly trying to use `*-dwim' functions
@@ -24,12 +29,14 @@
(global-set-key (kbd "C-.") #'other-window)
(global-set-key (kbd "C-,") #'ymh/prev-window)
(global-set-key (kbd "C-\\") #'undo-only)
-(global-set-key (kbd "M-SPC") (lambda () (interactive) (insert " ")))
(global-set-key (kbd "C-<tab>") #'tab-bar-switch-to-recent-tab)
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c c") #'org-capture)
+(global-set-key [remap dabbrev-expand] 'hippie-expand)
+(global-set-key [remap zap-to-char] 'zap-up-to-char)
+
(define-key global-map (kbd "M-Q") #'ymh/unfill-paragraph)
;; Create my own keymap for other, less important but still useful commands
@@ -240,7 +247,9 @@ Should be one of `:white-split', `:modified' or `:default'")
downcase-region))
(put c 'disabled nil))
- (set-frame-font "Iosevka YMHG Semibold-14" nil t)
+ (set-face-attribute 'default nil :family "Iosevka YMHG" :weight 'semi-bold)
+ (set-face-attribute 'variable-pitch nil :family "Iosevka YMHG" :weight 'semi-bold)
+ (set-face-attribute 'fixed-pitch nil :family "Iosevka YMHG" :weight 'semi-bold)
(add-to-list 'mode-line-misc-info
'(t ("[t:" (:eval (alist-get 'name (tab-bar--current-tab))) "] ")))
@@ -294,7 +303,7 @@ Should be one of `:white-split', `:modified' or `:default'")
:custom
(exec-path-from-shell-arguments '("-l"))
:config
- (when (memq window-system '(mac ns x))
+ (when (memq window-system '(mac ns x pgtk))
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG"
"LC_CTYPE" "NIX_SSL_CERT_FILE" "NIX_PATH"))
(add-to-list 'exec-path-from-shell-variables var))
@@ -479,6 +488,7 @@ https://yannherklotz.com"))
(modus-themes-to-toggle
'(modus-operandi-tinted modus-vivendi-tinted))
(modus-themes-italic-constructs t)
+ (defface modus-themes-variable-pitch)
:config
(defun ymh-modus-theme-apply-customisations ()
(modus-themes-with-colors
@@ -703,13 +713,7 @@ https://yannherklotz.com"))
(use-package org-zettelkasten
:after org
- :init
- (unless (package-installed-p 'org-zettelkasten)
- (if ymh/emacs-29-p
- (package-vc-install
- '(org-zettelkasten
- . (:url "https://git.sr.ht/~ymherklotz/org-zettelkasten")))
- (package-install 'org-zettelkasten)))
+ :ensure t
:custom
(org-zettelkasten-directory "~/Dropbox/zk")
:config
@@ -747,11 +751,6 @@ https://yannherklotz.com"))
:init
(direnv-mode 1))
-(use-package orderless
- :ensure t
- :custom
- (completion-styles '(substring orderless basic)))
-
(use-package vertico
:ensure t
:custom
@@ -762,11 +761,6 @@ https://yannherklotz.com"))
:init
(vertico-mode 1))
-(use-package corfu
- :ensure t
- :init
- (global-corfu-mode))
-
(use-package consult
:ensure t
:bind (("M-s r" . consult-ripgrep)
@@ -1036,6 +1030,8 @@ https://yannherklotz.com"))
(use-package ox-gfm
:ensure t)
+(use-package ox-man)
+
(use-package verilog-mode
:defer t
:mode "\\.sv\\'"
@@ -1043,13 +1039,6 @@ https://yannherklotz.com"))
:config
(setq auto-mode-alist (delete '("\\.v\\'" . verilog-mode) auto-mode-alist)))
-(use-package hungry-delete
- :ensure t
- :custom
- (hungry-delete-join-reluctantly t "Leave a space when hungry deleting.")
- :init
- (global-hungry-delete-mode))
-
(use-package scala-mode
:ensure t
:defer t
@@ -1116,9 +1105,6 @@ https://yannherklotz.com"))
(use-package ox-beamer
:after org)
-(use-package visual-fill-column
- :ensure t)
-
(use-package elfeed
:ensure t
:custom
@@ -1151,14 +1137,6 @@ https://yannherklotz.com"))
(use-package markdown-mode
:ensure t)
-(use-package expand-region
- :ensure t
- :bind (("M-o" . er/expand-region)))
-
-(use-package chess
- :ensure t
- :defer t)
-
(use-package darkroom
:ensure t
:bind (:map ymh-map
@@ -1362,12 +1340,16 @@ https://yannherklotz.com"))
%o"))
(add-to-list 'org-context-presets-alist '("ymh-article" . (:literal "\\usemodule[art-01]" :template "ymh-article" :snippets ("ymh-abstract" "ymh-colours" "ymh-fonts" "ymh-bib" "ymh-interaction" "ymh-titleframed" "ymh-first-noheader")))))
-(setq gc-cons-threshold (* 1024 1024 10))
+(use-package dune :ensure t)
-(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
-(unless (file-exists-p custom-file)
- (with-temp-buffer (write-file custom-file)))
-(load custom-file)
+;; Collect emacs statistics and run `emacs-gc-stats-save-session' when ready in
+;; ~3 weeks.
+(use-package emacs-gc-stats
+ :ensure t
+ :config
+ (emacs-gc-stats-mode +1))
+
+(setq gc-cons-threshold (* 1024 1024 10))
(provide 'init)