;;; 08-custom-packages --- Provide all the use-package declarations
|
|
|
|
;;; Commentary:
|
|
;;
|
|
;; See https://github.com/jwiegley/use-package for help
|
|
;; USE PACKAGE help
|
|
;; (use-package package-here
|
|
;; :commands (cmd cmd-all cmd-etc) ;; List commands used to ":defer" the package
|
|
;; :bind-keymap
|
|
;; ("M-q" . package-here-keymap) ;; Setup an entire keymap using Prefix "M-q"
|
|
;; :bind
|
|
;; (("M-s" . cmd) ;; Available Globally
|
|
;; :map here-mode-map
|
|
;; ("C-t" . cmd-all) ;; Available only in "here-mode"
|
|
;; ("C-e" . cmd-etc)) ;; Available only in "here-mode"
|
|
;; :init
|
|
;; (setq stuff t) ;; declar vars etc...
|
|
;; :config
|
|
;; (here-mode 1) ;; eval stuff here after the init
|
|
;;
|
|
;; (use-package ruby-mode
|
|
;; :mode "\\.rb\\'"
|
|
;; :interpreter "ruby"
|
|
;;
|
|
;; ;; OR when the package name isn't the same as the =mode=
|
|
;; (use-package python
|
|
;; :mode ("\\.py\\'" . python-mode)
|
|
;; :interpreter ("python" . python-mode))
|
|
;;
|
|
;; USE ":defer" when you aren't using either :commands, :bind, :bind*, :bind-keymap, :bind-keymap*, :mode, :interpreter, or :hook
|
|
;; (use-package deferred-package
|
|
;; :defer t)
|
|
|
|
;;; Code:
|
|
|
|
;; https://melpa.org/#/async
|
|
(use-package async
|
|
:ensure t)
|
|
|
|
;; https://github.com/myrjola/diminish.el
|
|
(use-package diminish
|
|
:ensure t
|
|
:demand t
|
|
)
|
|
|
|
;; https://elpa.gnu.org/packages/delight.html
|
|
(use-package delight
|
|
:ensure t)
|
|
|
|
;; https://github.com/winterTTr/ace-jump-mode
|
|
(use-package ace-jump-mode
|
|
:bind
|
|
(("C-c SPC" . just-one-space)
|
|
("M-SPC" . ace-jump-mode)))
|
|
|
|
;; https://github.com/NicolasPetton/zerodark-theme
|
|
(use-package zerodark-theme
|
|
:ensure t
|
|
:config
|
|
(load-theme 'zerodark t)
|
|
(zerodark-setup-modeline-format))
|
|
|
|
;; https://github.com/Malabarba/beacon
|
|
(use-package beacon
|
|
:diminish
|
|
:ensure t
|
|
:commands beacon-mode
|
|
:demand t
|
|
:init
|
|
(setq beacon-size 70
|
|
beacon-color "#5B6268"
|
|
beacon-blink-delay 0.1
|
|
beacon-blink-duration 0.4
|
|
beacon-blink-when-focused t)
|
|
(beacon-mode 1))
|
|
|
|
;; https://github.com/iqbalansari/emacs-emojify
|
|
(use-package emojify
|
|
:ensure t
|
|
:defer 15
|
|
:config
|
|
(global-emojify-mode 1))
|
|
|
|
;; https://github.com/hrs/engine-mode
|
|
(use-package engine-mode
|
|
:ensure t
|
|
:defer 5
|
|
:commands (engine/get-query engine/execute-search)
|
|
:config
|
|
;; C-x / to start
|
|
(defengine google "https://www.google.com/search?q=%s"
|
|
:keybinding "a")
|
|
(defengine github "https://github.com/search?q=%s"
|
|
:keybinding "g")
|
|
(defengine vlocity "https://success.vlocity.com/s/searchunifylightning?searchString=%s"
|
|
:keybinding "v")
|
|
(defengine duckduckgo "https://duckduckgo.com/?q=%s"
|
|
:keybinding "d")
|
|
(defengine melpa "https://melpa.org/#/?q=%s"
|
|
:keybinding "m")
|
|
(engine-mode 1))
|
|
|
|
;; https://github.com/Fanael/rainbow-delimiters
|
|
(use-package rainbow-delimiters
|
|
:ensure t
|
|
:hook (prog-mode . rainbow-delimiters-mode))
|
|
|
|
;; rainbow-mode
|
|
(use-package rainbow-mode
|
|
:ensure t
|
|
:hook prog-mode)
|
|
|
|
;; M-x all-the-icons-install-fonts
|
|
(use-package all-the-icons
|
|
:ensure t)
|
|
|
|
;; https://github.com/emacs-dashboard/emacs-dashboard
|
|
(use-package dashboard
|
|
:ensure t
|
|
:preface
|
|
(defvar show-week-agenda-p)
|
|
:init
|
|
(setq dashboard-items '((recents . 10)
|
|
(bookmarks . 5)
|
|
(projects . 5)
|
|
(agenda . 5)))
|
|
(setq dashboard-center-content t)
|
|
(setq dashboard-banner-logo-title "Let's do this...")
|
|
(setq dashboard-startup-banner 1)
|
|
(setq dashboard-show-shortcuts t)
|
|
(setq show-week-agenda-p t)
|
|
(setq dashboard-org-agenda-categories '("work" "tasks"))
|
|
:config
|
|
(dashboard-setup-startup-hook))
|
|
|
|
;; counsel
|
|
(use-package counsel
|
|
:ensure t
|
|
:demand t
|
|
:bind
|
|
("M-x" . counsel-M-x)
|
|
("C-c k" . counsel-rg)
|
|
("C-x C-f" . counsel-find-file)
|
|
("C-x f" . counsel-recentf)
|
|
("C-x C-d" . counsel-dired)
|
|
("C-x p" . counsel-package)
|
|
("C-x b" . counsel-bookmark)
|
|
("C-x c" . counsel-colors-web)
|
|
("C-c C-d" . counsel-org-capture)
|
|
|
|
;; Describe Replacements
|
|
("C-h f" . counsel-describe-function)
|
|
("C-h v" . counsel-describe-variable)
|
|
("C-h b" . counsel-descbinds)
|
|
|
|
("M-y" . counsel-yank-pop)
|
|
;; Ivy
|
|
("C-c b" . ivy-switch-buffer)
|
|
("C-c c" . ivy-resume)
|
|
|
|
;; Swiper
|
|
("C-s" . swiper)
|
|
:config
|
|
(ivy-mode 1)
|
|
)
|
|
|
|
(use-package amx
|
|
:ensure t
|
|
:config (amx-mode 1)
|
|
)
|
|
|
|
;; https://github.com/magnars/expand-region.el
|
|
(use-package expand-region
|
|
:ensure t
|
|
:bind
|
|
("C-@" . er/expand-region)
|
|
("C-#" . er/contract-region))
|
|
|
|
;; https://github.com/thanhvg/emacs-howdoyou
|
|
(use-package howdoyou
|
|
:ensure t
|
|
:commands (howdoyou-query howdoyou-next-link howdoyou-previous-link howdoyou-go-back-to-first-link howdoyou-reload-link)
|
|
:bind
|
|
("C-c h q" . howdoyou-query)
|
|
("C-c h n" . howdoyou-next-link)
|
|
("C-c h p" . howdoyou-previous-link)
|
|
("C-c h f" . howdoyou-go-back-to-first-link)
|
|
("C-c h r" . howdoyou-reload-link)
|
|
)
|
|
|
|
;; https://github.com/magnars/multiple-cursors.el
|
|
(use-package multiple-cursors
|
|
:ensure t
|
|
:bind
|
|
("C-}" . mc/mark-next-like-this)
|
|
("C-)" . mc/unmark-next-like-this)
|
|
("C-{" . mc/mark-previous-like-this)
|
|
("C-(" . mc/unmark-previous-like-this))
|
|
|
|
;; https://github.com/skeeto/elfeed
|
|
(use-package elfeed
|
|
:ensure t
|
|
:commands (elfeed elfeed-search-set-filter)
|
|
:bind
|
|
(("C-x C-l e" . elfeed)
|
|
:map elfeed-search-mode-map
|
|
("a" . (lambda () (interactive) (elfeed-search-set-filter "")))
|
|
("e" . (lambda () (interactive) (elfeed-search-set-filter "+emacs")))
|
|
("d" . (lambda () (interactive) (elfeed-search-set-filter "+daily")))
|
|
("x" . (lambda () (interactive) (elfeed-search-set-filter "xkcd"))))
|
|
:init
|
|
(setq elfeed-feeds
|
|
'(
|
|
("http://telescoper.wordpress.com/feed/" daily)
|
|
("http://xkcd.com/rss.xml" daily)
|
|
("http://timharford.com/feed/" daily)
|
|
("http://understandinguncertainty.org/rss.xml" daily)
|
|
("http://pragmaticemacs.com/feed/" emacs)
|
|
("http://endlessparentheses.com/atom.xml" emacs)
|
|
;; ("http://www.reddit.com/r/emacs/.rss" emacs)
|
|
;; ("http://planet.emacsen.org/atom.xml" emacs)
|
|
("http://feeds.feedburner.com/XahsEmacsBlog" emacs)
|
|
("http://emacs.stackexchange.com/feeds" emacs)
|
|
("https://www.google.com/alerts/feeds/13353713273807811484/2710948715805064535" tesla)
|
|
("https://www.google.com/alerts/feeds/13353713273807811484/17638090915837343269" pixel4)
|
|
("https://www.google.com/alerts/feeds/13353713273807811484/14416938028701328804" stadia)
|
|
))
|
|
:config
|
|
(elfeed-update)
|
|
)
|
|
|
|
;; https://github.com/rmuslimov/browse-at-remote
|
|
(use-package browse-at-remote
|
|
:bind ("C-c B" . browse-at-remote))
|
|
|
|
;; https://github.com/justbur/emacs-which-key
|
|
(use-package which-key
|
|
:diminish
|
|
:ensure t
|
|
:config
|
|
(which-key-setup-minibuffer)
|
|
(which-key-mode))
|
|
|
|
;; https://github.com/lewang/fic-mode
|
|
(use-package fic-mode
|
|
:ensure t
|
|
:hook (prog-mode js-mode javascript-mode)
|
|
:commands fic-mode
|
|
:custom-face
|
|
(fic-face ((t :foreground "red" :weight bold)))
|
|
(fic-author-face ((t :foreground "red" :underline t))))
|
|
|
|
;; https://github.com/joaotavora/yasnippet
|
|
(use-package yasnippet
|
|
:ensure t
|
|
:commands (yas-reload-all)
|
|
:hook (prog-mode . yas-minor-mode)
|
|
:init
|
|
(setq yas-snippet-dirs (list (concat user-emacs-directory "snippets")))
|
|
:config
|
|
(yas-reload-all))
|
|
|
|
;; https://company-mode.github.io/
|
|
(use-package company
|
|
:ensure t
|
|
:defer 5
|
|
:commands (company-mode)
|
|
:hook (prog-mode . company-mode)
|
|
:bind
|
|
(:map company-active-map
|
|
("M-n" . nil)
|
|
("M-p" . nil)
|
|
("C-n" . company-select-next)
|
|
("C-p" . company-select-previous))
|
|
:config
|
|
(setq company-idle-delay 0.1)
|
|
(setq company-minimum-prefix-length 4)
|
|
)
|
|
|
|
;; https://github.com/pashky/restclient.el
|
|
(use-package restclient
|
|
:ensure t
|
|
:mode ("\\.rest\\'" . restclient-mode))
|
|
|
|
;; https://github.com/iquiw/company-restclient
|
|
(use-package company-restclient
|
|
:ensure t
|
|
:after (company restclient))
|
|
|
|
;; https://github.com/magit/magit
|
|
(use-package magit
|
|
:commands magit-status
|
|
:ensure t
|
|
:bind
|
|
("C-x g" . magit-status)
|
|
("C-c g" . magit-status))
|
|
|
|
;; https://github.com/bbatsov/projectile
|
|
(use-package projectile
|
|
:delight '(:eval (concat " [" (projectile-project-name) "]"))
|
|
:ensure t
|
|
:bind-keymap
|
|
("C-c p" . projectile-command-map)
|
|
:init
|
|
;; (setq projectile-mode-line-prefix " P")
|
|
(setq projectile-completion-system 'ivy)
|
|
:config
|
|
(projectile-mode 1))
|
|
|
|
;; https://github.com/rudolfolah/angularjs-mode
|
|
(use-package angular-mode
|
|
:ensure t
|
|
:defer t
|
|
)
|
|
|
|
;; https://github.com/magnars/angular-snippets.el
|
|
(use-package angular-snippets
|
|
:ensure t
|
|
:defer t
|
|
)
|
|
|
|
;; https://github.com/magit/git-modes
|
|
(use-package gitignore-mode
|
|
:ensure t)
|
|
|
|
;; https://github.com/magit/git-modes
|
|
(use-package gitconfig-mode
|
|
:ensure t)
|
|
|
|
;; http://web-mode.org/
|
|
(use-package web-mode
|
|
:ensure t
|
|
:mode "\\.html?\\'")
|
|
|
|
;; https://github.com/joshwnj/json-mode
|
|
(use-package json-mode
|
|
:ensure t
|
|
:mode "\\.json\\'")
|
|
|
|
;; https://github.com/antonj/scss-mode
|
|
(use-package scss-mode
|
|
:ensure t
|
|
:mode ("\\.s?css\\'" . scss-mode))
|
|
|
|
;; https://github.com/yoshiki/yaml-mode
|
|
(use-package yaml-mode
|
|
:ensure t
|
|
:mode ("\\.yml\\'" . yaml-mode))
|
|
|
|
;; https://github.com/kwrooijen/cargo.el
|
|
(use-package cargo
|
|
:hook (rust-mode . cargo-minor-mode))
|
|
|
|
;; https://github.com/flycheck/flycheck
|
|
(use-package flycheck
|
|
:diminish
|
|
:ensure t
|
|
:preface
|
|
(defvar flycheck-emacs-lisp-load-path)
|
|
:init
|
|
(setq flycheck-emacs-lisp-load-path 'inherit)
|
|
(global-flycheck-mode))
|
|
|
|
;; https://orgmode.org/elpa.html
|
|
(use-package org
|
|
:commands (org-cycle-agenda-files org-capture)
|
|
:ensure org-plus-contrib
|
|
:mode ("\\.org\\'" . org-mode)
|
|
:bind (
|
|
("C-," . org-cycle-agenda-files)
|
|
("C-c C-d" . org-capture)
|
|
("C-x C-l a" . org-agenda)
|
|
:map org-mode-map
|
|
("M-RET" . org-insert-todo-heading)
|
|
)
|
|
:preface
|
|
(defvar org-html-validation-link)
|
|
(defvar org-html-text-markup-alist)
|
|
:init
|
|
(setq org-agenda-files '("~/Dropbox/Org/todo.org"
|
|
"~/Dropbox/Org/projects.org"
|
|
"~/Dropbox/Org/archive.org"
|
|
"~/Dropbox/Org/diary/eaglecrk.org"))
|
|
(setq org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)")
|
|
(sequence "BUG(b)" "INPROGRESS(i)" "|" "FIXED(f)")
|
|
(sequence "TEST(T)" "NOTEST(N)" "|" "COMPLETE(C)")
|
|
(sequence "|" "CANCELED(c)")
|
|
(sequence "|" "NEEDCLARIFICATION(n)")
|
|
(sequence "|" "PROVIDEUPDATE(p)")
|
|
(sequence "|" "WAITING(w)"))
|
|
org-refile-targets '((nil :maxlevel . 3)
|
|
(org-agenda-files :maxlevel . 3))
|
|
org-directory "~/Dropbox/Org"
|
|
org-default-notes-file (concat org-directory "/todo.org")
|
|
org-startup-folded t
|
|
org-startup-indented t
|
|
org-startup-align-all-tables t
|
|
org-startup-with-inline-images t
|
|
org-startup-with-latex-preview t
|
|
org-src-tab-acts-natively t
|
|
org-confirm-babel-evaluate nil
|
|
org-log-done t
|
|
org-log-done-with-time t
|
|
org-log-into-drawer t
|
|
org-hide-leading-stars t
|
|
org-pretty-entities t
|
|
org-use-property-inheritance t
|
|
org-html-validation-link nil
|
|
org-html-text-markup-alist '((bold . "<b>%s</b>")
|
|
(code . "<code>%s</code>")
|
|
(italic . "<i>%s</i>")
|
|
(strike-through . "<del>%s</del>")
|
|
(underline . "<span class=\"underline\">%s</span>")
|
|
(verbatim . "<code class=\"verbatim\">%s</code>"))
|
|
)
|
|
:config
|
|
(defun org-src-disable-flycheck-doc ()
|
|
"Disable flycheck comment doc string checking when (C-c ') ing a file."
|
|
(interactive)
|
|
(setq flycheck-disabled-checkers '(emacs-lisp-checkdoc)))
|
|
(add-to-list 'org-src-mode-hook 'org-src-disable-flycheck-doc)
|
|
|
|
(when (version<= "9.2" (org-version))
|
|
(require 'org-tempo))
|
|
(org-babel-do-load-languages 'org-babel-load-languages '((js . t)
|
|
(shell . t)
|
|
(restclient . t)
|
|
(emacs-lisp . t)))
|
|
(setq org-structure-template-alist
|
|
'(("r" . "src restclient :results raw")
|
|
("j" . "src js :cmd \"/usr/local/bin/babel-node\" :results output code")
|
|
("e" . "src emacs-lisp :results silent")
|
|
("a" . "export ascii")
|
|
("c" . "center")
|
|
("C" . "comment")
|
|
("E" . "export")
|
|
("h" . "export html")
|
|
("l" . "export latex")
|
|
("q" . "quote")
|
|
("s" . "src")
|
|
("v" . "verse")))
|
|
(defconst checkbox-fontlock-keywords-alist
|
|
(mapcar (lambda (regex-char-pair)
|
|
`(,(car regex-char-pair)
|
|
(0 (prog1 ()
|
|
(compose-region (match-beginning 1)
|
|
(match-end 1)
|
|
,(concat (list ?\C-i)
|
|
(list (decode-char 'ucs (cadr regex-char-pair)))))))))
|
|
'(("\\(\\[ \\]\\)" #XF096);2B1C
|
|
("\\(\\[-\\]\\)" #XF147);29C7;F458
|
|
("\\(\\[X\\]\\)" #XF046);2BBD
|
|
)))
|
|
|
|
(defun add-checkbox-symbol-keywords ()
|
|
"Add checkbox font to font-lock."
|
|
(font-lock-add-keywords nil checkbox-fontlock-keywords-alist))
|
|
|
|
(add-hook 'org-mode-hook 'add-checkbox-symbol-keywords)
|
|
)
|
|
|
|
(use-package ob-restclient
|
|
:ensure t
|
|
:config
|
|
(setq org-babel-default-header-args:restclient
|
|
`((:results . "output"))))
|
|
|
|
;; https://github.com/astahlman/ob-async
|
|
(use-package ob-async
|
|
:ensure t
|
|
:after (org))
|
|
|
|
;; https://github.com/sabof/org-bullets
|
|
(use-package org-bullets
|
|
:ensure t
|
|
:after (org)
|
|
:hook (org-mode . org-bullets-mode)
|
|
:config
|
|
(set-face-attribute 'org-level-1 nil :height 1.3)
|
|
(set-face-attribute 'org-level-2 nil :height 1.15)
|
|
(set-face-attribute 'org-level-3 nil :height 1.1)
|
|
(set-face-attribute 'org-level-4 nil :height 1.08)
|
|
(set-face-attribute 'org-level-5 nil :height 1.05)
|
|
(set-face-attribute 'org-scheduled-today nil :height 1.0)
|
|
(set-face-attribute 'org-agenda-date-today nil :height 1.1))
|
|
|
|
;; https://orgmode.org/worg/org-contrib/org-protocol.html
|
|
(use-package org-protocol
|
|
:ensure org-plus-contrib
|
|
:after (org)
|
|
:preface
|
|
(defvar org-capture-templates)
|
|
:init
|
|
(setq org-capture-templates
|
|
'(("t" "new task" entry (file+headline "~/Dropbox/Org/todo.org" "Tasks")
|
|
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
|
|
("n" "new note" entry (file+headline org-default-notes-file "Notes")
|
|
"* %?\n%i\n")
|
|
("l" "store link" entry (file+olp org-default-notes-file "Links" "Unfiled")
|
|
"* %a\n%?\n")
|
|
("d" "store link w/drawer" entry (file+olp org-default-notes-file "Links" "Unfiled")
|
|
"* %?\n%l\n:COPIED_TEXT:\n %i\n:END:\n")
|
|
))
|
|
)
|
|
|
|
;; https://github.com/marsmining/ox-twbs
|
|
(use-package ox-twbs
|
|
:ensure t
|
|
:demand t
|
|
:after (org))
|
|
|
|
;; https://github.com/hniksic/emacs-htmlize
|
|
(use-package htmlize
|
|
:ensure t
|
|
:defer 5)
|
|
|
|
;; https://github.com/jwiegley/use-package/blob/master/bind-key.el
|
|
(use-package bind-key
|
|
:ensure t
|
|
:bind
|
|
("C-<tab>" . leo/tidy)
|
|
("C-;" . leo/comment-or-uncomment-region-or-line)
|
|
("C-c e" . leo/find-user-init-file)
|
|
("M-q" . leo/kill-this-buffer-unless-scratch)
|
|
("C-c d" . leo/duplicate-thing)
|
|
("M-n" . leo/jump-to-next-symbol)
|
|
("M-p" . leo/jump-to-prev-symbol)
|
|
("M-u" . upcase-dwim)
|
|
("M-c" . capitalize-dwim)
|
|
("M-l" . downcase-dwim)
|
|
("M-<tab>" . sfdx/next-component-file)
|
|
("C-x C-l s p" . sfdx/create-project)
|
|
("C-x C-l s c" . sfdx/create-component)
|
|
("C-x C-l s d" . sfdx/deploy-component-or-project)
|
|
)
|
|
|
|
;; https://github.com/nflath/sudo-edit
|
|
(use-package sudo-edit
|
|
:ensure t
|
|
:defer t
|
|
:commands (sudo-edit))
|
|
|
|
|
|
(provide '08-custom-packages)
|
|
;;; 08-custom-packages.el ends here
|