General cleanup + refactor

This commit is contained in:
Henrik Lissner 2017-04-17 02:20:07 -04:00
parent 5e2c483923
commit 0e7254d312
12 changed files with 30 additions and 24 deletions

View file

@ -79,6 +79,8 @@
;;;###autoload ;;;###autoload
(define-minor-mode +present/big-mode (define-minor-mode +present/big-mode
"A global mode that resizes the font, for streams, screen-sharing and
presentations."
:init-value nil :init-value nil
:lighter " BIG" :lighter " BIG"
:global t :global t

View file

@ -21,8 +21,8 @@
(def-package! elfeed (def-package! elfeed
:commands elfeed :commands elfeed
:config :config
(setq-default elfeed-search-filter "@2-week-ago ") (setq elfeed-search-filter "@2-week-ago "
(setq elfeed-db-directory (concat doom-local-dir "elfeed/db/") elfeed-db-directory (concat doom-local-dir "elfeed/db/")
elfeed-enclosure-default-dir (concat doom-local-dir "elfeed/enclosures/") elfeed-enclosure-default-dir (concat doom-local-dir "elfeed/enclosures/")
elfeed-show-entry-switch #'+rss-popup-pane elfeed-show-entry-switch #'+rss-popup-pane
elfeed-show-entry-delete #'+rss/delete-pane elfeed-show-entry-delete #'+rss/delete-pane

View file

@ -6,8 +6,6 @@
"The helm text prompt prefix string is globally replaced with this string.") "The helm text prompt prefix string is globally replaced with this string.")
;; ;;
;; Packages ;; Packages
;; ;;

View file

@ -18,7 +18,7 @@ DIR specifies the default-directory from which ag is run."
(if regex-p (rxt-quote-pcre str) str)))) (if regex-p (rxt-quote-pcre str) str))))
+ivy--ag-last-search))) +ivy--ag-last-search)))
(setq +ivy--ag-last-search search) (setq +ivy--ag-last-search search)
(counsel-ag (if regex-p search (rxt-quote-pcre search)) (counsel-ag (if regex-p search (regexp-quote search))
(or dir (doom-project-root)) (or dir (doom-project-root))
(concat "--nocolor --nogroup" (if regex-p " -Q"))))) (concat "--nocolor --nogroup" (if regex-p " -Q")))))

View file

@ -6,13 +6,13 @@
;; you're looking at, with: ;; you're looking at, with:
;; ;;
;; 1. A dwim Jump-to-definition functionality that "just works", with the help ;; 1. A dwim Jump-to-definition functionality that "just works", with the help
;; of `dumb-jump'. ;; of `dumb-jump' and `xref'.
;; 2. A dwim interface to the new (and experimental) xref API built into Emacs. ;; 2. A dwim interface to the new (and experimental) xref API built into Emacs.
;; Once its API is more stable, backends could be written (or provided by ;; Once its API is more stable, backends could be written (or provided by
;; plugins) to create universal find-references and find-definition ;; plugins) to create universal find-references and find-definition
;; functionality. Warning: xref may change drastically in future updates. ;; functionality. Warning: xref may change drastically in future updates.
;; 3. Simple ways to look up the symbol at point in external resources, like ;; 3. Simple ways to look up the symbol at point in external resources, like
;; stackoverflow, devdocs.io or google. ;; stackoverflow, devdocs.io or google. See `+jump/online' (TODO Test me!)
;; 4. TODO Automatic and transparent integration with cscope databases and ctags ;; 4. TODO Automatic and transparent integration with cscope databases and ctags
;; files. Databases are optionally isolated to the Emacs environment. ;; files. Databases are optionally isolated to the Emacs environment.

View file

@ -2,8 +2,8 @@
(def-package! gitconfig-mode (def-package! gitconfig-mode
:mode "/\\.?git/?config$" :mode "/\\.?git/?config$"
:mode "/\\.gitmodules$" :mode "/\\.gitmodules$")
:init (add-hook 'gitconfig-mode-hook 'flyspell-mode))
(def-package! gitignore-mode (def-package! gitignore-mode
:mode "/\\.gitignore$") :mode "/\\.gitignore$")

View file

@ -10,7 +10,8 @@
(:background "#333333" :foreground "#000000")) ;; FIXME (:background "#333333" :foreground "#000000")) ;; FIXME
(((class color) (background dark)) (((class color) (background dark))
(:background "#51afef" :foreground "#181e26"))) (:background "#51afef" :foreground "#181e26")))
"The face for selected tabs displayed by `+workspace/display'") "The face for selected tabs displayed by `+workspace/display'"
:group 'doom)
(defface +workspace-tab-face (defface +workspace-tab-face
'((((class color) (background light)) '((((class color) (background light))
@ -19,7 +20,8 @@
(:background "#23272e" :foreground "#5B6268")) (:background "#23272e" :foreground "#5B6268"))
(((class color) (background dark)) (((class color) (background dark))
(:background "#262626" :foreground "#525252"))) (:background "#262626" :foreground "#525252")))
"The face for selected tabs displayed by `+workspace/display'") "The face for selected tabs displayed by `+workspace/display'"
:group 'doom)
;;;###autoload ;;;###autoload
(defun +workspace-list () (defun +workspace-list ()
@ -110,7 +112,7 @@ Otherwise return t on success, nil otherwise."
"Rename the current workspace named NAME to NEW-NAME. Returns old name on "Rename the current workspace named NAME to NEW-NAME. Returns old name on
success, nil otherwise." success, nil otherwise."
(when (+workspace-protected-p name) (when (+workspace-protected-p name)
(error "Can't rename '%s' workspace")) (error "Can't rename '%s' workspace" name))
(persp-rename new-name (+workspace-get name))) (persp-rename new-name (+workspace-get name)))
;;;###autoload ;;;###autoload

View file

@ -15,13 +15,17 @@
(def-package! yaml-mode :mode "\\.ya?ml$") (def-package! yaml-mode :mode "\\.ya?ml$")
(def-package! json-mode :mode "\\.js\\(on\\|[hl]int\\(rc\\)?\\)$" (def-package! json-mode
:mode "\\.js\\(on\\|[hl]int\\(rc\\)?\\)$"
:config :config
(set! :electric 'json-mode :chars '(?\n ?: ?{ ?}))) (set! :electric 'json-mode :chars '(?\n ?: ?{ ?})))
(def-package! vimrc-mode (def-package! vimrc-mode
:mode ("/\\.?g?vimrc$" "\\.vim$" "/\\.?vimperatorrc$" "\\.vimp$")) :mode "/\\.?g?vimrc$"
:mode "\\.vim$"
:mode "\\.?vimperatorrc$"
:mode "\\.vimp$")
(def-package! dockerfile-mode (def-package! dockerfile-mode
@ -35,7 +39,8 @@
;; For ROM hacking or debugging ;; For ROM hacking or debugging
(def-package! hexl-mode (def-package! hexl-mode
:mode ("\\.hex$" "\\.nes$")) :mode "\\.hex$"
:mode "\\.nes$")
;; ;;

View file

@ -44,7 +44,7 @@
("Modes" "^\\s-*(define-\\(?:global\\(?:ized\\)?-minor\\|generic\\|minor\\)-mode +\\([^ ()\n]+\\)" 1) ("Modes" "^\\s-*(define-\\(?:global\\(?:ized\\)?-minor\\|generic\\|minor\\)-mode +\\([^ ()\n]+\\)" 1)
("Macros" "^\\s-*(\\(?:cl-\\)?def\\(?:ine-compile-macro\\|macro\\) +\\([^ )\n]+\\)" 1) ("Macros" "^\\s-*(\\(?:cl-\\)?def\\(?:ine-compile-macro\\|macro\\) +\\([^ )\n]+\\)" 1)
("Inline Functions" "\\s-*(\\(?:cl-\\)?defsubst +\\([^ )\n]+\\)" 1) ("Inline Functions" "\\s-*(\\(?:cl-\\)?defsubst +\\([^ )\n]+\\)" 1)
("Functions" "^\\s-*(\\(?:cl-\\)?def\\(?:un\\|un\\*\\|method\\|generic\\) +\\([^ )\n]+\\)" 1) ("Functions" "^\\s-*(\\(?:cl-\\)?def\\(?:un\\|un\\*\\|method\\|generic\\|-memoized!\\) +\\([^ )\n]+\\)" 1)
("Variables" "^\\s-*(\\(def\\(?:c\\(?:onst\\(?:ant\\)?\\|ustom\\)\\|ine-symbol-macro\\|parameter\\)\\)\\s-+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)" 2) ("Variables" "^\\s-*(\\(def\\(?:c\\(?:onst\\(?:ant\\)?\\|ustom\\)\\|ine-symbol-macro\\|parameter\\)\\)\\s-+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)" 2)
("Variables" "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)[[:space:]\n]+[^)]" 1) ("Variables" "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)[[:space:]\n]+[^)]" 1)
("Types" "^\\s-*(\\(cl-def\\(?:struct\\|type\\)\\|def\\(?:class\\|face\\|group\\|ine-\\(?:condition\\|error\\|widget\\)\\|package\\|struct\\|t\\(?:\\(?:hem\\|yp\\)e\\)\\)\\)\\s-+'?\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)" 2) ("Types" "^\\s-*(\\(cl-def\\(?:struct\\|type\\)\\|def\\(?:class\\|face\\|group\\|ine-\\(?:condition\\|error\\|widget\\)\\|package\\|struct\\|t\\(?:\\(?:hem\\|yp\\)e\\)\\)\\)\\s-+'?\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)" 2)
@ -76,10 +76,8 @@ version is loaded."
(def-package! slime (def-package! slime
:config :config
(setq inferior-lisp-program "clisp" (setq inferior-lisp-program "clisp")
;; enable fuzzy matching in code buffer and SLIME REPL (require 'slime-fuzzy))
slime-complete-symbol*-fancy t
slime-complete-symbol-function 'slime-fuzzy-complete-symbol))
;; ;;

View file

@ -170,7 +170,8 @@
;; Fontify checkboxes and dividers ;; Fontify checkboxes and dividers
(defface org-list-bullet (defface org-list-bullet
'((t (:inherit font-lock-keyword-face))) '((t (:inherit font-lock-keyword-face)))
"Face for list bullets") "Face for list bullets"
:group 'doom)
(font-lock-add-keywords (font-lock-add-keywords
'org-mode '(("^ *\\([-+]\\|[0-9]+[).]\\) " (1 'org-list-bullet)) 'org-mode '(("^ *\\([-+]\\|[0-9]+[).]\\) " (1 'org-list-bullet))
("^ *\\(-----+\\)$" (1 'org-meta-line)))) ("^ *\\(-----+\\)$" (1 'org-meta-line))))

View file

@ -22,7 +22,7 @@
eshell-glob-case-insensitive t eshell-glob-case-insensitive t
eshell-error-if-no-glob t eshell-error-if-no-glob t
;; em-alias ;; em-alias
eshell-aliases-file "~/.eshell-aliases") eshell-aliases-file (concat doom-local-dir ".eshell-aliases"))
:config :config
(set! :popup "^\\*eshell:popup\\*$" :regexp t :size 25) (set! :popup "^\\*eshell:popup\\*$" :regexp t :size 25)

View file

@ -191,8 +191,8 @@ active."
s))))) s)))))
;; Only support python and ruby for now ;; Only support python and ruby for now
(add-hook! python-mode (setq +doom-modeline-env-command "python --version 2>&1 | cut -d' ' -f2")) (add-hook! 'python-mode-hook (setq +doom-modeline-env-command "python --version 2>&1 | cut -d' ' -f2"))
(add-hook! ruby-mode (setq +doom-modeline-env-command "ruby --version 2>&1 | cut -d' ' -f2")) (add-hook! 'ruby-mode-hook (setq +doom-modeline-env-command "ruby --version 2>&1 | cut -d' ' -f2"))
;; ;;