Files
config/emacs/init.el
T
2026-08-04 18:05:14 -04:00

87 lines
2.1 KiB
EmacsLisp

(setq-local uconf-font-name "Iosevka")
(setq custom-file
(file-name-concat
(file-name-directory user-init-file) "custom.el"))
(setq inhibit-startup-screen t)
(setq display-line-numbers-type 'relative)
(menu-bar-mode 0)
(tool-bar-mode 0)
(global-display-line-numbers-mode)
(ido-mode 1)
(ido-everywhere 1)
(fido-mode 1)
(show-paren-mode 1)
(column-number-mode 1)
(whitespace-mode 1)
(split-window-right)
(keymap-global-set "C-." 'other-window)
(keymap-global-set "C-c c" 'compile)
(keymap-global-set "C-c x" 'recompile)
(require 'compile)
(add-to-list
'compilation-error-regexp-alist-alist
'(paren-style
"^\\([^(\n]+\\)(\\([0-9]+\\)[,:]\\([0-9]+\\))"
1 2 3))
(add-to-list 'compilation-error-regexp-alist 'paren-style)
(defvar xdg-cache-dir
(or (getenv "XDG_CACHE_HOME")
(expand-file-name "~/.cache")))
(setq auto-save-file-name-transforms
`((".*" ,(expand-file-name "emacs/autosaves/" xdg-cache-dir) t)))
(setq backup-directory-alist
`(("." . ,(expand-file-name "emacs/backups/" xdg-cache-dir))))
(setq lock-file-name-transforms
`((".*" ,(expand-file-name "emacs/lockfiles/" xdg-cache-dir) t)))
(dolist (dir '("autosaves" "backups" "lockfiles"))
(make-directory (expand-file-name (concat "emacs/" dir) xdg-cache-dir) t))
(use-package paredit
:ensure t
:hook ((emacs-lisp-mode
lisp-mode
clojure-mode
scheme-mode
racket-mode) . paredit-mode)
:config
(setq paredit-everywhere t))
(use-package multiple-cursors
:ensure t
:bind (("C->" . mc/mark-next-like-this)
("C-S-c C-S-c" . mc/edit-lines)
("C-<" . mc/mark-previous-like-this)
("C-c C->" . mc/mark-all-like-this)))
(use-package modus-themes
:ensure t
:config
(load-theme 'modus-vivendi-tinted t))
(set-face-attribute 'default nil :height 140)
(when (find-font (font-spec
:family uconf-font-name))
(set-face-attribute 'default nil
:font uconf-font-name))
(require 'eglot)
(add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd"))
(add-hook 'c-mode-hook 'eglot-ensure)
(add-hook 'c++-mode-hook 'eglot-ensure)
(use-package magit
:ensure t
:bind (("C-x g" . magit-status)))
(load-file custom-file)