mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
Updated and cleaned up magit config
This commit is contained in:
parent
2886853a72
commit
86d3fe5fea
|
@ -750,16 +750,16 @@
|
|||
"magit-file-icons": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719343259,
|
||||
"narHash": "sha256-yE11UXM49emqnCBqJvf2ck4BwmHmhIhuJUPvxEBaQr8=",
|
||||
"lastModified": 1719595750,
|
||||
"narHash": "sha256-n/uXppejl6js/wrvEEIKmfmCh7ssbSBMMZWYrrvG1JQ=",
|
||||
"owner": "librephoenix",
|
||||
"repo": "magit-file-icons",
|
||||
"rev": "d2fae0b97e7499e6b20d1af3dc6e098d4182cfdb",
|
||||
"rev": "6c90eb03eb8a382110d862ec792ae50556bffd6e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "librephoenix",
|
||||
"ref": "all-the-icons",
|
||||
"ref": "abstract-icon-getters-compat",
|
||||
"repo": "magit-file-icons",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
flake = false;
|
||||
};
|
||||
magit-file-icons = {
|
||||
url = "github:librephoenix/magit-file-icons/all-the-icons";
|
||||
url = "github:librephoenix/magit-file-icons/abstract-icon-getters-compat";
|
||||
flake = false;
|
||||
};
|
||||
phscroll = {
|
||||
|
|
|
@ -1244,26 +1244,14 @@ If the path from LINK does not exist, nil is returned."
|
|||
|
||||
;;;------ magit configuration ------;;;
|
||||
;; Need the following two blocks to make magit work with git bare repos
|
||||
(defun ~/magit-process-environment (env)
|
||||
"Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory.
|
||||
https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
||||
(let ((default (file-name-as-directory (expand-file-name default-directory)))
|
||||
(home (expand-file-name "~/")))
|
||||
(when (string= default home)
|
||||
(let ((gitdir (expand-file-name "~/.dotfiles.git/")))
|
||||
(push (format "GIT_WORK_TREE=%s" home) env)
|
||||
(push (format "GIT_DIR=%s" gitdir) env))))
|
||||
env)
|
||||
|
||||
(advice-add 'magit-process-environment
|
||||
:filter-return #'~/magit-process-environment)
|
||||
|
||||
(require 'magit-todos)
|
||||
(setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG"))
|
||||
(magit-todos-mode 1)
|
||||
|
||||
(add-load-path! "~/.emacs.d/magit-file-icons")
|
||||
(require 'magit-file-icons)
|
||||
(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file)
|
||||
(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir)
|
||||
(magit-file-icons-mode 1)
|
||||
|
||||
(require 'all-the-icons-ibuffer)
|
||||
|
|
|
@ -1459,26 +1459,14 @@ On Wayland, EAF doesn't work.
|
|||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;;;------ magit configuration ------;;;
|
||||
;; Need the following two blocks to make magit work with git bare repos
|
||||
(defun ~/magit-process-environment (env)
|
||||
"Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory.
|
||||
https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
||||
(let ((default (file-name-as-directory (expand-file-name default-directory)))
|
||||
(home (expand-file-name "~/")))
|
||||
(when (string= default home)
|
||||
(let ((gitdir (expand-file-name "~/.dotfiles.git/")))
|
||||
(push (format "GIT_WORK_TREE=%s" home) env)
|
||||
(push (format "GIT_DIR=%s" gitdir) env))))
|
||||
env)
|
||||
|
||||
(advice-add 'magit-process-environment
|
||||
:filter-return #'~/magit-process-environment)
|
||||
|
||||
(require 'magit-todos)
|
||||
(setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG"))
|
||||
(magit-todos-mode 1)
|
||||
|
||||
(add-load-path! "~/.emacs.d/magit-file-icons")
|
||||
(require 'magit-file-icons)
|
||||
(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file)
|
||||
(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir)
|
||||
(magit-file-icons-mode 1)
|
||||
|
||||
#+END_SRC
|
||||
|
|
Loading…
Reference in a new issue