fix(emacs): reasonable behaviour for neotree in dired buffers
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
6bd95ffd8e
commit
81c3106161
1 changed files with 4 additions and 3 deletions
|
@ -111,9 +111,9 @@
|
||||||
"Toggle neotree at the current directory."
|
"Toggle neotree at the current directory."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((current-directory
|
(let ((current-directory
|
||||||
(if buffer-file-name
|
(or (and buffer-file-name (file-name-directory buffer-file-name))
|
||||||
(file-name-directory buffer-file-name)
|
(and (eq major-mode 'dired-mode) (dired-current-directory))
|
||||||
"~")))
|
"~")))
|
||||||
(if (and (fboundp 'neo-global--window-exists-p)
|
(if (and (fboundp 'neo-global--window-exists-p)
|
||||||
(neo-global--window-exists-p))
|
(neo-global--window-exists-p))
|
||||||
(neotree-hide)
|
(neotree-hide)
|
||||||
|
@ -122,6 +122,7 @@
|
||||||
(keymap-global-set "C-c t" #'neotree-toggle-current-directory)
|
(keymap-global-set "C-c t" #'neotree-toggle-current-directory)
|
||||||
(setq neo-theme 'icons)
|
(setq neo-theme 'icons)
|
||||||
(setq neo-smart-open t)
|
(setq neo-smart-open t)
|
||||||
|
(setq neo-window-fixed-size nil)
|
||||||
(add-hook 'neotree-mode-hook (lambda () (text-scale-set -0.5)))
|
(add-hook 'neotree-mode-hook (lambda () (text-scale-set -0.5)))
|
||||||
|
|
||||||
;; Orderless
|
;; Orderless
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue