commit 2f10047925d320a883b584c8c92f2456484b6077 Author: Fr3deric Date: Wed Feb 12 23:22:32 2020 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c7bbeaa --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +elpa/ +auto-save-list/ +transient/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..982255b --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Emacs Configuration + +This is an attempt to learn about Emacs and its ecosystem by creating a custom configuration from scratch. + +## Installation + + 1. clone this repository to `~/.emacs.d` + 1. call `~/.emacs.d/install-packages.el` + 1. start Emacs, press `M-x` and execute the `all-the-icons-install-fonts` command + +## TODO + + * (semi-)automatically install missing packages (e.g. with `use-package`?) + * surround commnd as in *Spacemacs* + * improve completion/navigation when chosing files + * find a buffer switcher + * hilight trailing whitespace + * configure custom (?) menus (with leader key) for things: + * toggle features (fci, whitespace-mode, ...) + * disable welcome buffer (or put something funnt there) + diff --git a/init.el b/init.el new file mode 100644 index 0000000..9b60499 --- /dev/null +++ b/init.el @@ -0,0 +1,69 @@ + +;; https://www.reddit.com/r/emacs/comments/53zpv9/how_do_i_get_emacs_to_stop_adding_custom_fields/ +;; prevent Emacs from automatically modifying this file +(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) +(when (file-exists-p custom-file) + (load custom-file)) + +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) +(package-initialize) + +(add-to-list 'load-path "~/.emacs.d/emacs-which-key") +(require 'which-key) +(which-key-setup-side-window-bottom) +(setq which-key-show-early-on-C-h t) +(which-key-mode) + +;;(add-to-list 'load-path "~/.emacs.d/evil") +(require 'evil) +(evil-mode 1) + +(global-set-key (kbd "C-x g") 'magit-status) + +(require 'evil-magit) + +;; display line and column number in mode line +(setq line-number-mode t) +(setq column-number-mode t) + +;; display line numbers on the left +(global-display-line-numbers-mode) + +;; indicate changed lines in version-controlled files +(global-diff-hl-mode) + +(add-hook 'prog-mode-hook #'rainbow-delimiters-mode) + +(require 'fill-column-indicator) +(add-hook 'prog-mode-hook #'fci-mode) + +;; package-refresh-contents fails to refresh the 'gnu' archive and also +;; package-install can't download some packages/dependencies when TLS1.3 is +;; enabled +;; TODO: verify this and/or find a better solution +(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") + +;; disable native dialog boxes +(setq use-dialog-box nil) +(when (bound-and-true-p tooltip-mode) + (tooltip-mode -1)) + +;; disable standard GUI +(menu-bar-mode 0) +(tool-bar-mode 0) +(scroll-bar-mode 0) + +(require 'doom-modeline) +(doom-modeline-mode 1) + +(require 'doom-themes) + (setq doom-themes-enable-bold t + doom-themes-enable-italic t) + (load-theme 'doom-one t) + (doom-themes-visual-bell-config) + (doom-themes-neotree-config) + (setq doom-themes-treemacs-theme "doom-colors") + (doom-themes-treemacs-config) + (doom-themes-org-config) + diff --git a/install-packages.el b/install-packages.el new file mode 100755 index 0000000..a5f5bf9 --- /dev/null +++ b/install-packages.el @@ -0,0 +1,29 @@ +#!/usr/bin/emacs --script + +;; package-refresh-contents fails to refresh the 'gnu' archive and also +;; package-install can't download some packages/dependencies when TLS1.3 is +;; enabled +;; TODO: verify this and/or find a better solution +(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") + +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) +(package-initialize) + +(package-refresh-contents) + +(package-install 'treemacs-evil) +(package-install 'treemacs) +(package-install 'fill-column-indicator) +(package-install 'rainbow-delimiters) +(package-install 'diff-hl) +(package-install 'evil-magit) +(package-install 'magit) +(package-install 'evil) +(package-install 'doom-themes) +(package-install 'doom-modeline) +(package-install 'which-key) + +;; prompts for font installation directory +;;(all-the-icons-install-fonts t) +