Add git(magit and friends)
This commit is contained in:
parent
c95461ebdb
commit
581bc30a50
|
@ -57,7 +57,6 @@
|
||||||
aggressive-indent
|
aggressive-indent
|
||||||
graphviz-dot-mode
|
graphviz-dot-mode
|
||||||
terraform-mode
|
terraform-mode
|
||||||
magit-todos
|
|
||||||
magit
|
magit
|
||||||
diff-hl
|
diff-hl
|
||||||
rustic
|
rustic
|
||||||
|
@ -122,6 +121,7 @@
|
||||||
eglot
|
eglot
|
||||||
marginalia
|
marginalia
|
||||||
nerd-icons
|
nerd-icons
|
||||||
|
forge
|
||||||
)
|
)
|
||||||
|
|
||||||
(provide 'fg42/deps)
|
(provide 'fg42/deps)
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
(require 'fg42/langs/python)
|
(require 'fg42/langs/python)
|
||||||
(require 'fg42/langs/elisp)
|
(require 'fg42/langs/elisp)
|
||||||
(require 'fg42/langs/nix)
|
(require 'fg42/langs/nix)
|
||||||
|
(require 'fg42/git)
|
||||||
(require 'fg42/wm))
|
(require 'fg42/wm))
|
||||||
|
|
||||||
(require 'server)
|
(require 'server)
|
||||||
|
@ -318,6 +319,9 @@ shipped with Emacs."
|
||||||
(electric-pair-mode 1)
|
(electric-pair-mode 1)
|
||||||
(global-company-mode)
|
(global-company-mode)
|
||||||
|
|
||||||
|
;; git changes in the fringe
|
||||||
|
(global-diff-hl-mode)
|
||||||
|
|
||||||
;; Rectangular select
|
;; Rectangular select
|
||||||
(cua-selection-mode t)
|
(cua-selection-mode t)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors
|
||||||
|
;;
|
||||||
|
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
;; URL: https://devheroes.codes/FG42/FG42
|
||||||
|
;; Version: 3.0.0
|
||||||
|
;;
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
(eval-when-compile
|
||||||
|
(require 'fpkg))
|
||||||
|
|
||||||
|
|
||||||
|
(use! diff-hl
|
||||||
|
"This package highlights changes to the current buffer in respect to the
|
||||||
|
VC status of the file. For example if you're using `git' in your project
|
||||||
|
and you've made some changes to the current buffer that are not commited
|
||||||
|
yet it will highlihgt them for you.
|
||||||
|
|
||||||
|
For more info check out `https://github.com/dgutov/diff-hl'."
|
||||||
|
:commands global-diff-hl-mode
|
||||||
|
:config
|
||||||
|
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
|
||||||
|
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
||||||
|
|
||||||
|
|
||||||
|
(use! magit
|
||||||
|
"Git magic in FG42. For more info checkout `magit's documentation."
|
||||||
|
:bind (("C-x g" . magit-status)
|
||||||
|
("C-c b" . magit-blame)
|
||||||
|
("C-c b" . magit-log))
|
||||||
|
|
||||||
|
:config
|
||||||
|
(when (featurep 'diff-hl)
|
||||||
|
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
|
||||||
|
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)))
|
||||||
|
|
||||||
|
(use! forge
|
||||||
|
"Forge allows you to work with Git forges, such as Github and Gitlab,
|
||||||
|
from the comfort of Magit and the rest of Emacs.
|
||||||
|
|
||||||
|
For more info: `https://magit.vc/manual/forge/'"
|
||||||
|
:after magit)
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'fg42/git)
|
||||||
|
;;; git.el ends here
|
Loading…
Reference in New Issue