.emacs.d/init.el

116 lines
2.9 KiB
EmacsLisp
Raw Normal View History

2021-01-28 21:26:52 +00:00
;; decrease startup time by deferring gc
(setq gc-cons-threshold 100000000)
;; I call package-initialize manually, disable automatic initialization:
(setq package-enable-at-startup nil)
2020-12-07 21:09:35 +00:00
;; Packages
(load "~/.emacs.d/packages.el")
;; Convenient functions
(load "~/.emacs.d/functions.el")
2020-12-10 21:42:07 +00:00
;; Tab width
(setq-default tab-width 4)
2020-12-07 21:09:35 +00:00
;; Remove useless stuff
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)
2020-12-24 11:27:57 +00:00
;; UTF-8!!!!
(set-language-environment "UTF-8")
2020-12-07 21:09:35 +00:00
;; Appearance
2021-01-28 21:26:52 +00:00
(set-frame-font "Terminus 12")
2020-12-08 21:14:05 +00:00
(set-face-italic 'font-lock-comment-face nil) ; disable italics
2020-12-07 21:09:35 +00:00
; theme set in packages.el
(global-linum-mode)
(blink-cursor-mode nil)
(when window-system (global-hl-line-mode t))
(show-paren-mode t)
;; Mode line
(line-number-mode t)
(column-number-mode t)
(setq display-time-24hr-format t)
(display-time-mode t)
2020-12-30 00:08:12 +00:00
;; disable creation of backup files
(setq make-backup-files nil)
(setq auto-save-default nil)
2020-12-07 21:09:35 +00:00
;; Y or N instead of Yes or No
(defalias 'yes-or-no-p 'y-or-n-p)
;; Smaller skips when cursor reaches end of screen
(setq scroll-conservatively 100)
;; Disable bell
(setq ring-bell-function 'ignore)
;; Subword for camelCase words
(global-subword-mode t)
;; Electric pair mode
(setq electric-pair-pairs '((?\( . ?\))
2020-12-30 00:08:12 +00:00
(?\[ . ?\])
(?\{ . ?\})
(?\" . ?\")
))
2020-12-07 21:09:35 +00:00
(electric-pair-mode t)
2021-01-28 21:26:52 +00:00
(setq user-mail-address "opfez@disroot.org")
(setq user-full-name "opFez")
(setq add-log-mailing-address "opfez@disroot.org")
2020-12-07 21:09:35 +00:00
;; windmove
(global-set-key (kbd "C-:") 'windmove-left)
(global-set-key (kbd "C-|") 'windmove-right)
(global-set-key (kbd "C-{") 'windmove-up)
(global-set-key (kbd "C-\"") 'windmove-down)
;; Terminal
(defvar term-shell "/bin/zsh")
(defadvice ansi-term (before force-bash)
(interactive (list term-shell)))
(ad-activate 'ansi-term)
2020-12-08 14:12:05 +00:00
;; C configuration
2020-12-08 21:14:05 +00:00
(setq c-default-style "linux"
c-basic-offset 4)
2020-12-08 14:12:05 +00:00
2021-01-28 21:26:52 +00:00
;; Scheme configuration
(setq geiser-active-implementations '(chicken))
(add-hook 'geiser-mode-hook
(lambda () (local-set-key (kbd "C-c C-l") #'run-chicken)))
2020-12-10 21:42:07 +00:00
;; Disable bold fonts
(mapc
(lambda (face)
(set-face-attribute face nil :weight 'normal))
(face-list))
2020-12-30 00:08:12 +00:00
;; Eshell
(defalias 'open 'find-file-other-window)
(defalias 'clean 'eshell/clear-scrollback)
2020-12-07 21:09:35 +00:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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.
2020-12-08 21:14:05 +00:00
'(package-selected-packages
2021-01-28 21:26:52 +00:00
'(rust-mode paredit geiser forth-mode avy swiper auto-package-update magit expand-region go-mode tao-themes tao-theme almost-mono-themes use-package)))
2020-12-07 21:09:35 +00:00
(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.
)
;;
2020-12-24 11:27:57 +00:00
(put 'downcase-region 'disabled nil)