blob: 141702e181383d64c1ef93a98ef3c9e1f5979a2b (
plain)
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
|
;; Set up package.el to work with MELPA
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(dolist (package '(use-package))
(unless (package-installed-p package)
(package-install package)))
(require 'use-package)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(evil-escape counsel evil-org paredit auto-complete ledger-mode evil)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(when (version<= "26.0.50" emacs-version)
(global-display-line-numbers-mode))
(xterm-mouse-mode 1) ;; Enable mouse
;; Evil
(unless (package-installed-p 'evil)
(package-install 'evil))
(require 'evil)
(evil-mode 1)
(evil-set-leader 'normal ",")
;; Evil escape
(unless (package-installed-p 'evil-escape)
(package-install 'evil-escape))
(require 'evil-escape)
(evil-escape-mode)
(setq-default
evil-escape-key-sequence "jk"
evil-escape-unordered-key-sequence t)
;; Org Mode
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
(use-package evil-org
:ensure t
:after org
:hook (org-mode . (lambda () evil-org-mode))
:config
(require 'evil-org-agenda)
(evil-org-agenda-set-keys))
;; ledger-mode
(unless (package-installed-p 'ledger-mode)
(package-install 'ledger-mode))
(require 'ledger-mode)
(add-to-list 'auto-mode-alist '("\\.journal$" . ledger-mode))
(add-hook 'ledger-mode-hook
(lambda ()
(setq-local tab-always-indent 'complete)
(setq-local completion-cycle-threshold t)
(setq-local ledger-complete-in-steps t)))
(setq ledger-highlight-xact-under-point nil)
;; Auto-Complete
(unless (package-installed-p 'auto-complete)
(package-install 'auto-complete))
(require 'auto-complete)
(ac-config-default)
;; Par Edit
(unless (package-installed-p 'paredit)
(package-install 'paredit))
(require 'paredit)
(add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode 1)))
;; Counsel
(unless (package-installed-p 'counsel)
(package-install 'counsel))
(ivy-mode)
(setq ivy-use-virutal-buffers t)
(setq enable-recursive-minibuffers t)
(evil-define-key 'normal 'global (kbd "<leader>ff") 'counsel-find-file)
(evil-define-key 'normal 'global (kbd "go") 'counsel-git-grep)
|