Commit graph

107 commits

Author SHA1 Message Date
Henrik Lissner
1ff37f9fa4
fix(dired): preserve buffers on dirvish-find-entry-a
Fix: #8038
2024-09-07 13:57:58 -04:00
Henrik Lissner
34cc0c9d86
tweak(dired): ESC to exit wdired-mode
Fix: #8004
2024-08-30 18:56:44 -04:00
Henrik Lissner
14478064af
refactor(dired,vc-gutter): setup for tty frames
A recent commit (c53f63b) allows me to simplify this a bit.

Ref: c53f63b96e
Ref: #8001
2024-08-28 17:56:55 -04:00
Henrik Lissner
c99e9b8654
fix(dired): initial pop-in for vc-state
Ref: hlissner/dirvish#1
2024-08-28 04:55:17 -04:00
Henrik Lissner
1fad466c12
fix(dired): "Attempt to delete minibuffer or sole ordinary window"
Makes `+dired--cleanup-dirvish-h` more robust, and only kick in for
dirvish-side or full-frame dirvish sessions.

Amend: e82dab3257
2024-08-25 17:44:29 -04:00
Henrik Lissner
b69e7d1780
tweak(dired): bind gl, h, l, & arrows to directory nav 2024-08-22 21:48:08 -04:00
Henrik Lissner
1e73754dad
refactor(dired): dirvish-hide-cursor
Give the same treatment I give dirvish-hide-details to
dirvish-hide-cursor (see ddfb0cc).

Ref: ddfb0cc3cc
Ref: #6760
2024-08-22 12:32:14 -04:00
Henrik Lissner
fe15b1daf3
fix(dired): remove keybind to nonexistent command
Amend: e82dab3257
Co-authored-by: kalwk <kalwk@users.noreply.github.com>
2024-08-21 05:02:43 -04:00
Henrik Lissner
4ed3e75f5f
fix(dired): fail gracefully if pdf-tools isn't installed
Will throw a "void-variable pdf-info-epdfinfo-program" error if
pdf-tools isn't installed (or `:tools pdf` is disabled).
2024-08-21 02:15:40 -04:00
Henrik Lissner
a6c3c6842a
refactor(dired): use dirvish-preview-environment
- Remove +dired--suppress-hooks-in-previews-a, because Dirvish already
  does this.
- Exploit dirvish-preview-environment instead of hardcoding the
  enable-local-variables let-binding for the child process. Its defaults
  are more reasonable.
2024-08-21 02:11:55 -04:00
Henrik Lissner
1c6288e2b7
perf(dired): suppress mode hooks when previewing files
Ref: #6760
2024-08-19 16:21:45 -04:00
Henrik Lissner
ddfb0cc3cc
refactor(dired): dirvish-hide-details
Prior to this, I used window-width to determine whether file details
should be hidden, but there was a jarring delay on `dirvish-setup-hook`
that made the effect look awful (especially when walking up and down
file trees).

This changes `dirvish-hide-details` to accept a list of contexts where
it should be enabled, which I think is more elegant. Of course,
`dirvish-hide-details` will fall back on old behavior if set to `t` or
`nil`.

I'll consider upstreaming it later (and perhaps doing similar for
`dirvish-hide-cursor`).

Ref: #6760
2024-08-19 02:15:05 -04:00
Henrik Lissner
d4ad14b75d
fix(dired): fallback to default if dirvish-use-mode-line == nil
Currently, setting `dirvish-use-mode-line` to nil blanks out the
mode-line, and setting it to `t` makes Dirvish use its own mode-line. To
get the default mode-line, `dirvish-mode-line-format` needs to be set to
nil, but even then Dirvish will prepend a bar to the default-mode-line
so it can control its height, which I think is a confusing chain of
causes and effects.

This changes the behavior such that `dirvish-use-mode-line` controls
whether `dirvish-mode-line-format` will be used or not. I'll upstream
this to hlissner/dirvish later.

Fix: #8000
2024-08-18 16:31:21 -04:00
Henrik Lissner
967586fcae
fix(dired): dirvish-{mode,header}-line-height = doom-modeline-height
Ref: #8000
2024-08-18 16:20:20 -04:00
Henrik Lissner
e82dab3257
refactor!(dired): use dirvish, drop +ranger
BREAKING CHANGE: This drops the Dired module's +ranger flag and replaces
much of this module's innards with (my maintained fork of) Dirvish,
which provides a spiritually similar (if not superior) experience to
Ranger. Plus, Dirvish makes most of our dired plugins unnecessary.

Also, I am now registering myself as this module's maintainer now that I
dogfood and maintain Dirvish.

Close: #6760
Co-authored-by: alexluigit <alexluigit@users.noreply.github.com>
Co-authored-by: hpfr <hpfr@users.noreply.github.com>
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
Co-authored-by: pharcosyle <pharcosyle@users.noreply.github.com>
2024-08-18 03:57:12 -04:00
Henrik Lissner
5e2e886b35
nit: comment revision & reformatting 2024-08-15 23:18:47 -04:00
Henrik Lissner
4fcf332749
refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these
doom-projectile-* variables need to be generalized, starting with the
fd/ripgrep executable paths.

ALong with that, this refactors Doom's projectile-generic-command to
lean more on built-in fd support in projectile, where possible (fewer
wheels reinvented).

Ref: doomemacs/core#1
2024-08-09 21:03:37 -04:00
Samuel Tschiedel
4af60fe066 feat(dired): add subtree bindings to dirvish
The structure follows `dired`'s evil-collection's.

Ref: 5886bab852/modes/dired/evil-collection-dired.el (L205-L212)
2024-06-23 15:55:58 -04:00
Samuel Tschiedel
0f09d6f748 fix(dired): update dirvish keybindings
This is another temporary fix to buy us more time until doomemacs#6760
lands.
2024-06-23 15:55:58 -04:00
StrawberryTea
c03113906a
fix(dired): hide flycheck temp files 2024-03-05 01:11:19 -05:00
Filipe Regadas
bd6a382b18
fix(dired): void-variable dired-omit-files error
Caused by a recent bump to :emacs dired (see e242ac9).

Fix: #6562
Amend: e242ac9548
2024-02-05 19:29:24 -05:00
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Ellis Kenyő
9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
24623f9959
refactor!(dired): move diff-hl config to :ui vc-gutter
BREAKING CHANGE: users who are used to diff-hl displaying diffs in dired
will notice they have vanished. diff-hl's conig has been moved to :ui
vc-gutter +diff-hl (added in 27a448b). Enable it to get it back.

Ref: 27a448b04b
2022-08-09 16:30:43 +02:00
Henrik Lissner
27a448b04b
feat(vc-gutter): add +diff-hl backend
This adds an alternative backend to the :ui vc-gutter module, enabled
with the +diff-hl flag. In the future, I intend for diff-hl to replace
git-gutter, as it is slightly faster and depends on more native
functionality (vc.el), but it's still a little buggy. It will remain
opt-in until those issues are sorted out.
2022-08-08 18:23:47 +02:00
4shen0ne
1e6d5c3f65
feat(dired): add +dirvish option
Fix: #6397
2022-06-23 13:47:22 +02:00
Henrik Lissner
fc868105ce
fix(dired): prevent auto-revert in dired-virtual-mode
dired-virtual-revert (the revert handler for dired-virtual buffers)
simply errors out and prompts the user if they want to switch to a
"real" dired buffer. This isn't helpful the automated nature of
auto-revert, so silence it.
2022-02-14 21:24:46 +01:00
Anh T Nguyen
8342db4f35 tweak(dired): all-the-icons-dired-monochrome = nil
To be consistent with all-the-icons uses elsewhere.

Ref: #5704
Co-authored-by: Anh T Nguyen <teeann@users.noreply.github.com>
2022-01-28 15:27:33 +01:00
Lele Gaifax
e5213f20e5 nit: fix several documentation typos 2022-01-10 02:21:49 +01:00
Gavin Downard
96390ef3b9 tweak(dired): don't auto-revert when remote
On slow connections `dired-auto-revert-buffer` causes excessive
slowdowns; this limits its behavior to local files.
2022-01-03 18:06:23 +01:00
Itai Y. Efrat
b3b875e226 fix(dired): dired-omit-files additions
- escape initial `.`
- use only noncapturing groups
2021-10-28 20:39:51 +02:00
Itai Y. Efrat
f0d0ce65ed fix(dired): ranger-travel bug
Overrides ranger-travel to have better mode detection for which
completion framework to use, and default to emacs built-ins instead of
ido.

In theory this should be a temporary fix until ralesi/ranger.el#236 gets
merged, but the maintenance status of ranger.el is not clear.

Fix #5509
Ref ralesi/ranger.el#236
2021-10-05 02:30:23 +02:00
Itai Y. Efrat
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
Henrik Lissner
dec15832de Fix #4877: dired not sorting directories first
On macOS and Linux, because ls-lisp hasn't been loaded yet.
2021-04-17 00:04:45 -04:00
Henrik Lissner
33af1f98b4 emacs/dired: drop non-standard switches on Windows
On Windows (or systems that don't support ls),
ls-lisp-use-insert-directory-program will be nil. In these cases, strip
out non-standard switches so they don't throw an error and make dired unusuable.

Fixes #3939
2021-04-14 23:43:45 -04:00
Valentin Herrmann
79c61629a5
Better defaults for dired 2021-03-09 16:43:22 +01:00
t-e-r-m
1dd796b180 Added :defer to dired-aux use-package! 2020-08-29 21:08:57 +05:30
t-e-r-m
0ef8f0031f configure dired-aux variables
`dired-create-destination-dirs` : set to "ask", non-existent directories will be
created when copying, if the user consents.
`dired-vc-rename-file` : rename file using the vc system, if present
2020-08-29 18:45:31 +05:30
t-e-r-m
4e92adaa08 Configure dired-git-info variables
dgi-commit-message-format set to

%h  - Abbreviated commit hash
%cs - committer date, short format (YYYY-MM-DD)
%s  - subject

First two are fixed-width, which makes it look neater.
2020-08-19 18:28:27 +05:30
Henrik Lissner
523e945a3a
Fix #3215: ripgrep reporting error code 2 on Windows
Closes #3512
2020-07-17 19:24:26 -04:00
Henrik Lissner
07714a12d4
Fix wrong-type-argument: sequencep 45 opening dired 2020-05-25 22:16:11 -04:00
Henrik Lissner
b625a54db6
Add -v switch to dired-listing-switches (for GNU ls)
Natural sorting of ls file list (when it comes to numbers/versions in
file names).
2020-05-25 03:43:40 -04:00
Henrik Lissner
ea18c83c0a
General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
Henrik Lissner
bc0db09a28
Fix #1703: dired not listing files over TRAMP 2020-05-12 23:22:50 -04:00
Henrik Lissner
bd6405673e
Fix #1703: dired listing no files over tramp
...on systems that don't have GNU ls installed and don't support
--group-directories-first
2020-05-03 13:39:29 -04:00
Henrik Lissner
7481bfd4d5
Remove -B from dired-listing-switches default
i.e. don't hide backup files in dired, or let dired-omit-mode handle
those.
2020-03-06 15:45:24 -05:00
Henrik Lissner
a4194c5746
Fix #1929: advice on non-existent functions 2020-02-29 11:29:25 -05:00
Mihai Dinu
46cc7f7fdf
Don't do dired git highlighting if remote
Fixes https://github.com/hlissner/doom-emacs/issues/2439
2020-01-27 23:50:05 +01:00
Henrik Lissner
2d97b877ed
Remove duplicate image-dired-dir setting 2020-01-06 04:49:57 -05:00