commit fc1b397a2e7d8a248752e7c84f6beb6cb304f8c2
parent a3c3c0e2e699c92e5ab9e22572f11bb0af6ae85c
Author: Ethan Long <edl@disroot.org>
Date: Sun, 21 May 2023 03:09:11 +1000
Updated my config to work on MacOS with Yamamoto's emacs as well!
Diffstat:
| M | init.el | | | 176 | ++++++++++++++++++++----------------------------------------------------------- |
1 file changed, 43 insertions(+), 133 deletions(-)
diff --git a/init.el b/init.el
@@ -19,9 +19,10 @@
;; Get rid of default crud
(setq inhibit-startup-screen t)
-(menu-bar-mode 0) ; This removes the menu bar, if in doubt, keep on.
-(tool-bar-mode 0)
-(scroll-bar-mode 0)
+(if (not (eq system-type 'darwin))
+ (setq menu-bar-mode 0
+ tool-bar-mode 0
+ scroll-bar-mode 0))
;; Modeline line and col number
(line-number-mode 1)
(column-number-mode 1)
@@ -51,40 +52,42 @@
(add-hook 'after-make-frame-functions 'custom-set-fonts)
;; Font ligatures:
-(use-package ligature
- :ensure t
- :config
- (ligature-set-ligatures 'prog-mode '(("-" (rx (+ "-")))
- ("-" (rx (* "-") ">"))
- ("+" (rx (+ "+")))
- ("<" (rx (+ "=")))
- ("<" (rx (+ "=") ">"))
- ("<" (rx (+ "~")))
- ("<" (rx (+ "~") ">"))
- ("<" (rx "!" (+ "-")))
- ("<" (rx (+ "-")))
- ("<" (rx (+ "-") ">"))
- ("<" (rx "|"))
- (">" (rx (+ "=")))
- (">" (rx ">" (+ "=")))
- (">" (rx ">" (+ "=") ">"))
- (">" (rx (+ "-")))
- (">" (rx (+ "-") "<"))
- ("~" (rx (+ "~")))
- ("~" (rx (+ "~") ">"))
- ("=" (rx (* "=") ">"))
- ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
- "!="
- "!=="
- "[|"
- "|]"
- "{|"
- "|}"
- "|>"
- "||"
- "&&"
- ))
- (global-ligature-mode t))
+(if (not (eq system-type 'darwin))
+ (use-package ligature
+ :ensure t
+ :config
+ (ligature-set-ligatures 'prog-mode '(("-" (rx (+ "-")))
+ ("-" (rx (* "-") ">"))
+ ("+" (rx (+ "+")))
+ ("<" (rx (+ "=")))
+ ("<" (rx (+ "=") ">"))
+ ("<" (rx (+ "~")))
+ ("<" (rx (+ "~") ">"))
+ ("<" (rx "!" (+ "-")))
+ ("<" (rx (+ "-")))
+ ("<" (rx (+ "-") ">"))
+ ("<" (rx "|"))
+ (">" (rx (+ "=")))
+ (">" (rx ">" (+ "=")))
+ (">" (rx ">" (+ "=") ">"))
+ (">" (rx (+ "-")))
+ (">" (rx (+ "-") "<"))
+ ("~" (rx (+ "~")))
+ ("~" (rx (+ "~") ">"))
+ ("=" (rx (* "=") ">"))
+ ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
+ "!="
+ "!=="
+ "[|"
+ "|]"
+ "{|"
+ "|}"
+ "|>"
+ "||"
+ "&&"
+ ))
+ (global-ligature-mode t))
+ (mac-auto-operator-composition-mode))
;; Rainbow delimiters:
(use-package rainbow-delimiters
@@ -161,9 +164,9 @@
;; TAB cycle if there are only a few candidates
(setq completion-cycle-threshold 3))
-
-;; Change the default scroll behaviour to smooth scroll
-(pixel-scroll-precision-mode t)
+(if (not (eq system-type 'darwin))
+ ;; Change the default scroll behaviour to smooth scroll
+ (pixel-scroll-precision-mode t))
;; Scrolling down a file only goes down a single line when reaching the bottom
(setq scroll-step 1)
;; The region that the curser needs to enter to trigger scrolling
@@ -221,96 +224,3 @@
;; Emacs crap that it does automatically:
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(connection-local-criteria-alist
- '(((:application tramp :protocol "flatpak")
- tramp-container-connection-local-default-flatpak-profile)
- ((:application tramp)
- tramp-connection-local-default-system-profile tramp-connection-local-default-shell-profile)))
- '(connection-local-profile-alist
- '((tramp-container-connection-local-default-flatpak-profile
- (tramp-remote-path "/app/bin" tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin" "/opt/sbin" "/opt/local/bin"))
- (tramp-connection-local-darwin-ps-profile
- (tramp-process-attributes-ps-args "-acxww" "-o" "pid,uid,user,gid,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state=abcde" "-o" "ppid,pgid,sess,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etime,pcpu,pmem,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (euid . number)
- (user . string)
- (egid . number)
- (comm . 52)
- (state . 5)
- (ppid . number)
- (pgrp . number)
- (sess . number)
- (ttname . string)
- (tpgid . number)
- (minflt . number)
- (majflt . number)
- (time . tramp-ps-time)
- (pri . number)
- (nice . number)
- (vsize . number)
- (rss . number)
- (etime . tramp-ps-time)
- (pcpu . number)
- (pmem . number)
- (args)))
- (tramp-connection-local-busybox-ps-profile
- (tramp-process-attributes-ps-args "-o" "pid,user,group,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "stat=abcde" "-o" "ppid,pgid,tty,time,nice,etime,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (user . string)
- (group . string)
- (comm . 52)
- (state . 5)
- (ppid . number)
- (pgrp . number)
- (ttname . string)
- (time . tramp-ps-time)
- (nice . number)
- (etime . tramp-ps-time)
- (args)))
- (tramp-connection-local-bsd-ps-profile
- (tramp-process-attributes-ps-args "-acxww" "-o" "pid,euid,user,egid,egroup,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state,ppid,pgid,sid,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etimes,pcpu,pmem,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (euid . number)
- (user . string)
- (egid . number)
- (group . string)
- (comm . 52)
- (state . string)
- (ppid . number)
- (pgrp . number)
- (sess . number)
- (ttname . string)
- (tpgid . number)
- (minflt . number)
- (majflt . number)
- (time . tramp-ps-time)
- (pri . number)
- (nice . number)
- (vsize . number)
- (rss . number)
- (etime . number)
- (pcpu . number)
- (pmem . number)
- (args)))
- (tramp-connection-local-default-shell-profile
- (shell-file-name . "/bin/sh")
- (shell-command-switch . "-c"))
- (tramp-connection-local-default-system-profile
- (path-separator . ":")
- (null-device . "/dev/null"))))
- '(package-selected-packages
- '(lsp corfu lsp-java which-key use-package rust-mode rainbow-delimiters lsp-haskell ligature evil-collection doom-modeline counsel fast-scroll)))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )