Remove vertico and magit
This commit is contained in:
parent
b930f3072d
commit
0de0f8ebab
135
init.el
135
init.el
@ -168,9 +168,11 @@
|
|||||||
;; recentf
|
;; recentf
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
:init
|
:init
|
||||||
(setq recentf-exclude '("^/tmp/.*"
|
(setq recentf-exclude `("^/tmp/.*"
|
||||||
"^~/.mail/[^/]/Drafts/.*"
|
"^~/.mail/[^/]/Drafts/.*"
|
||||||
(format "^%svar/elpa/.*" user-emacs-directory)))
|
,(format "^%svar/elpa/.*" user-emacs-directory)
|
||||||
|
,(format "^%svar/gnus/.*" user-emacs-directory)
|
||||||
|
,(format "^%setc/gnus/.*" user-emacs-directory)))
|
||||||
:bind ("C-c r" . recentf)
|
:bind ("C-c r" . recentf)
|
||||||
:config
|
:config
|
||||||
(recentf-mode 1))
|
(recentf-mode 1))
|
||||||
@ -243,7 +245,8 @@ visual states."
|
|||||||
:predicate '((not magit-mode dired-mode
|
:predicate '((not magit-mode dired-mode
|
||||||
proced-mode mu4e-main-mode
|
proced-mode mu4e-main-mode
|
||||||
mu4e-view-mode mu4e-headers-mode
|
mu4e-view-mode mu4e-headers-mode
|
||||||
ibuffer-mode calc-mode calc-trail-mode) t))
|
ibuffer-mode calc-mode calc-trail-mode
|
||||||
|
gnus-group-mode) t))
|
||||||
(my/evil-avy-global-mode 1)
|
(my/evil-avy-global-mode 1)
|
||||||
:config
|
:config
|
||||||
(avy-setup-default))
|
(avy-setup-default))
|
||||||
@ -288,20 +291,51 @@ visual states."
|
|||||||
;; face minibuffer-prompt))
|
;; face minibuffer-prompt))
|
||||||
;; (vertico-mode 1))
|
;; (vertico-mode 1))
|
||||||
|
|
||||||
|
;; icomplete
|
||||||
(use-package icomplete
|
(use-package icomplete
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:demand t
|
||||||
:bind (:map icomplete-minibuffer-map
|
:bind (:map icomplete-minibuffer-map
|
||||||
("C-S-s" . kill-line)
|
("C-S-s" . kill-line)
|
||||||
("C-j" . icomplete-forward-completions)
|
("C-j" . icomplete-forward-completions)
|
||||||
("C-k" . icomplete-backward-completions)
|
("C-k" . icomplete-backward-completions)
|
||||||
("DEL" . icomplete-fido-backward-updir)
|
("DEL" . icomplete-fido-backward-updir)
|
||||||
("M-DEL". delete-backward-char))
|
("M-DEL". delete-backward-char)
|
||||||
|
("M-RET" . icomplete-force-complete-and-exit)
|
||||||
|
("TAB" . icomplete-force-complete)
|
||||||
|
("<escape>" . abort-recursive-edit)
|
||||||
|
("C-;" . embark-dwim)
|
||||||
|
("C-." . embark-act)
|
||||||
|
("<left>" . backward-char)
|
||||||
|
("<right>" . forward-char))
|
||||||
|
:hook (icomplete-minibuffer-setup . my/icomplete-setup-hook-func)
|
||||||
:init
|
:init
|
||||||
|
(defun my/icomplete-setup-hook-func ()
|
||||||
|
(setq truncate-lines t))
|
||||||
(setq completion-ignore-case t
|
(setq completion-ignore-case t
|
||||||
read-file-name-completion-ignore-case t
|
read-file-name-completion-ignore-case t
|
||||||
read-buffer-completion-ignore-case t
|
read-buffer-completion-ignore-case t
|
||||||
|
enable-recursive-minibuffers t
|
||||||
|
minibuffer-prompt-properties '(read-only t
|
||||||
|
cursor-intangible t
|
||||||
|
face minibuffer-prompt)
|
||||||
|
;;completions-detailed t
|
||||||
|
icomplete-compute-delay 0
|
||||||
icomplete-scroll t)
|
icomplete-scroll t)
|
||||||
|
(defun my/crm-indicator (args)
|
||||||
|
(cons (format "[CRM%s] %s"
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
|
||||||
|
crm-separator)
|
||||||
|
(car args))
|
||||||
|
(cdr args)))
|
||||||
|
(advice-add #'completing-read-multiple :filter-args #'my/crm-indicator)
|
||||||
|
(defun my/marginalia-trim-right (list)
|
||||||
|
(cl-loop for (cand prefix suffix) in list collect
|
||||||
|
(list cand prefix (string-trim-right suffix))))
|
||||||
|
(advice-add #'marginalia--align :filter-return #'my/marginalia-trim-right)
|
||||||
:config
|
:config
|
||||||
|
(set-face-attribute 'icomplete-selected-match nil :inherit 'region)
|
||||||
(fido-mode 1)
|
(fido-mode 1)
|
||||||
(fido-vertical-mode 1))
|
(fido-vertical-mode 1))
|
||||||
|
|
||||||
@ -464,11 +498,6 @@ visual states."
|
|||||||
:init
|
:init
|
||||||
(setq-default eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit))
|
(setq-default eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit))
|
||||||
|
|
||||||
;; dumb-jump
|
|
||||||
(use-package dumb-jump
|
|
||||||
:init
|
|
||||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
|
|
||||||
|
|
||||||
;; eglot
|
;; eglot
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:demand t
|
:demand t
|
||||||
@ -770,35 +799,61 @@ Take directly from doom-modeline."
|
|||||||
(doom-modeline-spc)
|
(doom-modeline-spc)
|
||||||
"IAlg"))))))))
|
"IAlg"))))))))
|
||||||
|
|
||||||
|
(use-package with-editor)
|
||||||
|
|
||||||
;; vterm
|
;; vterm
|
||||||
(use-package vterm
|
;; (use-package vterm
|
||||||
:hook (vterm-mode . with-editor-export-editor)
|
;; :hook (vterm-mode . with-editor-export-editor)
|
||||||
:init
|
;; :init
|
||||||
(defvar my/project-vterm-hash-table (make-hash-table :test 'equal)
|
;; (defvar my/project-vterm-hash-table (make-hash-table :test 'equal)
|
||||||
"Hash table that maps project root dirs to vterm buffers.")
|
;; "Hash table that maps project root dirs to vterm buffers.")
|
||||||
(defun my/project-vterm (prompt)
|
;; (defun my/project-vterm (prompt)
|
||||||
"Switch to or create a vterm buffer in the current projects root."
|
;; "Switch to or create a vterm buffer in the current projects root."
|
||||||
|
;; (interactive (list t))
|
||||||
|
;; (if-let ((proj (project-current prompt))
|
||||||
|
;; (default-directory (project-root proj)))
|
||||||
|
;; (if-let ((vterm-buff (gethash default-directory
|
||||||
|
;; my/project-vterm-hash-table))
|
||||||
|
;; ((buffer-live-p vterm-buff)))
|
||||||
|
;; (switch-to-buffer vterm-buff)
|
||||||
|
;; (puthash default-directory
|
||||||
|
;; (vterm (concat "*vterm for project " default-directory "*"))
|
||||||
|
;; my/project-vterm-hash-table))))
|
||||||
|
;; (defun my/project-vterm-or-default ()
|
||||||
|
;; "Open a vterm for the current project, otherwise, open a normal vterm."
|
||||||
|
;; (interactive)
|
||||||
|
;; (unless (my/project-vterm nil)
|
||||||
|
;; (if-let ((vterm-buff (gethash nil my/project-vterm-hash-table))
|
||||||
|
;; ((buffer-live-p vterm-buff)))
|
||||||
|
;; (switch-to-buffer vterm-buff)
|
||||||
|
;; (puthash nil (vterm vterm-buffer-name) my/project-vterm-hash-table)))))
|
||||||
|
|
||||||
|
;; eat
|
||||||
|
(use-package eat
|
||||||
|
:config
|
||||||
|
(defvar my/project-eat-hash-table (make-hash-table :test 'equal)
|
||||||
|
"Hash table that maps project root dirs to eat buffers.")
|
||||||
|
(defun my/project-eat (prompt)
|
||||||
|
"Switch to or create a eat buffer in the current projects root."
|
||||||
(interactive (list t))
|
(interactive (list t))
|
||||||
(if-let ((proj (project-current prompt))
|
(if-let ((proj (project-current prompt))
|
||||||
(default-directory (project-root proj)))
|
(default-directory (project-root proj)))
|
||||||
(if-let ((vterm-buff (gethash default-directory
|
(if-let ((eat-buff (gethash default-directory
|
||||||
my/project-vterm-hash-table))
|
my/project-eat-hash-table))
|
||||||
((buffer-live-p vterm-buff)))
|
((buffer-live-p eat-buff)))
|
||||||
(switch-to-buffer vterm-buff)
|
(switch-to-buffer eat-buff)
|
||||||
|
(let ((eat-buffer-name (concat "*eat for project " default-directory "*")))
|
||||||
(puthash default-directory
|
(puthash default-directory
|
||||||
(vterm (concat "*vterm for project " default-directory "*"))
|
(eat)
|
||||||
my/project-vterm-hash-table))))
|
my/project-vterm-hash-table)))))
|
||||||
(defun my/project-vterm-or-default ()
|
(defun my/project-eat-or-default ()
|
||||||
"Open a vterm for the current project, otherwise, open a normal vterm."
|
"Open an eat for the current project, otherwise, open a normal eat."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (my/project-vterm nil)
|
(unless (my/project-eat nil)
|
||||||
(if-let ((vterm-buff (gethash nil my/project-vterm-hash-table))
|
(if-let ((eat-buff (gethash nil my/project-eat-hash-table))
|
||||||
((buffer-live-p vterm-buff)))
|
((buffer-live-p eat-buff)))
|
||||||
(switch-to-buffer vterm-buff)
|
(switch-to-buffer eat-buff)
|
||||||
(puthash nil (vterm vterm-buffer-name) my/project-vterm-hash-table)))))
|
(puthash nil (eat) my/project-eat-hash-table)))))
|
||||||
|
|
||||||
;; eat (mostly for eshell purposes)
|
|
||||||
(use-package eat)
|
|
||||||
|
|
||||||
;; eshell stuff
|
;; eshell stuff
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
@ -860,8 +915,8 @@ If no name is given, list all bookmarks instead."
|
|||||||
(string-join (last parts num) "/"))))
|
(string-join (last parts num) "/"))))
|
||||||
(defun my/-eshell-prompt-get-dir ()
|
(defun my/-eshell-prompt-get-dir ()
|
||||||
"Get dir for `my/-eshell-prompt-function'"
|
"Get dir for `my/-eshell-prompt-function'"
|
||||||
(my/-eshell-prompt-cut-path
|
(my/-eshell-prompt-cut-path 3
|
||||||
3 (if-let ((worktree (car-safe (car-safe (magit-list-worktrees))))
|
(if-let ((worktree (vc-root-dir))
|
||||||
(parent (file-name-parent-directory worktree)))
|
(parent (file-name-parent-directory worktree)))
|
||||||
(file-relative-name default-directory parent)
|
(file-relative-name default-directory parent)
|
||||||
(my/-replace-home-with-tilda default-directory))))
|
(my/-replace-home-with-tilda default-directory))))
|
||||||
@ -1021,11 +1076,11 @@ If no name is given, list all bookmarks instead."
|
|||||||
:bind ("C-x C-b" . ibuffer))
|
:bind ("C-x C-b" . ibuffer))
|
||||||
|
|
||||||
;; magit
|
;; magit
|
||||||
(use-package magit
|
;; (use-package magit
|
||||||
:init
|
;; :init
|
||||||
(evil-define-key '(normal visual motion) magit-mode-map
|
;; (evil-define-key '(normal visual motion) magit-mode-map
|
||||||
"s" #'magit-stage-file
|
;; "s" #'magit-stage-file
|
||||||
"S" #'magit-stage-modified))
|
;; "S" #'magit-stage-modified))
|
||||||
|
|
||||||
;; org-mode
|
;; org-mode
|
||||||
(use-package org
|
(use-package org
|
||||||
@ -1121,7 +1176,7 @@ If no name is given, list all bookmarks instead."
|
|||||||
(mu4e t)
|
(mu4e t)
|
||||||
(mu4e-context-switch nil "Personal")
|
(mu4e-context-switch nil "Personal")
|
||||||
|
|
||||||
;; rainbow-delimiters
|
;; RAINBOW-delimiters
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook (prog-mode . rainbow-delimiters-mode))
|
:hook (prog-mode . rainbow-delimiters-mode))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user