aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-misc.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-misc.el')
-rw-r--r--.emacs.d/lisp/init-misc.el136
1 files changed, 38 insertions, 98 deletions
diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el
index 35e9756..56e8a2c 100644
--- a/.emacs.d/lisp/init-misc.el
+++ b/.emacs.d/lisp/init-misc.el
@@ -23,106 +23,46 @@
`((".*" "~/.emacs.d/backups/" t)))
(setq-default fill-column 72)
-(menu-bar-mode -1)
-(xterm-mouse-mode 1) ;; Enable mouse
-(tool-bar-mode -1)
-(toggle-scroll-bar -1)
-(global-auto-revert-mode t)
-(global-so-long-mode 1)
+(setq-default
+ recentf-max-saved-items 1024
+ recentf-exclude `("/tmp/"))
+(setq show-paren-when-point-inside-paren t
+ show-paren-when-point-in-periphery t)
-(add-hook 'after-init-hook #'global-hl-line-mode)
(add-hook 'prog-mode-hook #'hs-minor-mode) ;; allow folding
-
-(fset 'yes-or-no-p 'y-or-n-p)
-
-(use-package paren
- :ensure nil
- :init
- (add-hook 'after-init-hook #'show-paren-mode)
- :config
- (setq show-paren-when-point-inside-paren t
- show-paren-when-point-in-periphery t))
-
-(use-package atom-one-dark-theme
- :ensure t
- :config
- (load-theme 'atom-one-dark t))
-(set-face-attribute 'default nil :height 130)
-
-(use-package which-key
- :ensure t
- :config
- (which-key-mode))
-
-(use-package undo-tree
- :config
- (global-undo-tree-mode))
-
-(use-package recentf
- :ensure nil
- :init
- (add-hook 'after-init-hook 'recentf-mode)
- :config
- (setq-default
- recentf-max-saved-items 1024
- recentf-exclude `("/tmp/")))
-
-(use-package counsel
- :after evil
- :init
- (evil-define-key 'normal ivy-mode-map
- (kbd "<leader>fb") 'ivy-switch-buffer
- (kbd "<leader>fm") 'counsel-recentf
- (kbd "<leader>fc") 'counsel-M-x
- (kbd "<leader>fl") 'swiper)
- (global-set-key (kbd "C-c C-r") 'ivy-resume)
- :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))))
-
-(use-package exec-path-from-shell
- :if (memq window-system '(mac ns))
- :ensure t
- :config
- (setq exec-path-from-shell-arguments '("-l"))
+(add-hook 'after-init-hook
+ (lambda ()
+ (global-hl-line-mode)
+ (menu-bar-mode -1)
+ (xterm-mouse-mode 1) ;; Enable mouse
+ (tool-bar-mode -1)
+ (toggle-scroll-bar -1)
+ (global-auto-revert-mode t)
+ (global-so-long-mode 1)
+ (recentf-mode)
+ (show-paren-mode)
+ (fset 'yes-or-no-p 'y-or-n-p)))
+
+(use-package avy :ensure t :defer t)
+(use-package rg :ensure t :defer t)
+(use-package esup :ensure t :defer t)
+
+;; appearance
+(use-package atom-one-dark-theme :ensure t :defer t)
+(add-hook 'after-init-hook
+ (lambda ()
+ (load-theme 'atom-one-dark t)
+ (set-face-attribute 'default nil :height 130)))
+
+(use-package which-key :ensure t :defer t)
+(add-hook 'after-init-hook 'which-key-mode)
+
+(use-package undo-tree :ensure t :defer t)
+(add-hook 'after-init-hook 'global-undo-tree-mode)
+
+(use-package exec-path-from-shell :ensure t :defer t)
+(setq exec-path-from-shell-arguments '("-l"))
+(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
-(use-package avy
- :ensure t)
-
-(use-package company
- :init
- (setq company-global-modes
- '(emacs-lisp-mode go-mode ledger-mode sh-mode c++-mode))
- :hook ((after-init . global-company-mode))
- :config
- (setq company-minimum-prefix-length 1
- company-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.3))))
-
-(use-package projectile
- :init
- (setq projectile-cache-file (expand-file-name ".cache/projectile" user-emacs-directory)
- projectile-require-project-root nil)
- :config
- (projectile-mode 1))
-
-(with-eval-after-load 'evil
- (evil-define-key 'normal projectile-mode-map
- (kbd "<leader>p") 'projectile-command-map
- (kbd "<leader>ff") 'projectile-find-file
- (kbd "<leader>fr") 'projectile-ripgrep))
-
-(use-package rg
- :ensure t
- :commands (rg rg-menu))
-
-(use-package esup
- :ensure t
- :defer t
- :commands (esup))
-
(provide 'init-misc)