aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el50
1 files changed, 30 insertions, 20 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 042a044..df7a5c9 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1,3 +1,12 @@
+;; Make startup faster by reducing frequency of garbage collection.
+(setq gc-cons-percentage 0.6)
+(setq gc-cons-threshold most-positive-fixnum)
+;; Make gc pauses faster by decreasing the threhold to 8 MiB (default is
+;; 800kB)
+(add-hook 'emacs-startup-hook
+ (lambda ()
+ (setq gc-cons-threshold (expt 2 23))))
+
;; Set up package.el to work with MELPA
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
@@ -9,6 +18,7 @@
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
(setq-default fill-column 72)
+(menu-bar-mode -1)
(setq recentf-max-saved-items 100)
@@ -44,43 +54,44 @@
;; ledger-mode
(use-package ledger-mode
+ :mode (("\\.journal$" . ledger-mode))
:config
- (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))
+ (add-hook 'ledger-mode-hook
+ (setq-local tab-always-indent 'complete)
+ (setq-local completion-cycle-threshold t)))
;; Company Mode
(use-package company
:init
- (setq company-global-modes '(emacs-lisp-mode go-mode))
+ (setq company-global-modes
+ '(emacs-lisp-mode go-mode ledger-mode))
:hook ((after-init . global-company-mode)))
;; Projectile
(use-package projectile
+ :init
+ (evil-define-key 'normal projectile-mode-map
+ (kbd "<leader>p") 'projectile-command-map)
:config
(setq projectile-cache-file (expand-file-name ".cache/projectile" user-emacs-directory))
- (projectile-mode 1)
- (evil-define-key 'normal projectile-mode-map
- (kbd "<leader>p") 'projectile-command-map))
+ (projectile-mode 1))
(use-package counsel
:after evil
+ :init
+ (evil-define-key 'normal ivy-mode-map
+ (kbd "<leader>fb") 'ivy-switch-buffer
+ (kbd "<leader>fm") 'counsel-recentf)
:config
(ivy-mode 1)
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) ")
(setq ivy-re-builders-alist
'((read-file-name-internal . ivy--regex-fuzzy)
- (t . ivy--regex-plus)))
- (evil-define-key 'normal ivy-mode-map
- (kbd "<leader>fb") 'ivy-switch-buffer
- (kbd "<leader>fm") 'counsel-recentf))
+ (t . ivy--regex-plus))))
(use-package vterm
+ :commands (vterm)
:config
(setq vterm-kill-buffer-on-exit t))
@@ -91,9 +102,9 @@
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:init
- (setq markdown-command "multimarkdown")
(evil-define-key 'normal markdown-mode-map
- (kbd "<RET>") 'markdown-follow-link-at-point))
+ (kbd "<RET>") 'markdown-follow-link-at-point)
+ (setq markdown-command "multimarkdown"))
(use-package exec-path-from-shell
:if (memq window-system '(mac ns))
@@ -109,7 +120,6 @@
(use-package avy)
-(use-package dashboard
+(use-package esup
:ensure t
- :config
- (dashboard-setup-startup-hook))
+ :pin melpa)