From 860fa886e94e29641970b7203b3030a4cbac387b Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:10:27 +0100 Subject: [PATCH] update neotree Signed-off-by: Andreas Gerler --- elpa/neotree-20200324.1946/icons/close.xpm | 40 ----------------- elpa/neotree-20200324.1946/icons/leaf.xpm | 34 --------------- elpa/neotree-20200324.1946/icons/open.xpm | 39 ----------------- elpa/neotree-20200324.1946/neotree-pkg.el | 12 ------ .../neotree-autoloads.el | 43 ++++++++----------- elpa/neotree-20240721.233/neotree-pkg.el | 9 ++++ .../neotree.el | 25 +++++++++-- 7 files changed, 50 insertions(+), 152 deletions(-) delete mode 100644 elpa/neotree-20200324.1946/icons/close.xpm delete mode 100644 elpa/neotree-20200324.1946/icons/leaf.xpm delete mode 100644 elpa/neotree-20200324.1946/icons/open.xpm delete mode 100644 elpa/neotree-20200324.1946/neotree-pkg.el rename elpa/{neotree-20200324.1946 => neotree-20240721.233}/neotree-autoloads.el (60%) create mode 100644 elpa/neotree-20240721.233/neotree-pkg.el rename elpa/{neotree-20200324.1946 => neotree-20240721.233}/neotree.el (98%) diff --git a/elpa/neotree-20200324.1946/icons/close.xpm b/elpa/neotree-20200324.1946/icons/close.xpm deleted file mode 100644 index 116c1db3..00000000 --- a/elpa/neotree-20200324.1946/icons/close.xpm +++ /dev/null @@ -1,40 +0,0 @@ -/* XPM */ -static char * close_xpm[] = { -"16 22 15 1", -" c None", -". c #848400", -"+ c #E7E79C", -"@ c #E7E794", -"# c #DEDE8C", -"$ c #ADAD39", -"% c #ADAD42", -"& c #B5B54A", -"* c #B5B552", -"= c #BDBD5A", -"- c #9C9C29", -"; c #A5A531", -"> c #C6C663", -", c #C6C66B", -"' c #CECE73", -" ", -" ", -" ", -" ", -" ", -" ", -" .... ", -".+@@#....... ", -".....$%%&&*=. ", -".-;;$%%&&*==. ", -".;;$%%&&*===. ", -".;$%%&&*===>. ", -".$%%&&*===>,. ", -".%%&&*===>,,. ", -".%&&*===>,,'. ", -"............. ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/elpa/neotree-20200324.1946/icons/leaf.xpm b/elpa/neotree-20200324.1946/icons/leaf.xpm deleted file mode 100644 index 53a86c75..00000000 --- a/elpa/neotree-20200324.1946/icons/leaf.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char * leaf_xpm[] = { -"16 22 9 1", -" c None", -". c #424242", -"+ c #949494", -"@ c #9C9C9C", -"# c #A5A5A5", -"$ c #ADADAD", -"% c #848484", -"& c #B5B5B5", -"* c #BDBDBD", -" ", -" ", -" ", -" ", -" ", -"....... ", -".++@@#.. ", -".+@@##.$. ", -".@@###.... ", -".@%%%+%$&. ", -".###$$$&&. ", -".#%+%%%&*. ", -".#$$$&&**. ", -".$%%+%%**. ", -".$$&&****. ", -".$&&*****. ", -".......... ", -" ", -" ", -" ", -" ", -" "}; diff --git a/elpa/neotree-20200324.1946/icons/open.xpm b/elpa/neotree-20200324.1946/icons/open.xpm deleted file mode 100644 index 6c959f7b..00000000 --- a/elpa/neotree-20200324.1946/icons/open.xpm +++ /dev/null @@ -1,39 +0,0 @@ -/* XPM */ -static char * open_xpm[] = { -"16 22 14 1", -" c None", -". c #848400", -"+ c #D6D67B", -"@ c #CECE7B", -"# c #CECE73", -"$ c #C6C66B", -"% c #BDBD5A", -"& c #BDBD52", -"* c #ADAD39", -"= c #ADAD42", -"- c #B5B54A", -"; c #C6C663", -"> c #CECE6B", -", c #A5A5C6", -" ", -" ", -" ", -" ", -" ", -" ", -" .... ", -".+@@#..... ", -".@@##$$%%&. ", -".@#.......... ", -".#.*==--&%%;;. ", -".#.==--&%%;;. ", -"..==--&%%;;$. ", -"..=--&%%;;$. ", -".=--&%%;;$>. ", -"........... ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/elpa/neotree-20200324.1946/neotree-pkg.el b/elpa/neotree-20200324.1946/neotree-pkg.el deleted file mode 100644 index 79071330..00000000 --- a/elpa/neotree-20200324.1946/neotree-pkg.el +++ /dev/null @@ -1,12 +0,0 @@ -(define-package "neotree" "20200324.1946" "A tree plugin like NerdTree for Vim" - '((cl-lib "0.5")) - :commit "98fe21334affaffe2334bf7c987edaf1980d2d0b" :authors - '(("jaypei" . "jaypei97159@gmail.com")) - :maintainers - '(("jaypei" . "jaypei97159@gmail.com")) - :maintainer - '("jaypei" . "jaypei97159@gmail.com") - :url "https://github.com/jaypei/emacs-neotree") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/neotree-20200324.1946/neotree-autoloads.el b/elpa/neotree-20240721.233/neotree-autoloads.el similarity index 60% rename from elpa/neotree-20200324.1946/neotree-autoloads.el rename to elpa/neotree-20240721.233/neotree-autoloads.el index 61efe614..dc28ab8d 100644 --- a/elpa/neotree-20200324.1946/neotree-autoloads.el +++ b/elpa/neotree-20240721.233/neotree-autoloads.el @@ -1,20 +1,21 @@ -;;; neotree-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; neotree-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "neotree" "neotree.el" (0 0 0 0)) ;;; Generated autoloads from neotree.el (autoload 'neotree-find "neotree" "\ Quick select node which specified PATH in NeoTree. If path is nil and no buffer file name, then use DEFAULT-PATH, -\(fn &optional PATH DEFAULT-PATH)" t nil) - +(fn &optional PATH DEFAULT-PATH)" t) (autoload 'neotree-projectile-action "neotree" "\ Integration with `Projectile'. @@ -22,37 +23,31 @@ Usage: (setq projectile-switch-project-action 'neotree-projectile-action). When running `projectile-switch-project' (C-c p p), `neotree' will change root -automatically." t nil) - +automatically." t) (autoload 'neotree-toggle "neotree" "\ -Toggle show the NeoTree window." t nil) - +Toggle show the NeoTree window." t) (autoload 'neotree-show "neotree" "\ -Show the NeoTree window." t nil) - +Show the NeoTree window." t) (autoload 'neotree-hide "neotree" "\ -Close the NeoTree window." t nil) - +Close the NeoTree window." t) (autoload 'neotree-dir "neotree" "\ Show the NeoTree window, and change root to PATH. -\(fn PATH)" t nil) - +(fn PATH)" t) (defalias 'neotree 'neotree-show "\ Show the NeoTree window.") - (register-definition-prefixes "neotree" '("neo" "off-p")) - -;;;*** -;;;### (autoloads nil nil ("neotree-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'neotree-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; neotree-autoloads.el ends here diff --git a/elpa/neotree-20240721.233/neotree-pkg.el b/elpa/neotree-20240721.233/neotree-pkg.el new file mode 100644 index 00000000..7b5d9df4 --- /dev/null +++ b/elpa/neotree-20240721.233/neotree-pkg.el @@ -0,0 +1,9 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "neotree" "20240721.233" + "A tree plugin like NerdTree for Vim." + '((cl-lib "0.5")) + :url "https://github.com/jaypei/emacs-neotree" + :commit "599bd049a5d9cfab8a0d7ab7bec99d58b4581751" + :revdesc "599bd049a5d9" + :authors '(("jaypei" . "jaypei97159@gmail.com")) + :maintainers '(("jaypei" . "jaypei97159@gmail.com"))) diff --git a/elpa/neotree-20200324.1946/neotree.el b/elpa/neotree-20240721.233/neotree.el similarity index 98% rename from elpa/neotree-20200324.1946/neotree.el rename to elpa/neotree-20240721.233/neotree.el index 0156cb9b..42b5b335 100644 --- a/elpa/neotree-20200324.1946/neotree.el +++ b/elpa/neotree-20240721.233/neotree.el @@ -4,7 +4,8 @@ ;; Author: jaypei ;; URL: https://github.com/jaypei/emacs-neotree -;; Version: 0.5.1 +;; Package-Version: 20240721.233 +;; Package-Revision: 599bd049a5d9 ;; Package-Requires: ((cl-lib "0.5")) ;; This program is free software; you can redistribute it and/or modify @@ -209,12 +210,15 @@ window." `ascii' is the simplest style, it will use +/- to display the fold state, it suitable for terminal. `arrow' use unicode arrow. -`nerd' use the nerdtree indentation mode and arrow." +`nerd' use the nerdtree indentation mode and arrow. +`icons' use icons from `all-the-icons' when installed. +`nerd-icons' use icons from `nerd-icons' when installed." :group 'neotree :type '(choice (const classic) (const ascii) (const arrow) (const icons) + (const nerd-icons) (const nerd))) (defcustom neo-mode-line-type 'neotree @@ -1237,6 +1241,12 @@ Return nil if DIR is not an existing directory." 'xpm nil :ascent 'center :mask '(heuristic t))) image)) +(defun neo--nerd-icons-icon-for-dir-with-chevron (dir &optional chevron padding) + (let ((icon (nerd-icons-icon-for-dir dir)) + (chevron (if chevron (nerd-icons-octicon (format "nf-oct-chevron_%s" chevron) :height 0.8 :v-adjust -0.1) "")) + (padding (or padding "\t"))) + (format "%s%s%s%s%s" padding chevron padding icon padding))) + (defun neo-buffer--insert-fold-symbol (name &optional node-name) "Write icon by NAME, the icon style affected by neo-theme. `open' write opened folder icon. @@ -1267,6 +1277,13 @@ Optional NODE-NAME is used for the `icons' theme" (or (and (equal name 'open) (insert (all-the-icons-icon-for-dir-with-chevron (directory-file-name node-name) "down"))) (and (equal name 'close) (insert (all-the-icons-icon-for-dir-with-chevron (directory-file-name node-name) "right"))) (and (equal name 'leaf) (insert (format "\t\t\t%s\t" (all-the-icons-icon-for-file node-name)))))) + ((equal neo-theme 'nerd-icons) + (unless (require 'nerd-icons nil 'noerror) + (error "Package `nerd-icons' isn't installed")) + (setq-local tab-width 1) + (or (and (equal name 'open) (insert (neo--nerd-icons-icon-for-dir-with-chevron (directory-file-name node-name) "down"))) + (and (equal name 'close) (insert (neo--nerd-icons-icon-for-dir-with-chevron (directory-file-name node-name) "right"))) + (and (equal name 'leaf) (insert (format "\t\t\t%s\t" (nerd-icons-icon-for-file node-name)))))) (t (or (and (equal name 'open) (funcall n-insert-symbol "- ")) (and (equal name 'close) (funcall n-insert-symbol "+ "))))))) @@ -1589,7 +1606,9 @@ If there is no button in current line, then return DEFAULT." (if buffer (with-current-buffer buffer (set-visited-file-name to-path nil t))) - (rename-file current-path to-path 1) + (if (vc-registered current-path) + (vc-rename-file current-path to-path) + (rename-file current-path to-path 1)) (neo-buffer--refresh t) (message "Rename successful.")))) -- 2.47.3