dotfiles/emacs/.emacs.d/config.org

3.1 KiB

Emacs Configuration from TuDatTr

Package installation

Preperation

Initialize Emacs builtin package system and add the melpa-package repository.\

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

Package installation

use-package

~A use-package declaration for simplifying your .emacs~\ The following snippets uses use-package to automatically install the specified packages if they aren't installed yet.\

(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))

(require 'use-package)
(setq use-package-always-ensure t)

diminish

~Diminished modes are minor modes with no modeline display~\ Diminish is used to hide modes from the mode bar in emacs. It's also required to use the diminish function in =use-package=\

(use-package diminish)

no-littering

~Help keeping ~/.emacs.d clean~\

(use-package no-littering)

evil/evil-collection

~The extensible vi layer for Emacs.~\ ~A set of keybindings for evil-mode~\ Vim keybindings for emacs to get the best of both worlds.\

(use-package evil
:init
(setq evil-want-keybinding nil)
:config
(evil-mode 1)
(setq evil-search-module 'evil-search))

(use-package evil-collection
:config
(evil-collection-init))

Ivy/Counsil/Swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man! Simply a interface for completion/search in emacs.

(use-package prescient)

(use-package ivy-prescient
:config
(ivy-prescient-mode 1))

(use-package ivy)

(use-package counsel  
:diminish counsel-mode
:config
(counsel-mode 1))

(use-package swiper
:bind (("C-s" . 'swiper)))

org-bullets

~utf-8 bullets for org-mode~\

(use-package org-bullets)

Appearance

This section is for appearance customization. Either via packages or manually.\

moe-theme

~A customizable colorful eye-candy theme for Emacser. Moe, moe, kyun!~\

(use-package moe-theme
:config
(moe-dark))

Transparent Emacs

Makes the default color of the background of emacs the same as the terminals color.\ This is kind of a janky solution, but it works.\ It doesn't work when you reload the config manually while emacs is running.\

(add-hook 'window-setup-hook
   '(lambda ()
(set-face-background 'default "unspecified-bg")))

Menubar

Remove the menu-bar at the top of the screen for better immersion.\

(menu-bar-mode -1)

Org Mode

Always unfold every section in org files.\

(add-hook 'org-mode-hook #'org-show-all)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))