-
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
90 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,90 @@ | ||
<h2 align="center"> | ||
<img src="https://img.shields.io/github/actions/workflow/status/gekoke/magit-file-icons/ci.yaml?style=for-the-badge"/> | ||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/palette/macchiato.png" width="600px"/> | ||
</h2> | ||
|
||
# magit-file-icons.el | ||
|
||
Display file icons in ![Magit](https://github.com/magit/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)) | ||
``` | ||
|
||
If you are using some other method to install, you will need to ensure the following dependencies: | ||
|
||
- el-patch | ||
- nerd-icons | ||
- magit | ||
|
||
## 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 | ||
]); | ||
}; | ||
} | ||
``` | ||
|
||
## Commentary | ||
|
||
This package uses [nerd-icons.el](https://github.com/rainstormstudio/nerd-icons.el) to render icons. Currently, this is the | ||
only supported icon backend. | ||
|
||
The author is not opposed to adding additional icon backends — such as [all-the-icons.el](https://github.com/domtronn/all-the-icons.el) | ||
or [vscode-icons-emacs](https://github.com/jojojames/vscode-icon-emacs) — in the future. | ||
|
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.