-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# magit-file-icons.el | ||
|
||
Display file icons in Magit! | ||
|
||
# Preview | ||
![Magit status buffer with file icons](./screenshots/status.png) | ||
|
||
![Magit revision diffstat with file icons](./screenshots/diffstat.png) | ||
|
||
# Installation | ||
|
||
This package is not yet in any package archives. To install, you need to fetch the source. | ||
|
||
For example, with [straight.el](https://github.com/radian-software/straight.el): | ||
|
||
```elisp | ||
(use-package magit-file-icons | ||
:straight (:host github :repo "gekoke/magit-file-icons") | ||
:custom | ||
;; These are the default values: | ||
(magit-file-icons-enable-diff-file-section-icons t) | ||
(magit-file-icons-enable-untracked-icons t) | ||
(magit-file-icons-enable-diffstat-icons t) | ||
:config | ||
(magit-file-icons-mode 1)) | ||
``` | ||
|
||
## Nix | ||
|
||
Alternatively, you can use Nix. This repository is a flake and outputs the following packages: | ||
|
||
``` | ||
└───packages | ||
├───aarch64-darwin | ||
│ ├───default: package 'emacs-magit-file-icons-v0.0.1' | ||
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1' | ||
├───aarch64-linux | ||
│ ├───default: package 'emacs-magit-file-icons-v0.0.1' | ||
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1' | ||
├───x86_64-darwin | ||
│ ├───default: package 'emacs-magit-file-icons-v0.0.1' | ||
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1' | ||
└───x86_64-linux | ||
├───default: package 'emacs-magit-file-icons-v0.0.1' | ||
└───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1' | ||
``` | ||
|
||
A minimal flake for creating an Emacs with the `magit-file-icons` package could look like this: | ||
|
||
```nix | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
magit-file-icons.url = "github:gekoke/magit-file-icons"; | ||
magit-file-icons.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
outputs = | ||
inputs: | ||
let | ||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; | ||
in | ||
{ | ||
packages."x86_64-linux".default = pkgs.emacsWithPackages (p: [ | ||
inputs.magit-file-icons.packages."x86_64-linux".default | ||
]); | ||
}; | ||
} | ||
``` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.