jtbm37 / all-the-icons-dired Goto Github PK
View Code? Open in Web Editor NEWAdds dired support to all-the-icons
License: GNU General Public License v3.0
Adds dired support to all-the-icons
License: GNU General Public License v3.0
this relates to #23, it'd be cool if we could specify the icons we want for paths matching some regular expression or predicate. So in our config we could set:
(push (cons ".git$" (all-the-icons-octicon "file-binary")) all-the-icons-dired-config)
For example the dir icon is narrower than the emacs icon. Some sort of alignment should be added so that filenames all start in the same position.
I found all-the-icons-dired
to be unusably slow on a remote tramp directory containing a few hundred files. Commenting out the following line improved performance a great deal:
(if (file-directory-p filename)
Ref: #24 (comment)
@conao3 I think there are issues here when renaming a file. When I rename a file the icon ends up on the far left.
Explanation of the bug
After my weekly package update (which I assume updated either this package or all-the-icons and broke something), whenever all-the-icons-dired mode is activated I get an error that reads
all-the-icons-dired--setup: Symbol’s value as variable is void: file
I was also able to reproduce it with emacs -Q, so my config isn't causing the problem.
Steps to reproduce
If you have the latest version of both all-the-icons and this package (I didn't see which one got updated, causing the bug, but it has to be one of the two, as this occured after updating my packages) and the code
(use-package all-the-icons-dired :hook (dired-mode . all-the-icons-dired-mode))
in your init.el, when you try opening Dired, you will see this message.
if you don't have the mode hooked to dired, simply activate it from the M-x menu and you see the same message.
I would also like to mention that I tried opening ibuffer and enabling its all-the-icons mode to see if it was a general all-the-icons bug and that worked fine, so I believe I can safely assume that this package is the problem.
Thanks in advance for your time, this is one of my favorite packages as it makes dired much prettier and I would hate to see this not fixed.
When inserting a subdirectory into a dired buffer, the new items don't show any icons.
all-the-icons-dired-mode
Expected result: icons show for files in the subdirectory
Actual result: no icons show
If you deactivate all-the-icons-dired-mode
and re-activate it, all the items get icons including the ones in the subdirectory.
After running find-dired
and friends, no icons are displayed in the output buffer. Calling all-the-icons-dired--refresh
will result in icons being drawn as expected, so it looks like the existing advice does yet not cover find-dired
.
Tramp has to be loaded when all-the-icons-dired is called otherwise emacs will throw an error.
WIthout this package, dired-do-shell-command and dired-do-asynch-shell-command complete with point in the dired buffer.
With this package, they complete in the shell buffer.
Hi. If I set a file extension to used a particular mode, the correct icon for that mode shows up in the modeline when a buffer is looking at that file. However when I look at the directory that contains that file in dired, the incorrect icon is used for that file. Is there a way to tell all-the-icons-dired to use the mode set for that file extension when selecting the icon?
For example, I set the file extension "\\.m\\"
to use matlab-mode with use-package. The Matlab icon is then correctly shown in the modeline when I open a .m file. However when I look at the directory containing that file, an Apple icon is used for files with the .m extension. How can I make dired use the propery Matlab icon instead of the Apple icon for files with the .m extension?
Thanks!
Enabling all-the-icons-dired-mode takes opening my home directory from ~0.08 to ~0.50 seconds on average (according to benchmark-run). Like suggested in #8, a simple improvement would be to automatically disable it in buffers with more than a certain configurable amount of lines. You can't just check the number of lines in dired-mode-hook, so I'm not sure if there's a great way to do this. Even better might be to only put icons on visible lines initially (and then maybe add them later when the user scrolls or with an idle timer, though that may be too complicated).
Works great in GUI, but do not see icons in terminal iTerm2 running emacs.
Hello,
when using a dark background, the icons dont look so good.
the neotree dired/speedbar like thing, doesnt seem to have the same problem.
/Joakim
tsx
files are used across typescript and React development and is a standard file extension. This might be necessary to add an icon entry for tsx
files.
Thanks.
Just did a fresh reinstall of emacs (old was fine in terms of icons).
The new installation has odd icons for files (Vue icon for js files, warning for Download, a Peach for .elc files, etc), and icons display no colours, also some files display huge icons as well. What could be wrong? I might point out that neotree's icons are coloured, are of the right type and size.
Can this be extended to just use the basic directory icon, the basic file icon, and the lock icon for those under dired-omit-mode
?
How to recreate the bug
git clone https://github.com/kanaka/mal.git
cd mal/impls/forth && emacs . &
# or
cd mal/impls/dart && emacs . &
I chose this repo because it specifically has many files in many formats. Even after rendering the icons navigation becomes very slow. I was wondering if the rendering process is restarting after every command and if there might be a better way to handle the issue with time outs or async.
The ones I've found so far:
dired-create-directory
dired-maybe-insert-subdir
all-the-icons-dired
does not use consistent icons for directories. Some directories have their own special icon. Example, these are two directories:
The .dartServer
icon above is a standard directory icon, however, Desktop
uses a special icon.
The .git
directory in the screenshot from the developer uses a standard directory icon:
However, on my computer, a .git
directory looks like this:
I prefer the standard directory icon for all directories. How can I do that?
Looks fine in unfolded state but is definitely broken in the folded state. Try out yourself to see what I'm talking about. Basically, icons are somehow randomly repeated in the position of folding placeholders from dired-details
.
Hello there,
I opened the issue here and @domtronn found out that the fonts being broken is an issue with this mode and not the fonts or the main mode itself.
Can you figure what it is making dired icons and look like this.
I am on windows 10 with emacs 25.3.1 using 20170418.143 version of the mode.
In the same vein as domtronn/all-the-icons.el#133 (comment), I'm initiating a project takeover process and volunteer myself to be the maintainer.
Given there's no contact information available anywhere whatsoever on the entire internet, I'm putting the notice up here. If there's no response in 2 weeks, I'll submit a PR to Melpa to point the package to my own fork and start merging all the PR here.
I run GNU Emacs 25.3.2. Here's snip of list-packages:
all-the-icons 20180125.757 installed A library for inserting Developer icons
all-the-icons-d... 20170418.1431 installed Shows icons for each file in dired mode
I did update all-the-icons
, now I see lighting icon instead of usual folder. Package was updated along with neotree
package that I installed.
When running wdired-change-to-wdired-mode
and try to rename a file for example. The icon will be part of the file name and it will fail to rename the file.
I wonder if it is possible to put a hook that disables this inside wdired-mode or optimally if the icons could be omitted from the wdired logic, but that might be a tricky thing to do.
Linux Mint 20
Emacs 27.2
packages: all-the-icons, all-the-icons-cadidates, all-the-icons-dired
In my init file
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
But when I try to open folder in dired mode, I get error:
setq: Wrong type argument: number-or-marker-p, nil
I'm using this package in the terminal and by default icons aren't setup because this condition fails on ttys.
all-the-icons-dired/all-the-icons-dired.el
Lines 125 to 131 in fc2dfa1
However all-the-icons-dired--refresh-advice
which is hooked into misc dired functions eg. dired-maybe-insert-subdir
doesn't check this condition so when you run it icons are forcefully inserted.
I am having trouble getting the all-the-icons-dired to work with dired-subtree. The main directory has icons but the subtree will not render any icons. I would appreciate any help.
ac-comphist.dat
icon is not aligned.
;; ~/.debug.emacs.d/all-the-icons-dired/init.el
;; you can run like 'emacs -q -l ~/.debug.emacs.d/{{pkg}}/init.el'
(when load-file-name
(setq user-emacs-directory
(expand-file-name (file-name-directory load-file-name))))
(prog1 "prepare leaf"
(prog1 "package"
(custom-set-variables
'(package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/"))))
(package-initialize))
(prog1 "leaf"
(unless (package-installed-p 'leaf)
(package-refresh-contents)
(package-install 'leaf))))
(leaf all-the-icons-dired
:ensure t
:hook (dired-mode-hook . all-the-icons-dired-mode))
Hi, in ranger's ranger/deer-mode, the first icon is missing.
I'm using Doom Emacs. Here is my setup https://github.com/ztlevi/doom-config/blob/master/+misc.el#L156-L185, https://github.com/hlissner/doom-emacs/blob/develop/modules/emacs/dired/config.el#L3
By using exa
as an alternative of ls with -ahl --group-directories-first
args, the .
and ..
is ignore.
Would you take a look at it? Thanks!
My PC info:
emacs version 26.3
features XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
build Aug 29, 2019
buildopts (--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now)
windowsys x
daemonp server-running
doom version 2.0.9
build HEAD -> develop 99c5bac35 2020-04-11 14:51:15 -0400
dir ~/.doom.d/
system type gnu/linux
config x86_64-pc-linux-gnu
shell /usr/bin/zsh
uname Linux 5.4.30-1-MANJARO #1 SMP PREEMPT Thu Apr 2 17:31:45 UTC 2020 x86_64
path (~/.local/share/tmuxifier/bin /usr/local/opt/emacs-mac/bin ~/.emacs.d/bin ~/.local/share/cargo/bin ~/.local/share/nodenv/shims ~/.local/share/nodenv/bin ~/.local/share/nodenv/versions/12.10.0/bin ~/.local/bin ~/Dotfiles/bin ~/.local/share/Dotfiles/base.arch.topic/bin ~/.local/share/Dotfiles/desktop.bspwm.topic/bin ~/.local/share/Dotfiles/editor.emacs.topic/bin ~/.local/share/Dotfiles/misc.apps.topic/bin ~/.local/share/Dotfiles/shell.git.topic/bin ~/.local/share/Dotfiles/shell.tmux.topic/bin /usr/local/bin /usr/local/sbin /usr/bin /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /var/lib/snapd/snap/bin ~/.antigen/bundles/robbyrussell/oh-my-zsh/lib ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/github ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-extras ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gitignore ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gitfast ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker-compose ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker-machine ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/ruby ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/rbenv ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/python ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/pip ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/pipenv ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/django ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/golang ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/node ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/npm ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/yarn ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/react-native ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/zsh_reload ~/.antigen/bundles/hlissner/zsh-autopair ~/.antigen/bundles/zsh-users/zsh-completions ~/.antigen/bundles/zsh-users/zsh-syntax-highlighting ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux-cssh ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmuxinator ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/aws ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fzf ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/jira ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/history ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/ripgrep ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/web-search ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/nmap ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/heroku ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/copydir ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/common-aliases ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/command-not-found ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/colored-man-pages ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/rsync ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/dotenv ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fasd ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fd ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/mosh ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/extract ~/.antigen/bundles/soimort/you-get ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/archlinux /usr/lib/emacs/26.3/x86_64-pc-linux-gnu/)
config envfile envvar-file
elc-files 0
modules (:completion (company +auto) (ivy +icons +prescient +childframe) :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) treemacs vc-gutter vi-tilde-fringe window-select workspaces zen :editor (evil +everywhere) file-templates fold (format +onsave) lispy multiple-cursors rotate-text snippets :emacs (dired +ranger +icons) electric ibuffer vc :term eshell vterm :checkers (syntax +childframe) spell grammar :tools debugger direnv docker editorconfig eval (lookup +devdocs +docsets) lsp macos magit make pdf prodigy rgb tmux upload :lang (cc +lsp) data emacs-lisp (go +lsp) (java +lsp) javascript kotlin latex (markdown +grip) nix (org +dragndrop ipython +pandoc +pomodoro +present) (python +pyenv +conda +lsp) rust sh web :config (default +bindings +snippets +smartparens))
packages ((adoc-mode) (tldr) (edit-indirect) (blog-admin :recipe (:host github :repo codefalling/blog-admin)) (youdao-dictionary) (link-hint) (symbol-overlay) (helm) (dired-narrow) (atomic-chrome) (git-link) (wucuo) (vterm-toggle :recipe (:host github :repo jixiuf/vterm-toggle)) (counsel-etags) (imenu-list) (tmux-pane) (clipetty) (rime :recipe (:host github :repo DogLooksGood/emacs-rime :files (*.el Makefile lib.c))) (bazel-mode :recipe (:host github :repo bazelbuild/emacs-bazel-mode)) (import-js) (importmagic) (py-isort) (flycheck-mypy) (flycheck-google-cpplint :recipe (:host github :repo flycheck/flycheck-google-cpplint)))
unpin (n/a)
elpa (n/a)
When using this together with strip-buffer-mode from stripe-buffer. The background from the face on the line is overridden. I've tried setting all-the-icons-dired-dir-face
, but that only applies to the small icon part, I wonder if it is the overlay, or what is making that hole?
What is the difference between this and https://github.com/Alexander-Miller/treemacs/blob/master/src/extra/treemacs-icons-dired.el?
Thanks,
GM
dired-do-redisplay
broke all-the-icons-dired icon
.
dired-do-redisplay
binded at l
by default.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.