2020-10-24 06:12:37 +02:00
|
|
|
#+TITLE: Emacs Configuration from [[https://gitlab.com/TuDatTr/][TuDatTr]]
|
2018-01-10 03:56:51 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
* Package installation
|
|
|
|
** Preperation
|
2020-10-24 06:16:56 +02:00
|
|
|
Initialize Emacs builtin package system and add the [[https://melpa.org][melpa]]-package repository.\
|
2020-10-24 06:12:37 +02:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2018-01-10 06:33:52 +01:00
|
|
|
(require 'package)
|
2020-10-24 06:12:37 +02:00
|
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
2018-01-14 12:25:14 +01:00
|
|
|
(package-initialize)
|
2020-10-24 06:12:37 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
** Package installation
|
|
|
|
*** use-package
|
2020-10-24 06:16:56 +02:00
|
|
|
~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.\
|
2020-10-24 06:12:37 +02:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2018-01-14 12:25:14 +01:00
|
|
|
(unless (package-installed-p 'use-package)
|
|
|
|
(package-refresh-contents)
|
|
|
|
(package-install 'use-package))
|
|
|
|
|
|
|
|
(require 'use-package)
|
|
|
|
(setq use-package-always-ensure t)
|
2020-10-24 06:12:37 +02:00
|
|
|
#+END_SRC
|
2018-01-14 12:25:14 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
*** diminish
|
2020-10-24 06:16:56 +02:00
|
|
|
~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=\
|
2018-01-19 06:50:57 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package diminish)
|
|
|
|
#+END_SRC
|
2018-05-27 18:52:35 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
*** no-littering
|
2020-10-24 06:16:56 +02:00
|
|
|
~Help keeping ~/.emacs.d clean~\
|
2018-01-10 06:33:52 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package no-littering)
|
|
|
|
#+END_SRC
|
2018-01-10 06:33:52 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
*** evil/evil-collection
|
2020-10-24 06:16:56 +02:00
|
|
|
~The extensible vi layer for Emacs.~\
|
|
|
|
~A set of keybindings for evil-mode~\
|
|
|
|
Vim keybindings for emacs to get the best of both worlds.\
|
2018-01-10 06:33:52 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package evil
|
|
|
|
:init
|
|
|
|
(setq evil-want-keybinding nil)
|
|
|
|
:config
|
|
|
|
(evil-mode 1)
|
|
|
|
(setq evil-search-module 'evil-search))
|
2018-01-14 12:25:14 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
(use-package evil-collection
|
|
|
|
:config
|
|
|
|
(evil-collection-init))
|
|
|
|
#+END_SRC
|
2018-03-15 11:32:26 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
*** 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.
|
2018-03-15 11:32:26 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package prescient)
|
2018-06-24 13:25:59 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
(use-package ivy-prescient
|
|
|
|
:config
|
|
|
|
(ivy-prescient-mode 1))
|
2018-06-24 13:25:59 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
(use-package ivy)
|
2018-01-10 06:33:52 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
(use-package counsel
|
|
|
|
:diminish counsel-mode
|
|
|
|
:config
|
|
|
|
(counsel-mode 1))
|
2018-04-29 23:13:10 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
(use-package swiper
|
|
|
|
:bind (("C-s" . 'swiper)))
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** org-bullets
|
2020-10-24 06:16:56 +02:00
|
|
|
~utf-8 bullets for org-mode~\
|
2018-04-05 09:46:48 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package org-bullets)
|
|
|
|
#+END_SRC
|
2018-04-29 23:13:10 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
* Appearance
|
2020-10-24 06:16:56 +02:00
|
|
|
This section is for appearance customization. Either via packages or manually.\
|
2018-01-10 06:33:52 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
** moe-theme
|
2020-10-24 06:16:56 +02:00
|
|
|
~A customizable colorful eye-candy theme for Emacser. Moe, moe, kyun!~\
|
2018-01-13 15:29:33 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package moe-theme
|
|
|
|
:config
|
|
|
|
(moe-dark))
|
|
|
|
#+END_SRC
|
2018-01-22 16:34:03 +01:00
|
|
|
|
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
** Transparent Emacs
|
2020-10-24 06:16:56 +02:00
|
|
|
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.\
|
2018-01-31 04:23:36 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'window-setup-hook
|
2018-04-29 23:13:10 +02:00
|
|
|
'(lambda ()
|
2020-10-24 06:12:37 +02:00
|
|
|
(set-face-background 'default "unspecified-bg")))
|
|
|
|
#+END_SRC
|
2018-04-05 09:46:48 +02:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
** Menubar
|
2018-01-31 04:23:36 +01:00
|
|
|
|
2020-10-24 06:16:56 +02:00
|
|
|
Remove the menu-bar at the top of the screen for better immersion.\
|
2018-01-13 15:29:33 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
#+END_SRC
|
2018-01-13 15:29:33 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
* Org Mode
|
2020-10-24 06:16:56 +02:00
|
|
|
Always unfold every section in org files.\
|
2018-01-19 06:50:57 +01:00
|
|
|
|
2020-10-24 06:12:37 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'org-mode-hook #'org-show-all)
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
|
|
|
#+END_SRC
|