2023-01-28 09:26:37 +00:00
|
|
|
;; Basic appearence and behaviour.
|
2022-05-15 21:37:25 +01:00
|
|
|
(setq inhibit-startup-message t)
|
|
|
|
(setq auto-save-default nil)
|
|
|
|
(setq make-backup-files nil)
|
2024-04-08 14:51:49 +01:00
|
|
|
|
2023-07-25 19:47:43 +01:00
|
|
|
(cond ((find-font (font-spec :name "Berkeley Mono"))
|
2024-04-08 14:51:49 +01:00
|
|
|
(set-face-attribute 'default nil :font "Berkeley Mono-13")))
|
|
|
|
|
2022-05-15 21:37:25 +01:00
|
|
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
2021-09-26 23:43:29 +01:00
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(set-fringe-mode 10)
|
2022-11-23 22:33:43 +00:00
|
|
|
(setq column-number-mode t)
|
2021-09-26 23:43:29 +01:00
|
|
|
(menu-bar-mode -1)
|
2023-01-28 09:26:37 +00:00
|
|
|
;; For Emacs >=29.
|
2022-12-21 21:01:18 +00:00
|
|
|
(pixel-scroll-precision-mode t)
|
2023-01-28 09:26:37 +00:00
|
|
|
;; Messes with the Terraform LSP, and I don't really need this myself.
|
2023-01-12 15:19:10 +00:00
|
|
|
(setq create-lockfiles nil)
|
2022-12-21 21:01:18 +00:00
|
|
|
|
2024-08-27 21:29:05 +01:00
|
|
|
(global-tab-line-mode 1)
|
|
|
|
|
2023-01-28 09:26:37 +00:00
|
|
|
;; Orgmode tweaks.
|
2021-09-26 23:43:29 +01:00
|
|
|
(setq org-edit-src-content-indentation 0
|
|
|
|
org-src-tab-acts-natively t
|
|
|
|
org-src-preserve-indentation t)
|
2022-11-01 11:50:57 +00:00
|
|
|
(setq-default tab-width 4)
|
|
|
|
|
2022-05-15 21:37:25 +01:00
|
|
|
;; straight.el bootstrapping
|
|
|
|
(defvar bootstrap-version)
|
|
|
|
(let ((bootstrap-file
|
2023-01-28 09:26:37 +00:00
|
|
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
2022-05-15 21:37:25 +01:00
|
|
|
(bootstrap-version 5))
|
|
|
|
(unless (file-exists-p bootstrap-file)
|
|
|
|
(with-current-buffer
|
2023-01-28 09:26:37 +00:00
|
|
|
(url-retrieve-synchronously
|
2022-05-15 21:37:25 +01:00
|
|
|
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
|
|
|
'silent 'inhibit-cookies)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(eval-print-last-sexp)))
|
|
|
|
(load bootstrap-file nil 'nomessage))
|
|
|
|
|
2024-08-27 21:29:05 +01:00
|
|
|
;; Packages that we want installed across all use cases.
|
2022-05-15 21:37:25 +01:00
|
|
|
(straight-use-package 'use-package)
|
2024-08-27 21:29:05 +01:00
|
|
|
(use-package request :straight t)
|
2023-04-26 10:20:22 +01:00
|
|
|
(use-package modus-themes :straight t)
|
2024-08-27 21:29:05 +01:00
|
|
|
(use-package simple-modeline :straight t
|
|
|
|
:init (simple-modeline-mode 1))
|
2022-05-15 21:37:25 +01:00
|
|
|
(use-package all-the-icons :straight t)
|
|
|
|
(use-package which-key
|
|
|
|
:straight t
|
|
|
|
:config (which-key-mode))
|
2022-11-01 11:50:57 +00:00
|
|
|
|
2022-12-21 21:01:18 +00:00
|
|
|
(use-package org-modern :straight t)
|
|
|
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
|
|
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
|
|
|
|
|
|
|
(use-package markdown-mode :straight t)
|
2022-11-23 12:04:00 +00:00
|
|
|
(use-package olivetti :straight t)
|
2022-11-06 21:58:50 +00:00
|
|
|
|
2024-08-27 21:29:05 +01:00
|
|
|
(use-package vundo :straight t)
|
2023-08-18 12:27:47 +01:00
|
|
|
|
2022-11-23 22:33:43 +00:00
|
|
|
;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el
|
|
|
|
(setq-default
|
2023-01-28 09:26:37 +00:00
|
|
|
functions-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "functions.el"))
|
2022-11-23 22:33:43 +00:00
|
|
|
(when (file-exists-p functions-file)
|
2022-11-24 09:02:47 +00:00
|
|
|
(load functions-file))
|
2022-11-23 22:33:43 +00:00
|
|
|
|
|
|
|
;; Keep the customize system from borking up this file.
|
|
|
|
(setq-default
|
2023-01-28 09:26:37 +00:00
|
|
|
custom-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "custom.el"))
|
2022-11-23 22:33:43 +00:00
|
|
|
(when (file-exists-p custom-file)
|
|
|
|
(load custom-file))
|
2024-08-27 21:29:05 +01:00
|
|
|
|
|
|
|
(defun me/email-client-mode ()
|
|
|
|
"Custom more for using emacs as a mail client."
|
|
|
|
(interactive)
|
|
|
|
(load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "mail/init.el"))
|
|
|
|
(kill-this-buffer)
|
|
|
|
(mu4e))
|
|
|
|
|
|
|
|
(defun me/work-mode ()
|
|
|
|
"Custom more for using emacs as programing environment."
|
|
|
|
(interactive)
|
|
|
|
(load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "prog/init.el"))
|
|
|
|
(kill-this-buffer)
|
|
|
|
(treemacs))
|