-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing a custom for user defined repositories #129
Open
palikar
wants to merge
1
commit into
domtronn:master
Choose a base branch
from
palikar:custom_repositories
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||||
---|---|---|---|---|---|---|
|
@@ -118,6 +118,23 @@ | |||||
:group 'all-the-icons | ||||||
:type 'number) | ||||||
|
||||||
|
||||||
(defcustom all-the-icons-mode-repositories | ||||||
'(".git" ; Git VCS root dir | ||||||
".hg" ; Mercurial VCS root dir | ||||||
".fslckout" ; Fossil VCS root dir | ||||||
"_FOSSIL_" ; Fossil VCS root DB on Windows | ||||||
".bzr" ; Bazaar VCS root dir | ||||||
"_darcs" ; Darcs VCS root dir | ||||||
".svn" ; Svn VCS root dir | ||||||
"CVS" ; Csv VCS root dir | ||||||
) | ||||||
"A list of files considered to mark the root of a repository." | ||||||
:group 'all-the-icons | ||||||
:type '(repeat string)) | ||||||
|
||||||
|
||||||
|
||||||
(defvar all-the-icons-font-families '() "List of defined icon font families.") | ||||||
(defvar all-the-icons-font-names '() "List of defined font file names this package was built with.") | ||||||
|
||||||
|
@@ -526,6 +543,12 @@ | |||||
;; Functions Start | ||||||
;; ==================== | ||||||
|
||||||
(defun* all-the-icons-is-repo (path) | ||||||
"Check if PATH is a repository." | ||||||
(dolist (repo all-the-icons-mode-repositories) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Emacs already has a
Suggested change
Don't forget to load this variable somewhere in your file as well. |
||||||
(when (file-exists-p (format "%s/%s" path repo)) | ||||||
(return-from all-the-icons-is-repo t)))) | ||||||
|
||||||
(defun all-the-icons-auto-mode-match? (&optional file) | ||||||
"Whether or not FILE's `major-mode' match against its `auto-mode-alist'." | ||||||
(let* ((file (or file (buffer-file-name) (buffer-name))) | ||||||
|
@@ -566,7 +589,7 @@ directory contents" | |||||
(all-the-icons-octicon "file-symlink-directory" :height 1.0)) | ||||||
((all-the-icons-dir-is-submodule path) | ||||||
(all-the-icons-octicon "file-submodule" :height 1.0)) | ||||||
((file-exists-p (format "%s/.git" path)) | ||||||
((all-the-icons-is-repo path) | ||||||
(format "%s" (all-the-icons-octicon "repo" :height 1.1))) | ||||||
(t (apply (car matcher) (cdr matcher)))))) | ||||||
(format "%s%s%s%s%s" padding chevron padding icon padding))) | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.