.emacs.d/config.org
2024-10-03 20:26:12 -04:00

81 lines
1.7 KiB
Org Mode

#+TITLE: Emacs Configuration
#+AUTHOR: Mars (@pupbrained)
#+EMAIL: mars@pupbrained.xyz
#+STARTUP: showeverything
* Basic Setup
** Server
#+begin_src emacs-lisp
(require 'bind-key)
(load "server")
(unless (server-running-p) (server-start))
#+end_src
** Disable Auto-Save and Backup
*** (I don't like having ~#file#~ and ~file~~ everywhere in my directories)
#+begin_src emacs-lisp
(setq auto-save-default nil)
(setq make-backup-files nil)
#+end_src
** Enable Real Auto Save
#+begin_src emacs-lisp
(use-package real-auto-save
:ensure t
:config
(setq real-auto-save-interval 1)
(add-hook 'prog-mode-hook 'real-auto-save-mode))
#+end_src
** No Scratch On Open
#+begin_src emacs-lisp
(setq initial-scratch-message nil)
(setq initial-buffer-choice nil)
(add-hook 'emacs-startup-hook
(lambda ()
(when (and (get-buffer "*scratch*")
(not (eq (current-buffer) (get-buffer "*scratch*"))))
(kill-buffer "*scratch*"))))
#+end_src
** Fix Indents + Enable Autopairs
#+begin_src emacs-lisp
(electric-indent-mode 1)
(electric-pair-mode 1)
(setq c-basic-offset 2)
(setq-default indent-tabs-mode nil)
(use-package evil
:ensure t
:init
(setq evil-split-window-below t)
(setq evil-undo-system 'undo-tree)
(setq evil-vsplit-window-right t)
(setq evil-want-C-i-jump nil)
(setq evil-want-C-u-scroll t)
(setq evil-want-integration t)
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
:config
(evil-mode 1))
(use-package eglot
:hook (emacs-lisp-mode . eglot-ensure))
(use-package catppuccin-theme
:ensure t
:demand t
:config
(load-theme 'catppuccin t))
(setq auto-save-default nil)
(setq make-backup-files nil)
#+end_src