2022-11-08 17:53:04 +00:00
|
|
|
;; Disable Emacs window resizing at startup
|
|
|
|
(setq frame-resize-pixelwise t)
|
|
|
|
|
|
|
|
;; Remove the startup screen
|
|
|
|
(setq inhibit-startup-message t)
|
|
|
|
|
|
|
|
;; Disable some GTK decoration
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
|
|
|
|
;; Enable line numbers globally
|
|
|
|
(global-display-line-numbers-mode 1)
|
|
|
|
|
|
|
|
;; Add the melpa package repository and initialize package repositories
|
|
|
|
(require 'package)
|
|
|
|
(package-initialize)
|
|
|
|
|
|
|
|
;; Straight.el bootstrap
|
|
|
|
(defvar bootstrap-version)
|
|
|
|
(let ((bootstrap-file
|
|
|
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
|
|
|
(bootstrap-version 6))
|
|
|
|
(unless (file-exists-p bootstrap-file)
|
|
|
|
(with-current-buffer
|
|
|
|
(url-retrieve-synchronously
|
|
|
|
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
|
|
|
'silent 'inhibit-cookies)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(eval-print-last-sexp)))
|
|
|
|
(load bootstrap-file nil 'nomessage))
|
|
|
|
|
|
|
|
;; Install use-package for simplicity, and use straight.el for it by default
|
|
|
|
(straight-use-package 'use-package)
|
|
|
|
(setq straight-use-package-by-default t)
|
|
|
|
|
2022-11-08 17:53:04 +00:00
|
|
|
;; Disable the creation of files ending with '~'
|
|
|
|
(setq make-backup-files nil)
|
|
|
|
|
2022-11-08 17:53:04 +00:00
|
|
|
;; Install the Doom Emacs theme megapack.
|
|
|
|
(use-package doom-themes
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(setq doom-themes-enable-bold t
|
|
|
|
doom-themes-enable-italic t)
|
|
|
|
(doom-themes-treemacs-config)
|
|
|
|
(doom-themes-org-config))
|
|
|
|
|
|
|
|
;; Don't enable package.el at startup
|
|
|
|
(setq package-enable-at-startup nil)
|
|
|
|
|
|
|
|
;; Set theme to doom-tokyo-night, Dianicemacs' default
|
|
|
|
(load-theme 'doom-tokyo-night t)
|
|
|
|
|
2022-11-08 17:53:06 +00:00
|
|
|
;; A nice border around Emacs
|
|
|
|
(modify-all-frames-parameters
|
|
|
|
'((right-divider-width . 15)
|
|
|
|
(internal-border-width . 15)))
|
|
|
|
(dolist (face '(window-divider
|
|
|
|
window-divider-first-pixel
|
|
|
|
window-divider-last-pixel))
|
|
|
|
(face-spec-reset-face face)
|
|
|
|
(set-face-foreground face (face-attribute 'default :background)))
|
|
|
|
(set-face-background 'fringe (face-attribute 'default :background))
|
|
|
|
|
2022-11-08 17:53:04 +00:00
|
|
|
;; Vi layer inside of Emacs
|
2022-11-08 17:53:05 +00:00
|
|
|
;; undo-fu, used by evil for undo/redo functionality
|
|
|
|
(use-package undo-fu
|
|
|
|
:ensure t)
|
|
|
|
|
2022-11-08 17:53:04 +00:00
|
|
|
(use-package evil
|
2022-11-08 17:53:05 +00:00
|
|
|
:requires undo-fu
|
|
|
|
:ensure t
|
|
|
|
:init
|
|
|
|
(setq evil-undo-system 'undo-fu)
|
2022-11-08 17:53:04 +00:00
|
|
|
(evil-mode 1))
|
|
|
|
|
|
|
|
;; Keep packages up to date
|
|
|
|
(use-package auto-package-update
|
|
|
|
:config
|
|
|
|
(setq auto-package-update-delete-old-versions t)
|
|
|
|
(setq auto-package-update-hide-results t)
|
|
|
|
(auto-package-update-maybe))
|
|
|
|
|
2022-11-08 17:53:05 +00:00
|
|
|
;; Modeline - doom-modeline
|
|
|
|
(use-package doom-modeline
|
|
|
|
:ensure t
|
|
|
|
:init (doom-modeline-mode 1)
|
|
|
|
:config
|
|
|
|
(setq doom-modeline-height 25
|
|
|
|
doom-modeline-bar-width 0
|
|
|
|
doom-modeline-project-detection 'auto
|
|
|
|
doom-modeline-buffer-encoding nil
|
|
|
|
doom-modeline-modal t
|
|
|
|
doom-modeline-modal-icon t
|
|
|
|
doom-modeline-buffer-file-name-style 'file-name))
|
|
|
|
|
2022-11-08 17:53:06 +00:00
|
|
|
;; A beautiful git porcelain inside of Emacs
|
2022-11-08 17:53:05 +00:00
|
|
|
(use-package magit
|
|
|
|
:ensure t)
|
2022-11-08 17:53:05 +00:00
|
|
|
|
2022-11-08 17:53:05 +00:00
|
|
|
;; Icons for various UI elements
|
|
|
|
(use-package all-the-icons
|
|
|
|
:ensure t)
|
2022-11-08 17:53:05 +00:00
|
|
|
|
2022-11-08 17:53:06 +00:00
|
|
|
;; Org Mode
|
|
|
|
(use-package org-superstar
|
|
|
|
:ensure t
|
|
|
|
:init (add-hook 'org-mode-hook (lambda() (org-superstar-mode 1)))
|
|
|
|
:config
|
|
|
|
(setq org-superstar-headline-bullets-list
|
|
|
|
'("🞉" "🞈" "🞇" "🞆" "🞅" "🞄"))
|
|
|
|
(set-face-attribute 'org-level-8 nil :weight 'bold :inherit 'default)
|
|
|
|
(set-face-attribute 'org-level-7 nil :inherit 'org-level-8)
|
|
|
|
(set-face-attribute 'org-level-6 nil :inherit 'org-level-8)
|
|
|
|
(set-face-attribute 'org-level-5 nil :inherit 'org-level-8)
|
|
|
|
(set-face-attribute 'org-level-4 nil :inherit 'org-level-8)
|
|
|
|
(set-face-attribute 'org-level-3 nil :inherit 'org-level-8 :height 1.15)
|
|
|
|
(set-face-attribute 'org-level-2 nil :inherit 'org-level-8 :height 1.35)
|
|
|
|
(set-face-attribute 'org-level-1 nil :inherit 'org-level-8 :height 1.65)
|
|
|
|
(set-face-attribute 'org-document-title nil
|
|
|
|
:height 1.85
|
|
|
|
:foreground 'unspecified
|
|
|
|
:inherit 'org-level-8))
|
|
|
|
|
|
|
|
;; Customize Org mode
|
|
|
|
(setq org-ellipsis "..."
|
|
|
|
org-use-property-inheritance t
|
|
|
|
org-list-allow-alphabetical t
|
|
|
|
org-catch-invisible-edits 'smart
|
|
|
|
org-startup-indented t
|
|
|
|
org-hide-emphasis-markers t
|
|
|
|
org-startup-with-inline-images t
|
|
|
|
org-image-actual-width '(300)
|
|
|
|
org-pretty-entities t
|
|
|
|
org-hide-leading-stars t
|
|
|
|
org-adapt-indentation t)
|
|
|
|
|
|
|
|
(plist-put org-format-latex-options :scale 1.75)
|
|
|
|
|
2022-11-08 17:53:05 +00:00
|
|
|
;; Programming languages configuration
|
|
|
|
;; Rust
|