[global] Multiple small improvements.
This commit is contained in:
parent
b1e4da735e
commit
24582f7a1c
@ -49,103 +49,103 @@
|
||||
(defun all-the-icons-icon-for-dir (dir &optional chevron padding)
|
||||
"Format an icon for DIR with CHEVRON similar to tree based directories."
|
||||
(let* ((matcher (all-the-icons-match-to-alist (file-name-base (directory-file-name dir)) all-the-icons-dir-icon-alist))
|
||||
(path (expand-file-name dir))
|
||||
(chevron (if chevron (all-the-icons-octicon (format "chevron-%s" chevron) :height 0.8 :v-adjust -0.1) ""))
|
||||
(padding (or padding "\t"))
|
||||
(icon (cond
|
||||
((file-symlink-p path)
|
||||
(all-the-icons-octicon "file-symlink-directory" :height 1.0 :v-adjust 0.0))
|
||||
((all-the-icons-dir-is-submodule path)
|
||||
(all-the-icons-octicon "file-submodule" :height 1.0 :v-adjust 0.0))
|
||||
((file-exists-p (format "%s/.git" path))
|
||||
(format "%s" (all-the-icons-octicon "repo" :height 1.1 :v-adjust 0.0)))
|
||||
(t (apply (car matcher) (list (cadr matcher) :v-adjust 0.0))))))
|
||||
(format "%s%s%s%s%s" padding chevron padding icon padding)))
|
||||
(path (expand-file-name dir))
|
||||
(chevron (if chevron (all-the-icons-octicon (format "chevron-%s" chevron) :height 0.8 :v-adjust -0.1) ""))
|
||||
(padding (or padding "\t"))
|
||||
(icon (cond
|
||||
((file-symlink-p path)
|
||||
(all-the-icons-octicon "file-symlink-directory" :height 1.0 :v-adjust 0.0))
|
||||
((all-the-icons-dir-is-submodule path)
|
||||
(all-the-icons-octicon "file-submodule" :height 1.0 :v-adjust 0.0))
|
||||
((file-exists-p (format "%s/.git" path))
|
||||
(format "%s" (all-the-icons-octicon "repo" :height 1.1 :v-adjust 0.0)))
|
||||
(t (apply (car matcher) (list (cadr matcher) :v-adjust 0.0))))))
|
||||
(format "%s%s%s%s%s" padding chevron padding icon padding)))
|
||||
|
||||
(defun all-the-icons-reset ()
|
||||
"Reset (unmemoize/memoize) the icons."
|
||||
(interactive)
|
||||
(dolist (f '(all-the-icons-icon-for-file
|
||||
all-the-icons-icon-for-mode
|
||||
all-the-icons-icon-for-url
|
||||
all-the-icons-icon-family-for-file
|
||||
all-the-icons-icon-family-for-mode
|
||||
all-the-icons-icon-family))
|
||||
(ignore-errors
|
||||
(memoize-restore f)
|
||||
(memoize f)))
|
||||
all-the-icons-icon-for-mode
|
||||
all-the-icons-icon-for-url
|
||||
all-the-icons-icon-family-for-file
|
||||
all-the-icons-icon-family-for-mode
|
||||
all-the-icons-icon-family))
|
||||
(ignore-errors
|
||||
(memoize-restore f)
|
||||
(memoize f)))
|
||||
(message "Reset all-the-icons")))
|
||||
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(bongo-playlist-mode all-the-icons-material "playlist_play" :height 1.2 :v-adjust -0.2 :face 'all-the-icons-green))
|
||||
'(bongo-playlist-mode all-the-icons-material "playlist_play" :height 1.2 :v-adjust -0.2 :face 'all-the-icons-green))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(bongo-library-mode all-the-icons-material "library_music" :height 1.1 :v-adjust -0.2 :face 'all-the-icons-dgreen))
|
||||
'(bongo-library-mode all-the-icons-material "library_music" :height 1.1 :v-adjust -0.2 :face 'all-the-icons-dgreen))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(gnus-group-mode all-the-icons-fileicon "gnu" :face 'all-the-icons-silver))
|
||||
'(gnus-group-mode all-the-icons-fileicon "gnu" :face 'all-the-icons-silver))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(gnus-summary-mode all-the-icons-octicon "inbox" :height 1.0 :v-adjust 0.0 :face 'all-the-icons-orange))
|
||||
'(gnus-summary-mode all-the-icons-octicon "inbox" :height 1.0 :v-adjust 0.0 :face 'all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(gnus-article-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
||||
'(gnus-article-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(message-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
||||
'(message-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(diff-mode all-the-icons-octicon "git-compare" :v-adjust 0.0 :face all-the-icons-lred))
|
||||
'(diff-mode all-the-icons-octicon "git-compare" :v-adjust 0.0 :face all-the-icons-lred))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(flycheck-error-list-mode all-the-icons-octicon "checklist" :height 1.1 :v-adjust 0.0 :face all-the-icons-lred))
|
||||
'(flycheck-error-list-mode all-the-icons-octicon "checklist" :height 1.1 :v-adjust 0.0 :face all-the-icons-lred))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(elfeed-search-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
'(elfeed-search-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(elfeed-show-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
||||
'(elfeed-show-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(newsticker-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
'(newsticker-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(newsticker-treeview-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
'(newsticker-treeview-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(newsticker-treeview-list-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-orange))
|
||||
'(newsticker-treeview-list-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(newsticker-treeview-item-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
||||
'(newsticker-treeview-item-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.[bB][iI][nN]$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
'("\\.[bB][iI][nN]$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.c?make$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange))
|
||||
'("\\.c?make$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.conf$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
'("\\.conf$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.toml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
'("\\.toml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(conf-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
'(conf-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(conf-space-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
'(conf-space-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(forge-topic-mode all-the-icons-alltheicon "git" :face all-the-icons-blue))
|
||||
'(forge-topic-mode all-the-icons-alltheicon "git" :face all-the-icons-blue))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.xpm$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dgreen))
|
||||
'("\\.xpm$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dgreen))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(help-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
||||
'(help-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(helpful-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
||||
'(helpful-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(Info-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1))
|
||||
'(Info-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("NEWS$" all-the-icons-faicon "newspaper-o" :height 0.9 :v-adjust -0.2))
|
||||
'("NEWS$" all-the-icons-faicon "newspaper-o" :height 0.9 :v-adjust -0.2))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("Cask\\'" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
||||
'("Cask\\'" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(cask-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
||||
'(cask-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'(".*\\.ipynb\\'" all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
||||
'(".*\\.ipynb\\'" all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(ein:notebooklist-mode all-the-icons-faicon "book" :face all-the-icons-lorange))
|
||||
'(ein:notebooklist-mode all-the-icons-faicon "book" :face all-the-icons-lorange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(ein:notebook-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
||||
'(ein:notebook-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(ein:notebook-multilang-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-dorange))
|
||||
'(ein:notebook-multilang-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-dorange))
|
||||
(add-to-list 'all-the-icons-icon-alist
|
||||
'("\\.epub\\'" all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
||||
'("\\.epub\\'" all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(nov-mode all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
||||
'(nov-mode all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist
|
||||
'(gfm-mode all-the-icons-octicon "markdown" :face all-the-icons-lblue)))
|
||||
'(gfm-mode all-the-icons-octicon "markdown" :face all-the-icons-lblue)))
|
||||
|
||||
;; ATIDiredPac
|
||||
(use-package all-the-icons-dired
|
||||
@ -159,7 +159,7 @@
|
||||
;; Workaround for all-the-icons bug until PR merged https://github.com/domtronn/all-the-icons.el/pull/150
|
||||
(when (require 'all-the-icons nil 'noerror)
|
||||
(setq all-the-icons-mode-icon-alist
|
||||
(delete '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0 :face all-the-icons-white) all-the-icons-mode-icon-alist))
|
||||
(delete '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0 :face all-the-icons-white) all-the-icons-mode-icon-alist))
|
||||
(add-to-list 'all-the-icons-mode-icon-alist '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0))))
|
||||
;; -ATIDiredPac
|
||||
|
||||
|
@ -64,14 +64,15 @@
|
||||
;; -DefBindings
|
||||
|
||||
;; UTF8Coding
|
||||
(set-selection-coding-system 'utf-8)
|
||||
(prefer-coding-system 'utf-8)
|
||||
(set-language-environment "UTF-8")
|
||||
(set-default-coding-systems 'utf-8)
|
||||
(unless *sys/win32*
|
||||
(set-selection-coding-system 'utf-8)
|
||||
(prefer-coding-system 'utf-8)
|
||||
(set-language-environment "UTF-8")
|
||||
(set-default-coding-systems 'utf-8)
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
(setq locale-coding-system 'utf-8))
|
||||
|
||||
;; Treat clipboard input as UTF-8 string first; compound text next, etc.
|
||||
(when *sys/gui*
|
||||
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
|
||||
|
@ -6,7 +6,7 @@
|
||||
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
||||
;; Created: Mon Jun 10 18:58:02 2019 (-0400)
|
||||
;; Version: 2.0.0
|
||||
;; Last-Updated: lun. janv. 13 14:24:17 2020 (+0100)
|
||||
;; Last-Updated: mer. janv. 15 09:40:51 2020 (+0100)
|
||||
;; By: Mikaël Capelle
|
||||
;; URL: https://github.com/MatthewZMD/.emacs.d
|
||||
;; Keywords: lsp-python-ms
|
||||
@ -60,17 +60,20 @@
|
||||
(flycheck-add-next-checker 'python-flake8 'python-mypy))
|
||||
|
||||
(use-package elpy
|
||||
:defer t
|
||||
:bind
|
||||
(("M-/" . elpy-company-backend))
|
||||
:custom
|
||||
(flycheck-python-flake8-executable "python")
|
||||
(python-indent-offset 4)
|
||||
(python-shell-interpreter "ipython")
|
||||
(python-shell-interpreter-args "-i --simple-prompt")
|
||||
:config
|
||||
(setq elpy-rpc-backend "jedi")
|
||||
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
|
||||
(add-hook 'elpy-mode-hook 'flycheck-mode)
|
||||
:init
|
||||
(setq elpy-rpc-backend "jedi")
|
||||
(elpy-enable))
|
||||
(advice-add 'python-mode :before 'elpy-enable))
|
||||
|
||||
(use-package ein
|
||||
:custom
|
||||
|
@ -84,10 +84,11 @@
|
||||
;; Whitespace
|
||||
(setq-default fill-column 95)
|
||||
(setq-default whitespace-line-column 95)
|
||||
(add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 100)))
|
||||
(add-hook 'LaTeX-mode-hook (lambda () (setq-local whitespace-line-column -1)))
|
||||
(add-hook 'markdown-mode-hook (lambda () (setq-local whitespace-line-column -1)))
|
||||
(add-hook 'web-mode-hook (lambda () (setq-local whitespace-line-column -1)))
|
||||
(add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 92)))
|
||||
(add-hook 'LaTeX-mode-hook (lambda () (setq-local whitespace-line-column 999)))
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (setq-local whitespace-line-column 999)))
|
||||
(add-hook 'markdown-mode-hook (lambda () (setq-local whitespace-line-column 999)))
|
||||
(add-hook 'web-mode-hook (lambda () (setq-local whitespace-line-column 999)))
|
||||
(add-hook 'text-mode-hook #'whitespace-mode)
|
||||
(add-hook 'prog-mode-hook #'whitespace-mode)
|
||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||
|
Loading…
Reference in New Issue
Block a user