General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
This commit is contained in:
parent
3595ff62ee
commit
060ede0e2e
30 changed files with 125 additions and 112 deletions
|
@ -1,8 +1,8 @@
|
|||
;;; completion/company/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(def-package! company
|
||||
:commands (company-complete-common company-manual-begin company-grab-line)
|
||||
:after-call (evil-insert-state-entry-hook evil-emacs-state-entry-hook)
|
||||
:commands company-complete-common company-manual-begin company-grab-line
|
||||
:after-call evil-insert-state-entry-hook evil-emacs-state-entry-hook
|
||||
:init
|
||||
(setq company-minimum-prefix-length 2
|
||||
company-tooltip-limit 14
|
||||
|
@ -37,7 +37,6 @@
|
|||
|
||||
(def-package! company-tng
|
||||
:when (featurep! +tng)
|
||||
:defer 2
|
||||
:after-call post-self-insert-hook
|
||||
:config
|
||||
(add-to-list 'company-frontends 'company-tng-frontend)
|
||||
|
|
|
@ -324,5 +324,5 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
|
|||
(prescient-persist-mode +1))
|
||||
|
||||
|
||||
;; Used by `counsel-M-x'
|
||||
(setq amx-save-file (concat doom-cache-dir "amx-items"))
|
||||
;;;###package amx
|
||||
(setq amx-save-file (concat doom-cache-dir "amx-items")) ; used by `counsel-M-x'
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
(user-error "Must be called from a file-visiting buffer"))
|
||||
(let* ((directory (file-name-directory buffer-file-name))
|
||||
(filename (file-name-nondirectory buffer-file-name))
|
||||
(files (doom-files-in directory :depth 0 :sort t :match "/[^._][^/]*$"))
|
||||
(files (doom-files-in directory :depth 0 :match "/[^._][^/]*$"))
|
||||
(index (cl-position filename files :test #'string=)))
|
||||
(when (null index)
|
||||
(user-error "Couldn't find this file in current directory"))
|
||||
|
|
|
@ -184,7 +184,7 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
|
||||
(def-package! evil-easymotion
|
||||
:commands (evilem-create evilem-default-keybindings)
|
||||
:commands evilem-create evilem-default-keybindings
|
||||
:config
|
||||
;; Use evil-search backend, instead of isearch
|
||||
(evilem-make-motion evilem-motion-search-next #'evil-ex-search-next
|
||||
|
@ -199,7 +199,7 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
|
||||
(def-package! evil-embrace
|
||||
:commands (embrace-add-pair embrace-add-pair-regexp)
|
||||
:commands embrace-add-pair embrace-add-pair-regexp
|
||||
:hook (LaTeX-mode . embrace-LaTeX-mode-hook)
|
||||
:hook (org-mode . embrace-org-mode-hook)
|
||||
:hook ((ruby-mode enh-ruby-mode) . embrace-ruby-mode-hook)
|
||||
|
@ -246,8 +246,8 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
|
||||
(def-package! evil-escape
|
||||
:commands (evil-escape)
|
||||
:after-call (evil-normal-state-exit-hook)
|
||||
:commands evil-escape
|
||||
:after-call evil-normal-state-exit-hook
|
||||
:init
|
||||
(setq evil-escape-excluded-states '(normal visual multiedit emacs motion)
|
||||
evil-escape-excluded-major-modes '(neotree-mode treemacs-mode vterm-mode)
|
||||
|
@ -272,8 +272,10 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
|
||||
(def-package! evil-snipe
|
||||
:commands (evil-snipe-mode evil-snipe-override-mode
|
||||
evil-snipe-local-mode evil-snipe-override-local-mode)
|
||||
:commands (evil-snipe-mode
|
||||
evil-snipe-override-mode
|
||||
evil-snipe-local-mode
|
||||
evil-snipe-override-local-mode)
|
||||
:after-call pre-command-hook
|
||||
:init
|
||||
(setq evil-snipe-smart-case t
|
||||
|
@ -306,7 +308,7 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
|
||||
;;
|
||||
;; Text object plugins
|
||||
;;; Text object plugins
|
||||
|
||||
(def-package! exato
|
||||
:commands (evil-outer-xml-attr evil-inner-xml-attr))
|
||||
:commands evil-outer-xml-attr evil-inner-xml-attr)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
|
||||
;;
|
||||
;; Third-party plugins
|
||||
;;; Third-party plugins
|
||||
|
||||
;; `csv-mode'
|
||||
(map! :after csv-mode
|
||||
|
@ -37,5 +37,3 @@
|
|||
|
||||
(def-project-mode! +data-vagrant-mode
|
||||
:files ("Vagrantfile"))
|
||||
|
||||
|
||||
|
|
|
@ -71,6 +71,13 @@ library/userland functions"
|
|||
(throw 'matcher t)))))))
|
||||
nil))
|
||||
|
||||
;; `+emacs-lisp-highlight-vars-and-faces' is a potentially expensive function
|
||||
;; and should be byte-compiled, no matter what, to ensure it runs as fast as
|
||||
;; possible:
|
||||
(unless (byte-code-function-p (symbol-function '+emacs-lisp-highlight-vars-and-faces))
|
||||
(with-no-warnings
|
||||
(byte-compile #'+emacs-lisp-highlight-vars-and-faces)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp-lookup-documentation (thing)
|
||||
"Lookup THING with `helpful-variable' if it's a variable, `helpful-callable'
|
||||
|
@ -79,13 +86,6 @@ if it's callable, `apropos' otherwise."
|
|||
(doom/describe-symbol thing)
|
||||
(call-interactively #'doom/describe-symbol)))
|
||||
|
||||
;; `+emacs-lisp-highlight-vars-and-faces' is a potentially expensive function
|
||||
;; and should be byte-compiled, no matter what, to ensure it runs as fast as
|
||||
;; possible:
|
||||
(when (not (byte-code-function-p (symbol-function '+emacs-lisp-highlight-vars-and-faces)))
|
||||
(with-no-warnings
|
||||
(byte-compile #'+emacs-lisp-highlight-vars-and-faces)))
|
||||
|
||||
|
||||
;;
|
||||
;;; Commands
|
||||
|
|
|
@ -34,9 +34,6 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
("add-hook" "remove-hook")
|
||||
("add-hook!" "remove-hook!")))
|
||||
|
||||
;; TODO
|
||||
(put 'add-hook 'lisp-indent-function 'defun)
|
||||
|
||||
(setq-hook! 'emacs-lisp-mode-hook
|
||||
tab-width 2
|
||||
;; shorter name in modeline
|
||||
|
@ -72,7 +69,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
;; `emacs-lisp' checker's verbosity.
|
||||
(add-hook 'flycheck-mode-hook #'+emacs-lisp-reduce-flycheck-errors-in-emacs-config-h)
|
||||
|
||||
;; Special fontification for elisp
|
||||
;; Special syntax highlighting for elisp...
|
||||
(font-lock-add-keywords
|
||||
'emacs-lisp-mode
|
||||
(append `(;; custom Doom cookies
|
||||
|
|
|
@ -36,8 +36,9 @@
|
|||
:interpreter "node"
|
||||
:commands js2-line-break
|
||||
:config
|
||||
(setq js2-skip-preprocessor-directives t
|
||||
js-chain-indent t
|
||||
(setq js-chain-indent t
|
||||
;; Don't mishighlight shebang lines
|
||||
js2-skip-preprocessor-directives t
|
||||
;; let flycheck handle this
|
||||
js2-mode-show-parse-errors nil
|
||||
js2-mode-show-strict-warnings nil
|
||||
|
|
|
@ -270,14 +270,16 @@ Some commands of interest:
|
|||
+ `+org-attach/file'
|
||||
+ `+org-attach/url'
|
||||
+ `+org-attach/sync'"
|
||||
(setq org-attach-directory (expand-file-name org-attach-directory org-directory))
|
||||
(setq org-attach-directory (doom-dir org-directory org-attach-directory))
|
||||
|
||||
;; A shorter link to attachments
|
||||
(add-to-list 'org-link-abbrev-alist (cons "attach" (abbreviate-file-name org-attach-directory)))
|
||||
(add-to-list 'org-link-abbrev-alist
|
||||
(cons "attach"
|
||||
(abbreviate-file-name org-attach-directory)))
|
||||
|
||||
(org-link-set-parameters
|
||||
"attach"
|
||||
:follow (lambda (link) (find-file (expand-file-name link org-attach-directory)))
|
||||
:follow (lambda (link) (find-file (doom-path org-attach-directory link)))
|
||||
:complete (lambda (&optional _arg)
|
||||
(+org--relpath (+org-link-read-file "attach" org-attach-directory)
|
||||
org-attach-directory))
|
||||
|
@ -571,8 +573,8 @@ between the two."
|
|||
"e" #'org-table-edit-formulas
|
||||
"=" #'org-table-eval-formulas)))
|
||||
|
||||
;; Fixes #1483: this messy hack fixes `org-agenda' or `evil-org-agenda'
|
||||
;; overriding SPC, breaking the localleader. TODO Improve me!
|
||||
;; HACK Fixes #1483: this messy hack fixes `org-agenda' or `evil-org-agenda'
|
||||
;; overriding SPC, breaking the localleader
|
||||
(define-minor-mode org-agenda-localleader-mode "TODO"
|
||||
:keymap (make-sparse-keymap))
|
||||
(add-hook 'org-agenda-mode-hook #'org-agenda-localleader-mode)
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
(def-package! org-download
|
||||
:commands (org-download-dnd org-download-dnd-base64)
|
||||
:init
|
||||
;; Add these manually so that org-download is lazy-loaded...
|
||||
(add-to-list 'dnd-protocol-alist '("^\\(https?\\|ftp\\|file\\|nfs\\):" . +org-dragndrop-download-dnd))
|
||||
(add-to-list 'dnd-protocol-alist '("^data:" . org-download-dnd-base64))
|
||||
|
||||
;; HACK We add these manually so that org-download is truly lazy-loaded
|
||||
(appendq!
|
||||
dnd-protocol-alist
|
||||
'("^\\(?:https?\\|ftp\\|file\\|nfs\\):"
|
||||
. +org-dragndrop-download-dnd)
|
||||
'("^data:" . org-download-dnd-base64))
|
||||
(advice-add #'org-download-enable :override #'ignore)
|
||||
:config
|
||||
(setq org-download-image-dir org-attach-directory
|
||||
|
|
|
@ -61,13 +61,14 @@ character.")
|
|||
"HTML encode/decode TEXT. Based on Xah's replace HTML named entities function
|
||||
@ http://ergoemacs.org/emacs/elisp_replace_html_entities_command.html"
|
||||
(interactive "<!><r>")
|
||||
(seq-doseq (rep +web-entities-list)
|
||||
(let ((from (elt rep (if decode-p 0 1)))
|
||||
(to (elt rep (if decode-p 1 0)))
|
||||
case-fold-search)
|
||||
(when (and (not (equal from " "))
|
||||
(string-match-p (regexp-quote from) text))
|
||||
(setq text (replace-regexp-in-string (regexp-quote from) to text t t)))))
|
||||
(mapc (lambda (rep)
|
||||
(let ((from (elt rep (if decode-p 0 1)))
|
||||
(to (elt rep (if decode-p 1 0)))
|
||||
case-fold-search)
|
||||
(when (and (not (equal from " "))
|
||||
(string-match-p (regexp-quote from) text))
|
||||
(setq text (replace-regexp-in-string (regexp-quote from) to text t t)))))
|
||||
+web-entities-list)
|
||||
text)
|
||||
|
||||
(defun +web--entities-region (beg end &optional decode-p)
|
||||
|
@ -75,14 +76,15 @@ character.")
|
|||
function @ http://ergoemacs.org/emacs/elisp_replace_html_entities_command.html"
|
||||
(save-restriction
|
||||
(narrow-to-region beg end)
|
||||
(seq-doseq (rep +web-entities-list)
|
||||
(let ((from (elt rep (if decode-p 0 1)))
|
||||
(to (elt rep (if decode-p 1 0)))
|
||||
case-fold-search)
|
||||
(unless (equal from " ")
|
||||
(goto-char (point-min))
|
||||
(while (search-forward from nil t)
|
||||
(replace-match to 'FIXEDCASE 'LITERAL)))))))
|
||||
(mapc (lambda (rep)
|
||||
(let ((from (elt rep (if decode-p 0 1)))
|
||||
(to (elt rep (if decode-p 1 0)))
|
||||
case-fold-search)
|
||||
(unless (equal from " ")
|
||||
(goto-char (point-min))
|
||||
(while (search-forward from nil t)
|
||||
(replace-match to 'FIXEDCASE 'LITERAL)))))
|
||||
+web-entities-list)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +web-encode-entities (text)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
lsp-keep-workspace-alive nil
|
||||
lsp-groovy-server-install-dir (concat doom-etc-dir "groovy-langserver/"))
|
||||
|
||||
|
||||
(after! lsp-mode
|
||||
(set-lookup-handlers! 'lsp-mode :async t
|
||||
:documentation 'lsp-describe-thing-at-point
|
||||
|
|
|
@ -106,8 +106,10 @@ ensure it is built when we actually use Forge."
|
|||
(def-package! magit-todos
|
||||
:after magit
|
||||
:config
|
||||
(setq magit-todos-keyword-suffix "\\(?:([^)]+)\\)?:?")
|
||||
(setq magit-todos-keyword-suffix "\\(?:([^)]+)\\)?:?") ; make colon optional
|
||||
(define-key magit-todos-section-map "j" nil)
|
||||
;; Warns that jT isn't bound. Well, yeah, you don't need to tell me, that was
|
||||
;; on purpose ya goose.
|
||||
(advice-add #'magit-todos-mode :around #'doom-shut-up-a)
|
||||
(magit-todos-mode +1))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue