Add more to config
This commit is contained in:
parent
8da726a5fc
commit
daf8eb1cd9
93
elisp/init-dashboard.el
Normal file
93
elisp/init-dashboard.el
Normal file
@ -0,0 +1,93 @@
|
||||
;;; init-dashboard.el --- -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Filename: init-dashboard.el
|
||||
;; Description: Initialize Dashboard
|
||||
;; Author: Mingde (Matthew) Zeng
|
||||
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
||||
;; Created: Thu Mar 14 17:21:46 2019 (-0400)
|
||||
;; Version: 3.0
|
||||
;; URL: https://github.com/MatthewZMD/.emacs.d
|
||||
;; Keywords: M-EMACS .emacs.d dashboard
|
||||
;; Compatibility: emacs-version >= 26.1
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This initializes dashboard
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
;; DashboardPac
|
||||
(use-package dashboard
|
||||
:demand
|
||||
:diminish (dashboard-mode page-break-lines-mode)
|
||||
:bind
|
||||
(("C-z d" . open-dashboard)
|
||||
:map dashboard-mode-map
|
||||
(("n" . dashboard-next-line)
|
||||
("p" . dashboard-previous-line)
|
||||
("N" . dashboard-next-section)
|
||||
("F" . dashboard-previous-section)))
|
||||
:custom
|
||||
(dashboard-banner-logo-title "Close the world. Open the nExt.")
|
||||
(dashboard-startup-banner (expand-file-name "images/KEC_Dark_BK_Small.png" user-emacs-directory))
|
||||
(dashboard-items '((recents . 7)
|
||||
(bookmarks . 7)
|
||||
(agenda . 5)))
|
||||
(initial-buffer-choice (lambda () (get-buffer dashboard-buffer-name)))
|
||||
(dashboard-set-heading-icons t)
|
||||
(dashboard-set-navigator t)
|
||||
(dashboard-navigator-buttons
|
||||
(if (featurep 'all-the-icons)
|
||||
`(((,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust -0.05)
|
||||
"M-EMACS" "Browse M-EMACS Homepage"
|
||||
(lambda (&rest _) (browse-url "https://github.com/MatthewZMD/.emacs.d")))
|
||||
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1)
|
||||
"Configuration" "" (lambda (&rest _) (edit-configs)))
|
||||
(,(all-the-icons-faicon "cogs" :height 1.0 :v-adjust -0.1)
|
||||
"Update" "" (lambda (&rest _) (auto-package-update-now)))))
|
||||
`((("" "M-EMACS" "Browse M-EMACS Homepage"
|
||||
(lambda (&rest _) (browse-url "https://github.com/MatthewZMD/.emacs.d")))
|
||||
("" "Configuration" "" (lambda (&rest _) (edit-configs)))
|
||||
("" "Update" "" (lambda (&rest _) (auto-package-update-now)))))))
|
||||
:custom-face
|
||||
(dashboard-banner-logo-title ((t (:family "Love LetterTW" :height 123))))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
;; Open Dashboard function
|
||||
(defun open-dashboard ()
|
||||
"Open the *dashboard* buffer and jump to the first widget."
|
||||
(interactive)
|
||||
(dashboard-insert-startupify-lists)
|
||||
(switch-to-buffer dashboard-buffer-name)
|
||||
(goto-char (point-min))
|
||||
(delete-other-windows)))
|
||||
;; -DashboardPac
|
||||
|
||||
;; PBLPac
|
||||
(use-package page-break-lines
|
||||
:diminish
|
||||
:init (global-page-break-lines-mode))
|
||||
;; -PBLPac
|
||||
|
||||
(provide 'init-dashboard)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-dashboard.el ends here
|
||||
@ -37,8 +37,8 @@
|
||||
|
||||
;; OrgPac
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:defer t
|
||||
:ensure t
|
||||
;; :defer t
|
||||
:bind (("C-c l" . org-store-link)
|
||||
("C-c a" . org-agenda)
|
||||
("C-c c" . org-capture)
|
||||
|
||||
109
elisp/init-parens.el
Normal file
109
elisp/init-parens.el
Normal file
@ -0,0 +1,109 @@
|
||||
;;; init-parens.el --- -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Filename: init-parens.el
|
||||
;; Description: Initialize Parenthesis
|
||||
;; Author: Mingde (Matthew) Zeng
|
||||
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
||||
;; Created: Fri Mar 15 10:17:13 2019 (-0400)
|
||||
;; Version: 3.0
|
||||
;; URL: https://github.com/MatthewZMD/.emacs.d
|
||||
;; Keywords: M-EMACS .emacs.d parenthesis smartparens delete-block
|
||||
;; Compatibility: emacs-version >= 26.1
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This initializes parenthesis smartparens delete-block
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'init-global-config))
|
||||
|
||||
;; SmartParensPac
|
||||
(use-package smartparens
|
||||
:hook (prog-mode . smartparens-mode)
|
||||
:diminish smartparens-mode
|
||||
:bind
|
||||
(:map smartparens-mode-map
|
||||
("C-M-f" . sp-forward-sexp)
|
||||
("C-M-b" . sp-backward-sexp)
|
||||
("C-M-a" . sp-backward-down-sexp)
|
||||
("C-M-e" . sp-up-sexp)
|
||||
("C-M-w" . sp-copy-sexp)
|
||||
("C-M-k" . sp-change-enclosing)
|
||||
("M-k" . sp-kill-sexp)
|
||||
("C-M-<backspace>" . sp-splice-sexp-killing-backward)
|
||||
("C-S-<backspace>" . sp-splice-sexp-killing-around)
|
||||
("C-]" . sp-select-next-thing-exchange))
|
||||
:custom
|
||||
(sp-escape-quotes-after-insert nil)
|
||||
:config
|
||||
;; Stop pairing single quotes in elisp
|
||||
(sp-local-pair 'emacs-lisp-mode "'" nil :actions nil)
|
||||
(sp-local-pair 'org-mode "[" nil :actions nil))
|
||||
;; -SmartParensPac
|
||||
|
||||
;; MatchParens
|
||||
;; Show matching parenthesis
|
||||
(show-paren-mode 1)
|
||||
;; we will call `blink-matching-open` ourselves...
|
||||
(remove-hook 'post-self-insert-hook
|
||||
#'blink-paren-post-self-insert-function)
|
||||
|
||||
;; this still needs to be set for `blink-matching-open` to work
|
||||
(setq blink-matching-paren 'show)
|
||||
(let ((ov nil)) ; keep track of the overlay
|
||||
(advice-add
|
||||
#'show-paren-function
|
||||
:after
|
||||
(defun show-paren--off-screen+ (&rest _args)
|
||||
"Display matching line for off-screen paren."
|
||||
(when (overlayp ov)
|
||||
(delete-overlay ov))
|
||||
;; check if it's appropriate to show match info,
|
||||
;; see `blink-paren-post-self-insert-function'
|
||||
(when (and (overlay-buffer show-paren--overlay)
|
||||
(not (or cursor-in-echo-area
|
||||
executing-kbd-macro
|
||||
noninteractive
|
||||
(minibufferp)
|
||||
this-command))
|
||||
(and (not (bobp))
|
||||
(memq (char-syntax (char-before)) '(?\) ?\$)))
|
||||
(= 1 (logand 1 (- (point)
|
||||
(save-excursion
|
||||
(forward-char -1)
|
||||
(skip-syntax-backward "/\\")
|
||||
(point))))))
|
||||
;; rebind `minibuffer-message' called by
|
||||
;; `blink-matching-open' to handle the overlay display
|
||||
(cl-letf (((symbol-function #'minibuffer-message)
|
||||
(lambda (msg &rest args)
|
||||
(let ((msg (apply #'format-message msg args)))
|
||||
(setq ov (display-line-overlay+
|
||||
(window-start) msg))))))
|
||||
(blink-matching-open))))))
|
||||
;; -MatchParens
|
||||
|
||||
(provide 'init-parens)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-parens.el ends here
|
||||
46
elisp/init-popup-kill-ring.el
Normal file
46
elisp/init-popup-kill-ring.el
Normal file
@ -0,0 +1,46 @@
|
||||
;;; init-popup-kill-ring.el --- -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Filename: init-popup-kill-ring.el
|
||||
;; Description: Initialize Popup-Kill-Ring
|
||||
;; Author: Mingde (Matthew) Zeng
|
||||
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
||||
;; Created: Thu Mar 14 15:15:40 2019 (-0400)
|
||||
;; Version: 3.0
|
||||
;; URL: https://github.com/MatthewZMD/.emacs.d
|
||||
;; Keywords: M-EMACS .emacs.d popup-kill-ring
|
||||
;; Compatibility: emacs-version >= 26.1
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This initializes popup-kill-ring
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
;; PopKillRing
|
||||
(use-package popup-kill-ring
|
||||
:bind ("M-y" . popup-kill-ring)
|
||||
:custom (kill-do-not-save-duplicates t))
|
||||
;; -PopKillRing
|
||||
|
||||
(provide 'init-popup-kill-ring)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-popup-kill-ring.el ends here
|
||||
57
elisp/init-projectile.el
Normal file
57
elisp/init-projectile.el
Normal file
@ -0,0 +1,57 @@
|
||||
;;; init-projectile.el --- -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Filename: init-projectile.el
|
||||
;; Description: Initialize Projectile
|
||||
;; Author: Mingde (Matthew) Zeng
|
||||
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
||||
;; Created: Fri Mar 15 09:10:23 2019 (-0400)
|
||||
;; Version: 3.0
|
||||
;; URL: https://github.com/MatthewZMD/.emacs.d
|
||||
;; Keywords: M-EMACS .emacs.d projectile
|
||||
;; Compatibility: emacs-version >= 26.1
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This initializes projectile
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'init-const))
|
||||
|
||||
;; ProjPac
|
||||
(use-package projectile
|
||||
:bind
|
||||
("C-c p" . projectile-command-map)
|
||||
:custom
|
||||
(projectile-completion-system 'ivy)
|
||||
:config
|
||||
(projectile-mode 1)
|
||||
(when (and *sys/win32*
|
||||
(executable-find "tr"))
|
||||
(setq projectile-indexing-method 'alien))
|
||||
(add-to-list 'projectile-globally-ignored-directories "node_modules"))
|
||||
;; -ProjPac
|
||||
|
||||
(provide 'init-projectile)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-projectile.el ends here
|
||||
106
init.el
106
init.el
@ -88,137 +88,65 @@ If you experience freezing, decrease this. If you experience stuttering, increa
|
||||
(update-to-load-path (expand-file-name "elisp" user-emacs-directory))
|
||||
;; -LoadPath
|
||||
|
||||
;; ;; Constants
|
||||
|
||||
;; Constants
|
||||
(require 'init-const)
|
||||
|
||||
;; ;; Packages
|
||||
|
||||
;; ;; Package Management
|
||||
(require 'init-package)
|
||||
|
||||
;; ;; Global Functionalities
|
||||
(require 'init-global-config)
|
||||
|
||||
(require 'init-func)
|
||||
|
||||
(require 'init-search)
|
||||
|
||||
(require 'init-crux)
|
||||
|
||||
(require 'init-avy)
|
||||
|
||||
;; (require 'init-winner)
|
||||
|
||||
(require 'init-which-key)
|
||||
|
||||
;; (require 'init-popup-kill-ring)
|
||||
|
||||
;; (require 'init-undo-tree)
|
||||
|
||||
(require 'init-popup-kill-ring)
|
||||
(require 'init-discover-my-major)
|
||||
|
||||
(require 'init-ace-window)
|
||||
|
||||
(require 'init-shell)
|
||||
|
||||
(require 'init-dired)
|
||||
|
||||
(require 'init-buffer)
|
||||
|
||||
;; ;; UI Enhancements
|
||||
(require 'init-ui-config)
|
||||
|
||||
(require 'init-theme)
|
||||
|
||||
;; (require 'init-dashboard)
|
||||
|
||||
;; (require 'init-fonts)
|
||||
|
||||
;; (require 'init-scroll)
|
||||
(require 'init-dashboard)
|
||||
|
||||
;; ;; General Programming
|
||||
(require 'init-magit)
|
||||
|
||||
;; (require 'init-projectile)
|
||||
|
||||
(require 'init-projectile)
|
||||
(require 'init-yasnippet)
|
||||
|
||||
(require 'init-syntax)
|
||||
(require 'init-parens)
|
||||
|
||||
;; (require 'init-dumb-jump)
|
||||
;;; (require 'init-indent)
|
||||
|
||||
;; (require 'init-parens)
|
||||
;;; (require 'init-quickrun)
|
||||
|
||||
;; (require 'init-indent)
|
||||
;;; (require 'init-format)
|
||||
|
||||
;; (require 'init-quickrun)
|
||||
;;; (require 'init-lsp)
|
||||
|
||||
;; (require 'init-format)
|
||||
|
||||
;; (require 'init-comment)
|
||||
|
||||
;; (require 'init-edit)
|
||||
|
||||
;; (require 'init-header)
|
||||
|
||||
;; (require 'init-ein)
|
||||
|
||||
;; (require 'init-lsp)
|
||||
|
||||
;; (require 'init-company)
|
||||
;;; (require 'init-company)
|
||||
|
||||
;; ;; Programming
|
||||
;; (require 'init-java)
|
||||
|
||||
;; (require 'init-cc)
|
||||
;;; (require 'init-cc)
|
||||
|
||||
;; (require 'init-python)
|
||||
;;; (require 'init-python)
|
||||
|
||||
;; (require 'init-haskell)
|
||||
;;; (require 'init-latex)
|
||||
|
||||
;; (require 'init-ess)
|
||||
;;; (require 'init-buildsystem)
|
||||
|
||||
;; (require 'init-latex)
|
||||
;; Web Development
|
||||
;;; (require 'init-webdev)
|
||||
|
||||
;; (require 'init-buildsystem)
|
||||
|
||||
;; ;; Web Development
|
||||
;; (require 'init-webdev)
|
||||
|
||||
;; ;; Office
|
||||
;; Office
|
||||
(require 'init-org)
|
||||
|
||||
;; (require 'init-pdf)
|
||||
|
||||
(require 'init-adoc)
|
||||
|
||||
;; ;; Internet
|
||||
;; ;; (require 'init-eaf)
|
||||
|
||||
;; (require 'init-erc)
|
||||
|
||||
;; ;; (require 'init-mu4e)
|
||||
|
||||
;; (require 'init-tramp)
|
||||
|
||||
;; (require 'init-leetcode)
|
||||
|
||||
;; (require 'init-debbugs)
|
||||
|
||||
;; (require 'init-hackernews)
|
||||
|
||||
;; (require 'init-eww)
|
||||
|
||||
;; ;; Miscellaneous
|
||||
;; (require 'init-chinese)
|
||||
|
||||
;; (require 'init-games)
|
||||
|
||||
;; (require 'init-epaint)
|
||||
|
||||
;; (require 'init-zone)
|
||||
|
||||
;; InitPrivate
|
||||
;; Load init-private.el if it exists
|
||||
(when (file-exists-p (expand-file-name "init-private.el" user-emacs-directory))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user