#+TITLE: Emacs Configuration from [[https://gitlab.com/TuDatTr/][TuDatTr]]
#+OPTIONS: n:t

* Package installation
** Preperation
   Initialize Emacs builtin package system and add the [[https://melpa.org][melpa]]-package repository.

   #+BEGIN_SRC emacs-lisp
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
   #+END_SRC

** 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.

    #+BEGIN_SRC emacs-lisp
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(require 'use-package)
(setq use-package-always-ensure t)
    #+END_SRC

*** 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=

    #+BEGIN_SRC emacs-lisp
(use-package diminish)
    #+END_SRC

*** no-littering
    ~Help keeping ~/.emacs.d clean~

    #+BEGIN_SRC emacs-lisp
(use-package no-littering)
    #+END_SRC

*** 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.

    #+BEGIN_SRC emacs-lisp
(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))
    #+END_SRC

*** 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.

    #+BEGIN_SRC emacs-lisp
(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)))
    #+END_SRC
    
*** org-bullets
    ~utf-8 bullets for org-mode~

    #+BEGIN_SRC emacs-lisp
(use-package org-bullets)
    #+END_SRC

* 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!~

   #+BEGIN_SRC emacs-lisp
(use-package moe-theme
  :config
  (moe-dark))
   #+END_SRC


** 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.

   #+BEGIN_SRC emacs-lisp
(add-hook 'window-setup-hook
      '(lambda ()
	 (set-face-background 'default "unspecified-bg")))
   #+END_SRC

** Menubar

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

   #+BEGIN_SRC emacs-lisp
(menu-bar-mode -1)
   #+END_SRC

* Org Mode
  Always unfold every section in org files.

  #+BEGIN_SRC emacs-lisp
(add-hook 'org-mode-hook #'org-show-all)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
  #+END_SRC
