Created
March 29, 2024 02:39
-
-
Save emhoracek/5f0ccd85f64c1460a9ca1071e4374efe to your computer and use it in GitHub Desktop.
emacs config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Personal configuration -*- lexical-binding: t -*- | |
;; Save the contents of this file under ~/.emacs.d/init.el | |
;; Do not forget to use Emacs' built-in help system: | |
;; Use C-h C-h to get an overview of all help commands. All you | |
;; need to know about Emacs (what commands exist, what functions do, | |
;; what variables specify), the help system can provide. | |
;; Add the NonGNU ELPA package archive | |
(require 'package) | |
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")) | |
(unless package-archive-contents (package-refresh-contents)) | |
;; Load a custom theme | |
(load-theme 'tsdh-light t) | |
;; Set default font face | |
(set-face-attribute 'default nil :font "Noto Mono Regular") | |
;; Disable the menu bar | |
(menu-bar-mode -1) | |
;; Disable the tool bar | |
(tool-bar-mode -1) | |
;; Disable the scroll bars | |
(scroll-bar-mode -1) | |
;;; Completion framework | |
(unless (package-installed-p 'vertico) | |
(package-install 'vertico)) | |
;; Enable completion by narrowing | |
(vertico-mode t) | |
;; Enable line numbering in `prog-mode' | |
(add-hook 'prog-mode-hook #'display-line-numbers-mode) | |
;; Automatically pair parentheses | |
(electric-pair-mode t) | |
;;; Haskell Support | |
(unless (package-installed-p 'haskell-mode) | |
(package-install 'haskell-mode)) | |
;;; YAML Support | |
(unless (package-installed-p 'yaml-mode) | |
(package-install 'yaml-mode)) | |
;;; Markdown support | |
(unless (package-installed-p 'markdown-mode) | |
(package-install 'markdown-mode)) | |
;;; Outline-based notes management and organizer | |
;;; Additional Org-mode related functionality | |
(unless (package-installed-p 'org-contrib) | |
(package-install 'org-contrib)) | |
;; Miscellaneous options | |
(setq-default major-mode | |
(lambda () ; guess major mode from file name | |
(unless buffer-file-name | |
(let ((buffer-file-name (buffer-name))) | |
(set-auto-mode))))) | |
(setq confirm-kill-emacs #'yes-or-no-p) | |
(setq window-resize-pixelwise t) | |
(setq frame-resize-pixelwise t) | |
(save-place-mode t) | |
(savehist-mode t) | |
(recentf-mode t) | |
(defalias 'yes-or-no #'y-or-n-p) | |
;; Store automatic customisation options elsewhere | |
(setq custom-file (locate-user-emacs-file "custom.el")) | |
(when (file-exists-p custom-file) | |
(load custom-file)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment