-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.el
107 lines (88 loc) · 3.74 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
;;; init --- My custom init file
;;; Commentary:
;; Future features / packages to look into
;; TODO: pomidor
;; TODO: docker tramp
;; TODO: kubernets porcelain
;; TODO: dired extensions
;; TODO: itunes in hydra
;; FIXME: Electric pair mode in JS is shite
;; TODO: web mode for HTML and EJS etc
;; TODO: format all popup buffer looks shit
;; FIXME: `comment-or-uncoment-region' is broken
;; TODO: Write imenu module for JSON navigation
;;; Code:
(let ((file-name-handler-alist nil))
;; Set GC threshold to speed up start time
(setq gc-cons-threshold 100000000)
;; Init files
(setq-default user-init-file "~/.emacs.d/init.el")
(setq-default custom-file "~/.emacs.d/custom.el")
(setq-default package-user-dir "~/.emacs.d/etc/packages")
(load-file "~/.emacs.d/custom.el")
;; Bootup mode
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(eval-when-compile
(setq use-package-always-ensure t
use-package-enable-imenu-support t)
(require 'use-package))
(use-package exec-path-from-shell
:if (memq window-system '(mac ns))
:commands (exec-path-from-shell-getenvs
exec-path-from-shell-setenv)
:config
(setq exec-path-from-shell-debug t)
(add-to-list 'exec-path-from-shell-variables "NVM_BIN")
(add-to-list 'exec-path-from-shell-variables "GOPATH")
(add-to-list 'exec-path-from-shell-variables "GEM_PATH")
:hook (emacs-startup . (lambda () (let ((inhibit-message t))
(exec-path-from-shell-initialize)))))
(use-package restart-emacs
:commands (restart-emacs)
:bind (("<s-kp-delete>" . kill-emacs)
("<S-s-kp-delete>" . restart-emacs)))
(use-package hide-mode-line
:hook ((dashboard-mode lsp-ui-imenu-mode help-mode helpful-mode rg-mode reb-mode) . hide-mode-line-mode))
(use-package esup :commands (esup))
(use-package auto-package-update
:disabled ; Seems to not read from MELPA
:config
(setq auto-package-update-interval 7
auto-package-update-delete-old-versions t
auto-package-update-hide-results t)
(auto-package-update-maybe))
(use-package no-littering)
(use-package try :commands (try))
(bind-keys :prefix-map core-mode-map :prefix "C-c C-c" :prefix-docstring "Clean whitespace or copy strings")
(bind-keys :prefix-map change-view-map :prefix "C-c v" :prefix-docstring "Modify the view of the buffer")
(bind-keys :prefix-map question-map :prefix "C-c /" :prefix-docstring "Prefix for asking questions")
(bind-keys :prefix-map avy-map :prefix "C-x C-x" :prefix-docstring "Avy navigation")
;; Load core modules
(use-package ui :load-path "core")
(use-package vcs :load-path "core")
(use-package linting :load-path "core")
(use-package editing :load-path "core")
(use-package snippets :load-path "core")
(use-package completion :load-path "core")
(use-package navigation :load-path "core")
;; ;; Load language modes
(use-package go :load-path "modes" :disabled)
(use-package web :load-path "modes")
(use-package rust :load-path "modes" :disabled)
(use-package ruby :load-path "modes" :disabled)
(use-package elisp :load-path "modes" :disabled)
(use-package clojure :load-path "modes" :disabled)
(use-package scheme-lang :load-path "modes" :disabled)
(global-set-key (kbd "s-O") '(lambda () (interactive) (find-file "~/workspace/recharge-eevee/src/app.jsx")))
;; custom settings
(fset 'yes-or-no-p 'y-or-n-p)
(bind-keys
("M-£" . (lambda () (interactive) (insert "#")))
("M-*" . (lambda () (interactive) (insert "•")))
("M-RET" . hippie-expand))
)
(provide 'init)
;;; init.el ends here
(put 'upcase-region 'disabled nil)