diff options
Diffstat (limited to 'emacs/init.el')
| -rw-r--r-- | emacs/init.el | 73 |
1 files changed, 46 insertions, 27 deletions
diff --git a/emacs/init.el b/emacs/init.el index 29a39fc..c4d0db7 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -141,16 +141,16 @@ '(helm-minibuffer-history-key "M-p") '(menu-bar-mode nil) '(package-selected-packages - '(2048-game all-the-icons-completion amsreftex auctex benchmark-init - bongo buffer-move cape chinese-conv cmake-mode - company-go corfu corfu-terminal counsel-projectile - cuda-mode dockerfile-mode doom-modeline dumb-jump eat - edit-indirect eglot embark-consult ement - emms-player-simple-mpv emms-state esh-help - eshell-fringe-status eshell-vterm esup evil-collection - evil-easymotion evil-snipe evil-surround - exwm-firefox-evil exwm-modeline eyebrowse fish-mode - flycheck-aspell flymake-aspell + '(2048-game all-the-icons-completion amsreftex auctex balanced-windows + benchmark-init bongo buffer-move cape chinese-conv + cmake-mode company-go corfu corfu-terminal + counsel-projectile cuda-mode dockerfile-mode + doom-modeline dumb-jump eat edit-indirect eglot + embark-consult ement emms-player-simple-mpv emms-state + esh-help eshell-fringe-status eshell-vterm esup + evil-collection evil-easymotion evil-snipe + evil-surround exwm-firefox-evil exwm-modeline eyebrowse + fish-mode flycheck-aspell flymake-aspell flymake-diagnostic-at-point fold-this folding free-keys frog-jump-buffer gdscript-mode gxref haskell-mode helm-exwm helm-hoogle highlight hindent hl-todo @@ -164,7 +164,7 @@ simple-httpd spell-fu telephone-line tempel tree-sitter-langs treemacs treemacs-evil vertico-prescient vimgolf visible-mark volume which-key - workgroups yaml-mode)) + winum workgroups yaml-mode)) '(pyim-assistant-scheme 'cangjie) '(safe-local-variable-values '((LEXICAL-binding . t))) '(scroll-bar-mode nil) @@ -203,6 +203,10 @@ (setq-default proced-auto-update-interval 1) ;; always auto update proced +;; this is to avoid loading evil entirely, and ease some of the +;; internconnection complexity of the config +(setq want-evil t) + ;; -------------------------------------------------------------------- ;; external packages @@ -242,7 +246,7 @@ ("C-h B" . embark-bindings) ;; alternative for `describe-bindings' ) :init - (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target) + ;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target) :config ;; Hide the mode line of the Embark live/completions buffers (add-to-list 'display-buffer-alist @@ -275,9 +279,9 @@ (use-package corfu-terminal :init - ;; (corfu-terminal-mode 1) + (corfu-terminal-mode 1) :custom - (corfu-terminal-disable-on-gui nil)) + (corfu-terminal-disable-on-gui t)) (use-package cape ;; extend completion frameworks @@ -286,16 +290,14 @@ (advice-add 'pcomplete-completions-at-point :around 'cape-wrap-silent) (advice-add 'pcomplete-completions-at-point :around 'cape-wrap-purify) :init - (setq completion-at-point-functions '(cape-dict - tags-completion-at-point-function + (setq completion-at-point-functions '(tags-completion-at-point-function cape-keyword cape-dabbrev - cape-symbol))) + cape-symbol + cape-dict))) (use-package dabbrev - ;; Swap M-/ and C-M-/ - :bind ( ;; ("M-/" . completion-at-point) - ("C-M-/" . dabbrev-expand)) + :bind (("C-M-/" . dabbrev-expand)) :config (add-to-list 'dabbrev-ignored-buffer-regexps "\\` ") ;; Since 29.1, use `dabbrev-ignored-buffer-regexps' on older. @@ -355,14 +357,24 @@ " " filename-and-process) (mark " " (name 16 -1) - " " filename)))) + " " filename))) + :bind + ("C-x C-b" . ibuffer) + :hook + (ibuffer . (lambda () + (unless (eq ibuffer-sorting-mode 'alphabetic) + (ibuffer-do-sort-by-alphabetic))))) (use-package buffer-move :bind ("C-x -" . buf-move-right)) +(use-package winum + :init + (winum-mode 1)) + (use-package consult - :custom (consult-preview-excluded-buffers '(major-mode . exwm-mode)) - :bind ("C-x b" . consult-buffer)) + :custom (consult-preview-excluded-buffers t) + :bind (("C-x b" . consult-buffer))) ;; (use-package beacon ;; :init @@ -382,6 +394,12 @@ (visible-mark-max 1) ) +(use-package avy + :bind (("C-'" . avy-goto-char-2))) + +(use-package balanced-windows + :bind ("C-x w b" . balanced-windows-mode)) + ;; eshell stuff (use-package eshell :init @@ -395,9 +413,8 @@ (keymap-set eshell-hist-mode-map "C-c C-p" 'previous-line) (keymap-set eshell-mode-map "C-l" 'eshell/clear) (add-hook 'eshell-mode-hook 'eldoc-mode) - (add-hook 'eshell-mode-hook (lambda () (evil-local-mode -1))) - :custom - (eshell-prefer-lisp-functions t)) + (if want-evil + (add-hook 'eshell-mode-hook (lambda () (evil-local-mode -1))))) (use-package eat :init @@ -406,6 +423,8 @@ ;; file browser (use-package treemacs + :init + (if want-evil (use-package treemacs-evil)) :bind (("C-c t" . treemacs))) ;; password integration @@ -420,7 +439,7 @@ ;; ---------------------------------------------------------------------- ;; my custom stuff -(require 'evil-config) +(if want-evil (require 'evil-config)) (require 'my-funcs) (require 'my-binds) (require 'coding-config) |
