Add some more magit hooks
Also add to project prefix keys and replace project-vc-dir with magit-project-status
This commit is contained in:
parent
c272902fef
commit
d4334eb696
|
@ -418,7 +418,8 @@
|
|||
eglot-autoshutdown t
|
||||
eglot-autoreconnect nil)
|
||||
(when (require 'eglot nil :noerror)
|
||||
(add-hook 'prog-mode-hook #'eglot-ensure))
|
||||
(add-hook 'prog-mode-hook #'eglot-ensure)
|
||||
(keymap-global-set "C-c c e" #'eglot))
|
||||
|
||||
(setq project-switch-use-entire-map t
|
||||
project-switch-commands
|
||||
|
@ -428,11 +429,22 @@
|
|||
(project-find-dir "Find directory")
|
||||
(project-eshell "Eshell")))
|
||||
|
||||
(setq magit-clone-default-directory "~/Projects/"
|
||||
(setq magit-define-global-key-bindings nil
|
||||
magit-clone-default-directory "~/Projects/"
|
||||
magit-commit-show-diff nil
|
||||
magit-commit-diff-inhibit-same-window t)
|
||||
(use-package magit
|
||||
:ensure t)
|
||||
:ensure t
|
||||
:bind (("C-c C-g" . magit-status)
|
||||
("C-c g g" . magit-status)
|
||||
("C-c g d" . magit-dispatch)
|
||||
("C-c g f" . magit-file-dispatch)
|
||||
("C-c g p" . magit-pull)
|
||||
("C-c g P" . magit-push)
|
||||
:map project-prefix-map
|
||||
("m" . magit-project-status))
|
||||
:config
|
||||
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t))
|
||||
|
||||
(setq vertico-cycle t)
|
||||
(use-package vertico
|
||||
|
|
|
@ -491,7 +491,8 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
|
|||
eglot-autoshutdown t
|
||||
eglot-autoreconnect nil)
|
||||
(when (require 'eglot nil :noerror)
|
||||
(add-hook 'prog-mode-hook #'eglot-ensure))
|
||||
(add-hook 'prog-mode-hook #'eglot-ensure)
|
||||
(keymap-global-set "C-c c e" #'eglot))
|
||||
#+END_SRC
|
||||
** Project
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -506,11 +507,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
|
|||
** Version control
|
||||
*** Magit
|
||||
#+begin_src emacs-lisp
|
||||
(setq magit-clone-default-directory "~/Projects/"
|
||||
(setq magit-define-global-key-bindings nil
|
||||
magit-clone-default-directory "~/Projects/"
|
||||
magit-commit-show-diff nil
|
||||
magit-commit-diff-inhibit-same-window t)
|
||||
(use-package magit
|
||||
:ensure t)
|
||||
:ensure t
|
||||
:bind (("C-c C-g" . magit-status)
|
||||
("C-c g g" . magit-status)
|
||||
("C-c g d" . magit-dispatch)
|
||||
("C-c g f" . magit-file-dispatch)
|
||||
("C-c g p" . magit-pull)
|
||||
("C-c g P" . magit-push)
|
||||
("<remap> <project-vc-dir" . magit-project-status)
|
||||
:map project-prefix-map
|
||||
("m" . magit-project-status))
|
||||
:config
|
||||
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t))
|
||||
#+end_src
|
||||
** Completion
|
||||
*** Vertico
|
||||
|
|
Loading…
Reference in a new issue